This repository provides a simple face recognition demo using free, modern deep learning models via facenet-pytorch.
It uses:
- MTCNN for face detection.
- InceptionResnetV1 (VGGFace2 pretrained) for face embeddings.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtPrepare a gallery directory with one image per person. The filename (without extension) becomes the label. Then run:
python face_recognition.py --gallery ./gallery --query ./query.jpg --threshold 0.6If the cosine similarity is above the threshold, the script prints the best match.