--- title: Face Recognition API emoji: 👁️ colorFrom: purple colorTo: blue sdk: docker pinned: false license: mit --- # Face Recognition API with FastAPI A real-time face detection and recognition API with WebSocket support for streaming video frames. ## Features - 🎯 **Face Detection**: MTCNN or YOLO face detection - 🔍 **Face Recognition**: FaceNet embeddings with ChromaDB vector storage - 📡 **WebSocket Streaming**: Real-time face detection over WebSockets - 🖼️ **REST API**: Embed, update, delete, and recognize faces - 🎨 **Data Augmentation**: Automatic face augmentation for better recognition - 📊 **Live Demo UI**: Built-in HTML interface for testing ## Quick Start 1. Access the API at the public URL provided by Hugging Face Spaces 2. Use the built-in UI at `/AutoProctor/v1/` for live testing 3. Check API docs at `/docs` for Swagger documentation ## API Endpoints ### Base Endpoints - `GET /AutoProctor/v1/` - Web interface for testing - `GET /AutoProctor/v1/health` - Health check - `GET /AutoProctor/v1/config` - Get current configuration - `GET /AutoProctor/v1/count` - Count stored embeddings ### Face Management - `POST /AutoProctor/v1/data/embed/{user_id}` - Add face embeddings - `POST /AutoProctor/v1/data/update/{user_id}` - Update face embeddings - `POST /AutoProctor/v1/data/delete/{user_id}` - Delete user embeddings ### Recognition - `POST /AutoProctor/v1/data/detect/frame` - Detect faces in single frame - `POST /AutoProctor/v1/data/recognize/frame` - Recognize face in frame - `WebSocket /AutoProctor/v1/data/detect/stream` - Real-time streaming ## Example Usage ### Add Face Embedding ```bash curl -X POST "https://your-space.hf.space/AutoProctor/v1/data/embed/user123" \ -F "file=@face.jpg"