Skip to content

UniFace: A Unified Face Analysis Library for Python | Detection, alignment, landmarks, face-mesh, recognition, parsing, gaze, attributes and anti-spoofing under one API.

5.7 KB
Raw Blame

hide: - toc - navigation - edit template: home.html

UniFace { .hero-title }

A Unified Face Analysis Library for Python

PyPI Version PyPI Downloads License Github Build Status

: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-eye: Gaze Estimation Real-time gaze direction prediction with MobileGaze models.
### :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.
### :material-shield-check: Anti-Spoofing Face liveness detection with MiniFASNet to prevent fraud.
### :material-star-check: Face Quality eDifFIQA scalar quality score to filter or rank faces before recognition.
### :material-blur: Privacy Face anonymization with 5 blur methods for privacy protection.
### :material-database-search: Vector Indexing FAISS-backed embedding store for fast multi-identity face search.

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

### :material-rocket-launch: Quickstart Get up and running in 5 minutes with common use cases.
### :material-school: Tutorials Step-by-step examples for common workflows.
### :material-api: API Reference Explore individual modules and their APIs.
### :material-book-open-variant: Guides Learn about the architecture and design principles.

License

UniFace is released under the MIT License.