We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0833da1 commit 6b93c18Copy full SHA for 6b93c18
deepface/detectors/MtCnn.py
@@ -46,7 +46,7 @@ def detect_faces(
46
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # mtcnn expects RGB but OpenCV read BGR
47
detections = self.model.detect_faces(img_rgb)
48
49
- if len(detections) > 0:
+ if detections is not None and len(detections) > 0:
50
51
for current_detection in detections:
52
x, y, w, h = current_detection["box"]
0 commit comments