Closed vmorshc closed 3 years ago
Does this happen with other images as well?
Does this happen with other images as well?
no, only with this and few more
Printing faces.shape
and getting 0 led me to conclude that the problem is with the face detector and not age or gender detection.
The image is very low quality, so the face detector model cannot find any faces on it.
simple solution is
faces, boxes, scores, landmarks = face_detector.detect_align(img)
if len(faces.shape) == 1:
print("the model can't find any faces")
When i try recognize same images, i get next error:
Image sample: https://drive.google.com/open?id=14xAAW5a74dpNynF3xji5eMQO7yWjPN2c