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

A little discussion about suitable database #273

Closed tetrahydra closed 6 years ago

tetrahydra commented 6 years ago

Hello guys,

I wonder if I can start a discussion on how to choose/apply a suitable database for a large set of images to improve comparison speed.

My plan is use MySQL, so a new extraction can be added easily and as the database grows, the need to load everything into the memory can be eliminated (at the moment I am using Pickle).

If I have a million images, do I have to iterate and compare with each one?

ageitgey commented 6 years ago

You could use MySql like this: https://github.com/ageitgey/face_recognition/issues/238#issuecomment-345847465

Another option without using a database is to train a nearest-neighbor classifier like in this example: https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py