Deep Learning · 2026
Face Detection API
OpenCV Haar Cascade face detection from images, video and webcam through FastAPI.
Model
- Viola-Jones Haar Cascade detector (pretrained, no training run)
- Grayscale conversion + histogram equalization before detection
- Same detector reused across image, video and webcam inputs
Dataset
No training data — the shipped Haar cascade XML ships with OpenCV.
Results & metrics
- Inputs
- image · video · webcam
- Latency
- real-time on CPU
- API
- FastAPI endpoints
Deployment steps
- 1Load the Haar cascade once at startup
- 2Accept image/video/webcam inputs through FastAPI routes
- 3Return bounding boxes as JSON
- 4Run with uvicorn on CPU — no GPU needed
Tech stack
- OpenCV
- FastAPI