Skip to content

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.

License

Notifications You must be signed in to change notification settings

Avishekdevnath/IdentiFace

Repository files navigation

IdentiFace — Offline Face Recognition

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.

Highlights

  • 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

Tech Stack

  • 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)

Quick Start (GUI)

python main.py

Installation

python -m venv venv
venv\Scripts\activate  # Windows
pip install -r requirements.txt

Usage

GUI (Recommended)

python main.py

API

python -m app.service

Endpoints:

  • POST /register
  • POST /identify
  • GET /persons

CLI

python scripts/register.py --name "Jane Doe" --images ./samples/jane/
python scripts/identify.py --image ./samples/test.jpg

Guided Enrollment (Phase 4)

The 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.

Configuration

Edit app/config/settings.py:

  • SIMILARITY_THRESHOLD
  • MAX_FACES
  • POSE_STABLE_FRAMES
  • MIN_FACE_AREA_RATIO

Project Structure

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

Limitations

  • 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)

Ethics & Privacy

  • Explicit consent‑based enrollment
  • No background/continuous surveillance
  • No demographic inference or emotion detection

License

MIT License. See LICENSE.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published