Face Search

Description

Quickly search for faces in a directory of images.
this project uses:

  1. MTCNN for face detection,
  2. FaceNet for face embeddings,
  3. DBscan for organizing the faces into clusters,
  4. faiss for searching the clusters for a specific face.

Installation

to reproduce the development environment, use PDM

pip install pdm

then cd into the project directory and run

pdm install

Usage

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

Using web cam

to test it with webcam and your own pictures, do the following:

  1. place your pictures in the src/face_search/faces directory, minimum 2 pictures.
  2. 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.