davidsandberg / facenet

Face recognition using Tensorflow
MIT License
13.77k stars 4.81k forks source link

Looking for the way to make MTCNN return multiple bounding boxes #101

Closed Jusya closed 7 years ago

Jusya commented 7 years ago

Hello) Is it possible for MTCNN to return all bounding boxes with all different faces on an image? If yes, what is the right way to do this?

Waining for respond. Thank you in advance)

davidsandberg commented 7 years ago

Hi, This should be fairly easy since the call to detect_face: bounding_boxes, _ = align.detect_face.detect_face(img, minsize, pnet, rnet, onet, threshold, factor) returns the detected faces as rows in a numpy array. In align_dataset_mtcnn.py there is some code to figure out which face (among the detected ones) that is the most relevant, but that could shouldn't be needed then.