I'm running deepface model for face recognition and chose YOLOV8 for detecting face. Here is the code I'm running:
from deepface import DeepFace
result = DeepFace.verify(model_name='VGG-Face', detector_backend='yolov8', img1_path='img1.jpg', img2_path='img2.jpg')
So, when I run the code, I'm seeing this error message:
left_eye = result.keypoints.xy[0][0], result.keypoints.conf[0][0]
AttributeError: 'NoneType' object has no attribute 'xy'
I'm assuming that YOLOV8 is detecting face but can't detect keypoints for left/right eyes. I tested it with around 10 images but still failing.
What am I doing wrong? How to solve this problem?
The author made modification in deepface and now it's working fine (probably not in pip yet). The change was in Yolo.py in lines 76-78. See github issue here
Changed from:
to: