How to solve problem running MTCNN in JupiterLab

Issue

The function detect_faces() fails in JupiterLab:

image = Image.open(filename)
imageRGB = image.convert('RGB')
pixels = asarray(imageRGB)
detector = MTCNN()
results = detector.detect_faces(pixels)

mtcnn version 0.1.0

The error:

AbortedError: Operation received an exception:Status: 2, message:
could not create a descriptor for a softmax forward propagation
primitive, in file tensorflow/core/kernels/mkl/mkl_softmax_op.cc:306
[[node model/softmax/Softmax (defined at
/home/rikkatti/anaconda3/envs/poi/lib/python3.9/site-packages/mtcnn/mtcnn.py:342)
]] [Op:__inference_predict_function_828]

Function call stack: predict_function

Solution

that’s probably due to the conflict of keras and tensorflow version.
I solved it by doing these steps:

  1. Uninstall tensorflow from anaconda venv
  2. pip install tensorflow==2.9.0

Answered By – scarlett seow

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published