Pytorch mtcnn.detect()

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?

same as me, when the mtcnn in cuda and image move to cuda to with transform .tensor first. The image can not be read return none tensor in mtcnn(img). But when I see my image.shape is return a value

Could you share one of the failing images so that we can help you debug?