ageitgey / face_recognition

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

Averaging face encodings #1227

Open testy-rgb opened 4 years ago

testy-rgb commented 4 years ago

Basically I got multiple images of 1 person. What's the best way to store its face? Things I have thought of:

  1. Taking some kind of 'average' of the face encodings
  2. Looking for which image has the least (average) distance to the other images and then taking that face encoding
  3. Just taking all face encodings of all the images

Thanks in advance! :)

toome123 commented 3 years ago

You can use this example face_recognition_knn.py In this example is k-nearest neighbors classifier is used. This way you can classify large numbers of people quickly. But before that it needs to be trained.