File size: 1,305 Bytes
3216a1f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ---
title: Face Recognition with Embeddings
emoji: π
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: Real-time face recognition using MTCNN + InceptionResnetV1
---
# Face Recognition Web App
Real-time browser-based face recognition using **MTCNN** for face detection and **InceptionResnetV1** (FaceNet) for embedding generation.
## Features
- π₯ **Video Registration** β Record a short clip to register your face
- πΈ **Image Upload** β Upload 3-10 face images for registration
- β‘ **Real-Time Recognition** β Live webcam face matching via WebSocket
- π **Session Isolation** β All data is ephemeral and auto-purged
- π§ **Cosine Similarity** β Identity matching with configurable threshold
## How It Works
1. **Register** β Enter your name and record a video or upload images
2. **Process** β MTCNN detects faces β InceptionResnetV1 generates 512-dim embeddings
3. **Recognize** β Live webcam stream matches faces against stored embeddings
## Tech Stack
- **Backend**: FastAPI + WebSocket
- **ML**: PyTorch, facenet-pytorch (MTCNN + InceptionResnetV1)
- **Frontend**: Vanilla JS, HTML5, CSS3
## Local Development
```bash
pip install -r requirements.txt
uvicorn server.app:app --host 0.0.0.0 --port 8000
```
|