ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.23k stars 13.47k forks source link

How to use face_recognition to recognize 50 faces in a single image? #971

Open haiderAli62 opened 4 years ago

haiderAli62 commented 4 years ago

Description

I am building a face recognition system and the system would work in that way if we provide an image with 50 people , the system would recognize all the 50 people in the image. I don't know how to do that in face_recognition, if it is possible with face_recognition can you tell me how I can do that.

ageitgey commented 4 years ago

As long as each of the 50 people are large enough in the photo to recognize, it shouldn't be any different than recognizing two people. Just call face_locations() first and pass the results to face_encodings() using the known_face_locations parameter. That way you can match up which square in the original image is which face.

haiderAli62 commented 4 years ago

As long as each of the 50 people are large enough in the photo to recognize, it shouldn't be any different than recognizing two people. Just call face_locations() first and pass the results to face_encodings() using the known_face_locations parameter. That way you can match up which square in the original image is which face.

I am doing the same but it is taking so much long that I run the script 30 mins ago but it still doesn't recognize