Introducing FaceDB - powered by Facebook Research's Search Similarity library, facedb is a binary that runs as a http service. It stores embeddings in the millions and allows for searching the closest matching embedding within a second.
What does it mean?
It means that you can use FaceDB to query a face from a database of Million faces and expect results within a second. This allows for highy scalable applications with an extremely easy to use API.
This example demonstrates usage of FaceDB to query an embedding from a DB of 50 faces of FIFA celebrities. Please go through code to understand FaceDB usage.
This example only works in Linux. FaceDB is currently not available for Windows.
Free version of Face DB only supports 50 faces.
Email us at email@example.com for further queries.
- To run this example, install the following dependencies
pip install requests pip install opencv-python pip install scipy flask
- Next, start
Deepsight Face SDKand let it run.
- Next, start
facedb --serveand let it run
- Start the flask app using
- The application will say
fifa db initialized
- Open a browser and point to
- Use the gui to upload a photo
- The application will return closest matching fifa celebrity
facedb- This is the free version of faceDB binary. It supports upto 50 faces.
app.py- This is the flask app.
dsface.py- A simple python wrapper to generate embeddings using Deepsight Face
facedb.py- A simple python wrapper to
save_to_facedb.py- This demonstrates how to save embeddings in
facedb. It reads values from
fifadb.jsonand stores them in
facedb. It then dumps the database so that it can be loaded later.