Quickly search for faces in a directory of images.
this project uses:
- MTCNN for face detection,
- FaceNet for face embeddings,
- DBscan for organizing the faces into clusters,
- faiss for searching the clusters for a specific face.
to reproduce the development environment, use PDM
pip install pdm
then cd
into the project directory and run
pdm install
cd
into the project directory and run
pdm run streamlit run src/face_search/app.py
ِi provided 2 examples to test on q_1.jpg
and q_2.jpg
in the src/face_search
directory.
demo_face_search.mp4
to test it with webcam and your own pictures, do the following:
- place your pictures in the
src/face_search/faces
directory, minimum 2 pictures. - run the web cam version of the app by running
pdm run streamlit run src/face_search/app_webcam.py
Note: the webcam version will be SLOWER, streamlit issue.