-
-
Notifications
You must be signed in to change notification settings - Fork 635
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
Getting Error at 6th Cell of LFW.ipynb #19
Comments
No face found on one of your face pair. Getting this error is totally normal. Why don't you set the enforce_detection argument to False as mentioned in the message? obj = DeepFace.verify(img1, img2, model_name = 'Dlib', model = dlib_model, distance_metric = 'euclidean', enforce_detection = False) This will solve your issue but setting enforce_detection to False will decrease the accuracy dramatically. Try to feed high resolution images. |
Thanks for your suggestion. Now after putting enforce_detection = False, new error appears. Now showing How can I feed high-resolution images? Is there any way to filter out small images? As this is a fixed dataset by scikit learn. Can I manually select my dataset folder or any other way? |
I'm getting a value error at the 6th cell of LFW.ipynb. I'm getting this error both in google colab and my local machine. Please solve this issue.
The error is:
ValueError Traceback (most recent call last)
in
11
12 #obj = DeepFace.verify(img1, img2, model_name = 'VGG-Face', model = vgg_model)
---> 13 obj = DeepFace.verify(img1, img2, model_name = 'Dlib', model = dlib_model, distance_metric = 'euclidean')
14 prediction = obj["verified"]
15 predictions.append(prediction)
~/.local/lib/python3.8/site-packages/deepface/DeepFace.py in verify(img1_path, img2_path, model_name, distance_metric, model, enforce_detection, detector_backend)
152 , detector_backend = detector_backend)
153
--> 154 img2 = functions.preprocess_face(img=img2_path
155 , target_size=(input_shape_y, input_shape_x)
156 , enforce_detection = enforce_detection
~/.local/lib/python3.8/site-packages/deepface/commons/functions.py in preprocess_face(img, target_size, grayscale, enforce_detection, detector_backend)
454
455 if enforce_detection == True:
--> 456 raise ValueError("Detected face shape is ", img.shape,". Consider to set enforce_detection argument to False.")
457 else: #restore base image
458 img = base_img.copy()
ValueError: ('Detected face shape is ', (0, 92, 3), '. Consider to set enforce_detection argument to False.')
The text was updated successfully, but these errors were encountered: