Lightweight Python face recognition and facial attribute analysis with multiple model and detector choices
- Stars22.9k
- Forks3.1k
- Open Issues9
MIT
- Python
- Dockerfile
- Shell

About DeepFace
DeepFace is a Python framework for face recognition and facial attribute analysis. It handles verification, search, embeddings, and analysis for age, gender, emotion, and race, so you can work with facial images without building each pipeline stage yourself.
It wraps multiple recognition models including VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet, and Buffalo_L. It also supports detector backends such as opencv, ssd, dlib, mtcnn, fastmtcnn, retinaface, mediapipe, yolov8, yolov11, yolov12, yunet, and centerface. Face extraction can include anti-spoofing, and distance metrics include cosine, euclidean, euclidean_l2, and angular.
DeepFace can be installed from PyPI, and a Docker path is provided for running the service. A managed API is also available at deepface.dev for those who do not want to host and scale it themselves. The project is MIT licensed.
Key features
- Face verification, search, embeddings, and analysis
- Age, gender, emotion, and race analysis
- Multiple recognition models and detector backends
- Anti-spoofing in face extraction
- Distance metrics: cosine, euclidean, euclidean_l2, angular
Details
- First released
- 2020
- License
- MIT
- Platforms
- Linux · macOS · Windows
- Deployment
- self-hostable · docker · cloud
- Packaging
- PyPI
- Models
- VGG-Face · FaceNet · ArcFace
