UniFace: A Unified Face Analysis Library for Python | Detection, alignment, landmarks, face-mesh, recognition, parsing, gaze, attributes and anti-spoofing under one API.
Python computer-visiondeep-learningface-alignmentface-analysisface-anonymizationface-anti-spoofingface-attributesface-detectionface-meshface-parsingface-quality-assessmentface-recognitionface-segmentationface-trackingfacial-landmarksgaze-estimationhead-pose-estimationonnxruntimeportrait-mattingpython
hide: - toc - navigation - edit template: home.html
UniFace { .hero-title }
A Unified Face Analysis Library for Python
:material-rocket-launch: Get Started{ .md-button .md-button--primary } :material-github: View on GitHub{ .md-button }
### :material-face-recognition: Face Detection
RetinaFace, SCRFD, CenterFace, and YOLO detectors with 5-point landmarks, plus BlazeFace for short-range MediaPipe parity.
### :material-account-check: Face Recognition
AdaFace, ArcFace, EdgeFace, MobileFace, and SphereFace embeddings for identity verification.
### :material-map-marker: Landmarks
Dense facial landmark localization — 106-point (2d106det), 98 / 68-point (PIPNet), and 468/478-point 3D mesh (Face Mesh, the 478 variant adding irises) variants.
### :material-account-details: Attributes
Age, gender, race (FairFace), emotion, and face states (FaceAttribNet) from faces.
### :material-face-man-shimmer: Face Parsing
BiSeNet semantic segmentation with 19 facial component classes, plus XSeg face masking.
### :material-image-off: Portrait Matting
Trimap-free alpha matte with MODNet for background removal and compositing.
### :material-axis-arrow: Head Pose
3D head orientation (pitch, yaw, roll) estimation with 6D rotation models.
### :material-motion-play: Tracking
Multi-object tracking with BYTETracker for persistent face IDs across video frames.
Installation
UniFace runs out of the box on macOS, Linux, and Windows, with automatic hardware acceleration on Apple Silicon, NVIDIA CUDA, and CPU. Inference runs on ONNX Runtime (with PyTorch for a few optional models) — installed automatically by the extra you choose below.
CPU / Apple Silicon
pip install "uniface[cpu]"
GPU (NVIDIA CUDA)
pip install "uniface[gpu]"
From Source
git clone https://github.com/yakhyo/uniface.git
cd uniface
pip install -e ".[cpu]" # or .[gpu] for CUDA
Next Steps
License
UniFace is released under the MIT License.