Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve problem running MTCNN in JupiterLab

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

like image 293
rikkatti Avatar asked Dec 31 '25 11:12

rikkatti


1 Answers

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
like image 50
scarlett seow Avatar answered Jan 03 '26 08:01

scarlett seow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!