This is a Streamlit api demo project where you can upload a face photo and finds the most similar face to your input photo by using QDrant Search Engine and Streamlit.
Download the python requirements for the project.
pip install -r requirements.txt
In this project, 10K faces are used from CelebA dataset as database.
The embeddings&label ids are in 'embeddings.npy", "embeddings_ids.txt" respectively.
If you want to produce the embeddings from scratch or more embeddings, you can run the script below after you put your data location under the config file.
python source/embedding_extractor.py
For searching similar photos, QDrant Vector Database is used.
After install Docker, you can start the qdrant service in port 6333.
sudo docker run -p 6333:6333 qdrant/qdrant:latest
To upload the vector embeddings to qdrant search engine.
python source/embedding_loader.py
You can start the streamlit api in your localhost.
streamlit run source/app.py
At the end, you should be able to see the interface as follow: