-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not reproduction acc with lfw dataset #220
Comments
what exactly image pairs in your experiment? could you share your whole code? you got same error when you test it for another model, e.g. Facenet? |
I copy the code from here(https://github.com/serengil/tensorflow-101/blob/master/python/LFW.ipynb), and use Facenet got same error. |
it seems mtcnn causes an error. You can skip the error if you set the detector backend to different to mtcnn. DeepFace.verify(img1, img2, detector_backend = 'opencv', enforce_detection = False) I will study why mtcnn causes this error |
yes, mtcnn find facial area in a scale of 1, 1, 3 that's not true. It seems mtcnn related error. The best way is using different detector. |
I try to reproduction acc with lfw dataset, but error occur.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2772, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), '<f4')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "deepface_test.py", line 33, in
obj = DeepFace.verify(img1, img2, model_name = 'Dlib', model = dlib_model, enforce_detection=False, distance_metric = 'euclidean')
File "/usr/local/lib/python3.6/dist-packages/deepface/DeepFace.py", line 152, in verify
, detector_backend = detector_backend)
File "/usr/local/lib/python3.6/dist-packages/deepface/commons/functions.py", line 454, in preprocess_face
img = align_face(img = img, detector_backend = detector_backend)
File "/usr/local/lib/python3.6/dist-packages/deepface/commons/functions.py", line 437, in align_face
img = alignment_procedure(img, left_eye, right_eye)
File "/usr/local/lib/python3.6/dist-packages/deepface/commons/functions.py", line 360, in alignment_procedure
img = Image.fromarray(img)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2774, in fromarray
raise TypeError("Cannot handle this data type: %s, %s" % typekey) from e
TypeError: Cannot handle this data type: (1, 1, 3), <f4
What shoud I do?
The text was updated successfully, but these errors were encountered: