Our new model ZOO works with DepthAI V3. Find out more in our documentation.
1+ Likes
Model Details
Model Description
YuNet is a highly efficient face detection model. With only 75k parameters, it is designed to operate with minimal computational resources while maintaining exceptional balance between accuracy and speed, making it ideal for real-time applications on edge devices.
Developed by: Wei Wu et al.
Shared by:
Model type: Computer Vision
License:
Resources for more information:
Photo by Sagar Sintan from
Training Details
Training Data
The model was trained on . It is split into training, validation and test sets. WIDERFace is a face detection benchmark dataset, of which images are selected from the publicly available . They choose 32,203 images and label 393,703 faces with a high degree of variability in scale, pose, and occlusion as depicted in the sample images. WIDERFace dataset is organized based on 61 event classes. For each event class, they randomly select 40%/10%/50% data as training, validation, and testing sets. Based on the detection rate of EdgeBox (Zitnick & Dolla ́r, 2014), three levels of difficulty (i.e. Easy, Medium and Hard) are defined by incrementally incorporating hard samples.
Testing Details
Metrics
AP metric was calculated for different groups of validation dataset based on the face-detection difficulty level (Easy, Medium, and Hard). The results are taken from the repository.
Metric
Value
AP_easy
0.887
AP_medium
0.871
AP_hard
0.768
Technical Specifications
Input/Output Details
Input:
Name: image
Info: NCHW BGR image
Output:
Name: Multiple (please consult NN archive config.json)
Info: Classification scores, objectness scores, bounding boxes, and keypoints for a multitude of detections.
Model Architecture
Backbone: Compact feature extraction backbone originating from MobileNet
* Benchmarked with , using 2 threads (and the DSP runtime in balanced mode for RVC4).
* Parameters and FLOPs are obtained from the package.
Quantization
RVC4 version of the model was quantized using a custom dataset.
This was created by taking a 50-image subset of the dataset.
Utilization
Models converted for RVC Platforms can be used for inference on OAK devices.
DepthAI pipelines are used to define the information flow linking the device, inference model, and the output parser (as defined in model head(s)).
Below, we present the most crucial utilization steps for the particular model.
Please consult the docs for more information.
YuNetParser that outputs message (bounding boxes with keypoints and confidence scores for every detected face).
Get parsed output(s):
while pipeline.isRuning():
parser_output: ImgDetectionsExtended = parser_output_queue.get()
Example
You can quickly run the model using our script.
It automatically downloads the model, creates a DepthAI pipeline, runs the inference, and displays the results using our DepthAI visualizer tool.
To try it out, run:
python3 main.py \
--model luxonis/yunet:640x480
You can also check out and or any other example from .