A comprehensive collection of face AI models with integrated pre and post-processing steps, utilizing NVIDIA Triton Inference Server for seamless inference. This repository aims to provide easy-to-use face detection, recognition, and analysis tools.
- Introduction
- Features
- Installation
- Usage
- Available Models
- Pre and Post Processing
- Disclaimer
- License
This repository contains a suite of face AI models designed for various applications, such as face detection, recognition, and analysis. The models are optimized for performance and ease of use, leveraging NVIDIA Triton Inference Server for scalable and efficient inference.
- Diverse Collection of Models: Includes models for face detection, recognition, age estimation, feature embedding, and landmark detection.
- Integrated Pre and Post-Processing: Ensures consistent and accurate results across different models.
- Triton Inference Server Integration: Facilitates efficient and scalable model deployment.
- Easy-to-Use Interface: Simple API for quick integration into various applications.
-
go get github.com/dev6699/face
-
git clone https://github.com/dev6699/face.git cd face
-
Navigate to the Available Models section to find the download links for each model.
-
Download each model and rename the file to
model.onnx
. -
Place each
model.onnx
file into its respective directory within the model_repository folder. -
Example: Setting up the YOLOFace model:
mkdir -p model_repository/yoloface/1 wget -O model_repository/yoloface/1/model.onnx <model_url>
Ensure to replace <model_url> with the actual URL provided in the Available Models section.
Please refer to the examples folder for more information on how to use the models and run various tasks.
-
Start Triton Inference Server:
docker-compose up tritonserver
-
Model Name: 2dfan4
-
Description: Detects 68 facial landmarks for detailed facial analysis and alignment.
-
Download Link: Download 2DFAN4 Model
-
Model Name: arcface_w600k_r50
-
Description: Generates feature embeddings for faces, useful for identity verification and facial recognition tasks.
-
Download Link: Download ArcFace Model
Cosine distance of arcface embedding
Source\Target 0.00 0.29 0.48 0.29 0.00 0.45 0.48 0.45 0.00
-
Model Name: gfpgan_1.4
-
Description: Enhances facial features and improves image quality, often used for face restoration and super-resolution tasks.
-
Download Link: Download GFPGAN Model
Input Output
-
Model Name: face_occluder
-
Description: Detects parts of a face that are not occluded by objects, providing insights into visible facial features.
-
Download Link: Download Face Occluder Model
-
Model Name: gender_age
-
Description: Detects gender and estimates the age of detected faces.
-
Download Link: Download Gender and Age Estimation Model
-
Model Name: inswapper_128_fp16
-
Description: Swaps the target face with a source face, enabling realistic face replacement in images.
-
Download Link: Download Inswapper Model
Source Target Output
-
Model Name: yoloface
-
Description: Detects face bounding boxes and the 5 key facial landmarks (landmark5) using the YOLO architecture.
-
Download Link: Download YOLOFace Model
Each model has specific pre-processing steps to ensure accurate results. Common steps include:
- Resizing: Scaling the input image to the required dimensions.
- Normalization: Adjusting pixel values to a standard range.
- Face Alignment: Aligning faces for consistent feature extraction.
Post-processing varies by model and typically includes:
- Bounding Box Extraction: Extracting face locations from detection models.
- Feature Extraction: Computing facial features for recognition models.
- Label Assignment: Assigning predicted labels or scores.
Model assets are subject to their individual licenses. Ensure that you review and comply with the specific license terms for each model you use. The repository does not grant rights to use third-party models beyond the scope defined in their respective licenses.
This project is licensed under the MIT License - see the LICENSE file for details.