ageitgey / face_recognition

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

Face recognition for high accuracy #448

Open roiksail opened 6 years ago

roiksail commented 6 years ago

Hello everybody...i maked a project with face_recognition library using raspberry pi 3 in real time..i added 45 people and In some peoples they identify faces incorrectly,how i can to increase face recognition accuracy??in addition, I set the tolerance parameter to 0.54 but it not worked for me, thank you in advance for your support

cftang0827 commented 6 years ago

Hi, I am also doing such project right now, use rpi as a small server to recognize people in real time. According to dlib's suggestion, if seems like you can use face encoding as a feature extractor, and then train a simple classifier by using KNN or SVM technique. I am not sure whether it is suitable for rpi due to the lack of enough computing power, but I think is is worth to try.

BTW, the way I use is simply set the toloerence=0.4 and then add more picture for one person, e.g. different angle of different size. It really works. I think if there's any algorithm or API that can augment image in 3D way, maybe it would help, too.

Thanks. :)

roiksail commented 6 years ago

How do you use multiple photos for each person?i used facerec_from_webcam_faster.py in the examples directory

stoneWeb commented 6 years ago

Same question. How do you use multiple photos for each person? I used opencv demo.

xugaoxiang commented 6 years ago

@roiksail @stoneWeb , I think, @cftang0827 just use more photos for a person on training.

cftang0827 commented 6 years ago

Yes, I used scikit-learn SVM and KNN module to make a simple classifier. However, the cons is that you can only classify the person in your database.

[Person1] vector1 [Person1] vector2 [Person1] vector3

[Person2] vector1 [Person2] vector2 [Person2] vector3 [Person2] vector4

For my experience, I think knn with distance metric is better. And you may use svm for gender classification

Thanks.