Skip to content

Commit

Permalink
Restore "no result" guard.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent-Stragier committed May 24, 2023
1 parent 769a497 commit 907db28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepface/detectors/MediapipeWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def detect_face(face_detector, img, align=True):

results = face_detector.process(img)

# if no face have been detected, return an empty list
if results.detections is None:
return resp

for detection in results.detections:
(confidence,) = detection.score

Expand Down

0 comments on commit 907db28

Please sign in to comment.