Closed nbhupendra closed 3 years ago
I need more details.
Which function you are calling? Which arguments you are passing? Which version of deepface you are using? Could you share the all error message?
Hi,
PFB details.
DeepFace.verify( image1, image2, distance_metric='euclidean', model_name='Facenet512', detector_backend='retinaface')
Deep face version is latest. Version: 0.0.65
I also need all error message to understand which line causes the error.
I also need all error message to understand which line causes the error.
File "/Users/test_user/FaceRecog/deepface-master/deepface/DeepFace.py", line 164, in verify
, align = align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/DeepFace.py", line 742, in represent
, align = align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/commons/functions.py", line 113, in preprocess_face
img, region = detect_face(img = img, detector_backend = detector_backend, grayscale = grayscale, enforce_detection = enforce_detection, align = align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/commons/functions.py", line 96, in detect_face
detected_face, img_region = FaceDetector.detect_face(face_detector, detector_backend, img, align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/detectors/FaceDetector.py", line 36, in detect_face
obj = detect_faces(face_detector, detector_backend, img, align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/detectors/FaceDetector.py", line 59, in detect_faces
obj = detect_face(face_detector, img, align)
File "/Users/test_user/FaceRecog/deepface-master/deepface/detectors/RetinaFaceWrapper.py", line 58, in detect_face
detected_face = postprocess.alignment_procedure(detected_face, right_eye, left_eye, nose)
TypeError: alignment_procedure() takes 3 positional arguments but 4 were given
test_user@LTtest_user-MAC deepface-master % python3 face_recognition.py
Traceback (most recent call last):
File "face_recognition.py", line 21, in
That's very interesting. My test results are below. I made some modifications and publish it in the next couple of days as 0.0.66. You can still use it now.
Use the latest code unpublished in pip:
git clone https://github.com/serengil/deepface.git
cd deepface
pip install -e .
code:
DeepFace.verify("deepface/tests/dataset/img1.jpg",
"deepface/tests/dataset/img2.jpg",
distance_metric='euclidean',
model_name='Facenet512',
detector_backend='retinaface')
result:
{"verified": true,
"distance": 16.250792736923742,
"max_threshold_to_verify": 23.56,
"model": "Facenet512",
"similarity_metric": "euclidean"}
getting error while choosing detector as retinaface
TypeError('alignment_procedure() takes 3 positional arguments but 4 were given',)