IdentiFace is a closed‑set, consent‑based face recognition system that runs fully offline. It uses MTCNN for face detection and FaceNet embeddings (via facenet-pytorch) with FAISS for fast similarity search. A guided enrollment wizard captures multiple head poses for more robust recognition.
This project focuses on data quality and UX‑guided enrollment rather than model training. The goal is a practical, explainable pipeline that can be demoed locally, audited easily, and extended without cloud dependencies.
- Offline, consent‑based recognition
- Guided multi‑pose enrollment (center/left/right/up/down/roll)
- FAISS vector search for fast matching
- GUI + CLI + optional FastAPI server
- SQLite persistence with per‑embedding metadata
- Simple configuration via
app/config/settings.py
- Python 3.10+
- MTCNN (face detection)
- FaceNet via facenet‑pytorch (embeddings)
- FAISS (vector similarity search)
- SQLite (local persistence)
- Tkinter (GUI)
- FastAPI + Uvicorn (optional API server)
python main.pypython -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txtpython main.pypython -m app.serviceEndpoints:
POST /registerPOST /identifyGET /persons
python scripts/register.py --name "Jane Doe" --images ./samples/jane/
python scripts/identify.py --image ./samples/test.jpgThe registration wizard guides users through multiple head poses and stores multiple embeddings per identity. Pose guidance images are stored in:
app/gui/assets/
Captures:
- center (3)
- left/right/up/down/roll_left/roll_right (1 each)
Matching compares an input embedding against all stored embeddings for an identity and selects the best similarity score. This improves stability across pose variation without additional model training.
Edit app/config/settings.py:
SIMILARITY_THRESHOLDMAX_FACESPOSE_STABLE_FRAMESMIN_FACE_AREA_RATIO
identiface/
├── app/
│ ├── core/ # detection, embeddings, matching
│ ├── gui/ # Tkinter UI
│ ├── index/ # FAISS index
│ ├── storage/ # SQLite persistence
│ └── service.py # FastAPI server
├── scripts/ # CLI tools
├── data/ # runtime DB + index (ignored in git)
└── main.py # GUI entry point
- Closed‑set only (no open‑world recognition)
- Best results for good lighting and frontal/near‑frontal faces
- Single face per frame (configurable, but UI is designed for one face)
- Explicit consent‑based enrollment
- No background/continuous surveillance
- No demographic inference or emotion detection
MIT License. See LICENSE.