diff --git a/deepface/detectors/Yolo.py b/deepface/detectors/Yolo.py index 53e25ba..e50e450 100644 --- a/deepface/detectors/Yolo.py +++ b/deepface/detectors/Yolo.py @@ -74,16 +74,13 @@ class YoloClient(Detector): # For each face, extract the bounding box, the landmarks and confidence for result in results: - if result.boxes is None: + if result.boxes is None or result.keypoints is None: continue # Extract the bounding box and the confidence x, y, w, h = result.boxes.xywh.tolist()[0] confidence = result.boxes.conf.tolist()[0] - if result.keypoints is None: - continue - # left_eye_conf = result.keypoints.conf[0][0] # right_eye_conf = result.keypoints.conf[0][1] left_eye = result.keypoints.xy[0][0].tolist()