I am using facenet_pytorch and I’ve been using its mtcnn to detect faces. It worked properly, now i wanted to get vectors from larger dataset of images (around 300) and a lot of them give me None as face is not recognized, where the image is of a very good quality and clearly a face.
I use it like:
from facenet_pytorch import MTCNN, InceptionResnetV1
mtcnn = MTCNN()
img = Image.open(img_path).convert(‘RGB’) -Image from PIL library
boxes, _ = mtcnn.detect(img)
And not for all but some of them I get boxes to be None, i go to the file system. Very nice image, preprocessed, face seen clearly, good lightning… Any clues?