face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

Regarding the perfomance

Open mlanandnair opened this issue 8 years ago • 3 comments

Hi dude , This is not an issue. I am working on a certain project with face recognition to a identify person and thanks to your library and dlib its working fine . I just want to enquiry about the performance of your library. My scenario is i will collect three image of per user and save it in db. then in the prediction i am using this images to predict who is this person. My question is how much time will it take to predict a person if i have almost 3000 users. ie for the training purpose their will be almost 3000*3 = 9000 images.

mlanandnair avatar Jan 03 '18 07:01 mlanandnair

If you have thousands of faces to compare, you probably want to try one of these two strategies to get faster results:

  1. Train a classifier on top of the face encodings, like in this example: https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py
  2. Put all the face encodings in a database (either sql or elasticsearch) and use the database's query language to do the euclidean distance calculation on each result.

ageitgey avatar Jan 05 '18 18:01 ageitgey

i have gone through your example "https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py" , and worked out that. Its working fine in most of the cases. i have a doubt about the second point .The euclidean distance you mentioned right , Is it the same distance parameter that you mentioned in this example ?. https://github.com/ageitgey/face_recognition/blob/master/examples/face_distance.py

mlanandnair avatar Jan 09 '18 11:01 mlanandnair

Good question! Check out this comment for more info: https://github.com/ageitgey/face_recognition/issues/238#issuecomment-345847465

I'm working on a FAQ since these questions come up so often.

ageitgey avatar Jan 09 '18 17:01 ageitgey