mirror of
https://github.com/serengil/deepface.git
synced 2025-06-13 23:07:11 +00:00
fastmtcnn sometimes fails
This commit is contained in:
parent
db0db06f59
commit
50dd5d7aa2
@ -27,8 +27,11 @@ class FastMtCnnClient(Detector):
|
|||||||
detections = self.model.detect(
|
detections = self.model.detect(
|
||||||
img_rgb, landmarks=True
|
img_rgb, landmarks=True
|
||||||
) # returns boundingbox, prob, landmark
|
) # returns boundingbox, prob, landmark
|
||||||
if detections is not None and len(detections) > 0:
|
if (
|
||||||
|
detections is not None
|
||||||
|
and len(detections) > 0
|
||||||
|
and not any(detection is None for detection in detections) # issue 1043
|
||||||
|
):
|
||||||
for current_detection in zip(*detections):
|
for current_detection in zip(*detections):
|
||||||
x, y, w, h = xyxy_to_xywh(current_detection[0])
|
x, y, w, h = xyxy_to_xywh(current_detection[0])
|
||||||
confidence = current_detection[1]
|
confidence = current_detection[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user