Releases: yakhyo/uniface
Releases · yakhyo/uniface
v1.3.1
What's Changed
Full Changelog: v1.3.0...v1.3.1
v1.3.0
What's Changed
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
Full Changelog: v1.1.2...v1.2.0
v1.1.2
v1.1.1
Full Changelog: v1.1.0...v1.1.1
v1.1.0
What's Changed
Full Changelog: v0.1.9...v1.1.0
Model Weights
UniFace: A Comprehensive Library for Face Detection, Recognition, Landmark Analysis, Age, and Gender Detection
Features
- High-speed face detection using ONNX models (Added: 2024-11-20)
- Accurate facial landmark localization (e.g., eyes, nose, and mouth) (Added: 2024-11-20)
- Face recognition with multiple model options (Added: 2024-11-20)
- Age and gender detection (Added: 2024-11-20)
- Emotion recognition (Added: 2024-11-20)
- Easy-to-use API for inference and visualization (Added: 2024-11-20)
Available Models
Face Detection Models
RetinaFace Models
| Model Name | Easy | Medium | Hard | Use Case |
|---|---|---|---|---|
| retinaface_mnet025 | 88.48% | 87.02% | 80.61% | Mobile/Edge devices |
| retinaface_mnet050 | 89.42% | 87.97% | 82.40% | Mobile/Edge devices |
| retinaface_mnet_v1 | 90.59% | 89.14% | 84.13% | Balanced mobile |
| retinaface_mnet_v2 | 91.70% | 91.03% | 86.60% | Recommended default |
| retinaface_r18 | 92.50% | 91.02% | 86.63% | Server/High accuracy |
| retinaface_r34 | 94.16% | 93.12% | 88.90% | Maximum accuracy |
SCRFD Models
| Model Name | Easy | Medium | Hard | Use Case |
|---|---|---|---|---|
| scrfd_500m | 90.57% | 88.12% | 68.51% | Real-time applications |
| scrfd_10g | 95.16% | 93.87% | 83.05% | High accuracy + speed |
Face Recognition Models
ArcFace
arcface_mnet: MobileNet backbone - Balanced performance (recommended)arcface_resnet: ResNet50 backbone - Maximum accuracy
Trained on MS1M-V2 dataset (5.8M images, 85K identities)
MobileFace
| Model Name | Backbone | LFW | CALFW | CPLFW | AgeDB-30 | Use Case |
|---|---|---|---|---|---|---|
| mobilenetv1_025 | MobileNetV1 0.25 | 98.76% | 92.02% | 82.37% | 90.02% | Ultra-lightweight |
| mobilenetv2 | MobileNetV2 | 99.55% | 94.87% | 86.89% | 95.16% | Mobile/Edge |
| mobilenetv3_small | MobileNetV3-S | 99.30% | 93.77% | 85.29% | 92.79% | Mobile optimized |
| mobilenetv3_large | MobileNetV3-L | 99.53% | 94.56% | 86.79% | 95.13% | Balanced mobile |
Trained on MS1M-V2 dataset (5.8M images, 85K identities)
SphereFace
| Model Name | Backbone | LFW | CALFW | CPLFW | AgeDB-30 | Use Case |
|---|---|---|---|---|---|---|
| sphere20 | Sphere20 | 99.67% | 95.61% | 88.75% | 96.58% | Research/Comparison |
| sphere36 | Sphere36 | 99.72% | 95.64% | 89.92% | 96.83% | Research/Comparison |
Trained on MS1M-V2 dataset (5.8M images, 85K identities)
Facial Analysis Models
Landmark Detection
2d_106: 106-point facial landmark detection
Age & Gender Detection
age_gender: Predicts age and gender from face regions
Emotion Recognition
affecnet7: 7-class emotion recognition (Neutral, Happy, Sad, Surprise, Fear, Disgust, Anger)affecnet8: 8-class emotion recognition (adds Contempt)
Installation
pip install unifaceFor GPU acceleration:
pip install uniface[gpu]Model Selection Guide
By Use Case
- Mobile/Edge: RetinaFace MNET_025 + MobileFace MNET_V2
- Real-time: SCRFD 500M + ArcFace MNET
- High Accuracy: SCRFD 10G + ArcFace RESNET
- Server/Cloud: RetinaFace R34 + ArcFace RESNET
By Hardware
- Apple Silicon: All models work well with ARM64 optimizations
- NVIDIA GPU: Larger models for maximum throughput
- CPU Only: Lightweight models recommended
Available Scripts
run_detection.py: Face detection with different modelsrun_recognition.py: Face recognition and similarity comparisonrun_landmarks.py: Facial landmark detectionrun_age_gender.py: Age and gender predictionrun_video_detection.py: Video processingrun_face_search.py: Face search systembatch_process.py: Batch processing capabilitiesdownload_model.py: Model management
Benchmarking
Test performance on your hardware:
python scripts/run_detection.py --iterations 100Documentation
- QUICKSTART.md - Getting started guide
- MODELS.md - Complete model documentation
- Examples - Jupyter notebooks with examples
v1.0.0
Full Changelog: v0.1.2...v1.0.0
🎉 UniFace v1.0.0 - First Stable Release
This is the first production-ready release of UniFace with a complete feature set, stable API, and comprehensive documentation.
✨ What's New
High-Level Pipeline API
FacePipeline- Comprehensive face analysis workflowsprocess_faces()- Task-based processing (detect, landmarks, recognize, age_gender, emotion)compare_faces()- Compare faces between two imagesextract_face_embeddings()- Extract embeddings for face recognitionanalyze_face_attributes()- Analyze age, gender, and emotion
Face Detection
- RetinaFace detector (MobileNet, ResNet variants)
- SCRFD detector (10G, 500M variants)
- Unified detection output format
Face Recognition
- ArcFace models (MobileNet, ResNet)
- MobileFace models (lightweight)
- SphereFace models (angular margin)
- Normalized embedding extraction
Landmark Detection
- 106-point facial landmark detection
- Landmark-based face alignment
Attribute Analysis
- Age and Gender Detection
- Emotion Recognition (7 categories)
Documentation & Examples
- Comprehensive README with quick start
examples/README.mdwith detailed usage guideexamples/basic_usage.py- 6 practical examplesexamples/advanced_usage.py- Advanced patterns (batch processing, video, face database)- Jupyter notebooks for tutorials
🚀 Quick Start
import uniface
# Simple face detection
faces = uniface.detect_faces(image, method='retinaface')
# Comprehensive analysis
faces = uniface.process_faces(
image,
tasks=['detect', 'landmarks', 'age_gender', 'emotion']
)
# Face comparison
result = uniface.compare_faces(image1, image2, threshold=0.6)📦 Installation
pip install uniface🔧 What Changed
- API Standardization: Unified data formats across all modules
- Factory Functions:
create_detector(),create_recognizer(),create_landmarker(),create_attribute_predictor() - Module Organization: Clean separation of detection, recognition, landmark, and attribute modules
- Documentation: Simplified to maintainable Markdown files
- Apple Silicon Support: Added
onnxruntime-siliconsupport - Improved Logging: Verbose flag for better debugging
🗑️ Removed
- Legacy RetinaFace implementation (consolidated into detection module)
- Complex MkDocs documentation setup
- Duplicate code
🐛 Fixed
- API format inconsistencies
- Code duplication issues
- Import structure and module exports
- Installation issues with onnxruntime-gpu
📚 Documentation
Full Changelog: https://github.com/yakhyo/uniface/commits/v1.0.0
Full Changelog: v0.1.9...v1.0.0