opencv/face_image_quality_assessment_ediffiqa
By opencv · ↓ 0 · ♥ 2 · Updated 2025-06-20
What's in this repo
This page lists the files in opencv/face_image_quality_assessment_ediffiqa, including ediffiqa_tiny_jun2024.onnx.
- 1 ONNX models (.onnx files)
- 10 files, including 3 .py, 1 .md, 1 .onnx, 1 .jpg, 1 .png
- Last updated 2025-06-20
ONNX files
| File | Size | Download |
|---|---|---|
| ediffiqa_tiny_jun2024.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
eDifFIQA(T)
eDifFIQA(T) is a light-weight version of the models presented in the paper eDifFIQA: Towards Efficient Face Image Quality Assessment based on Denoising Diffusion Probabilistic Models, it achieves state-of-the-art results in the field of face image quality assessment.
Notes:
-
The original implementation can be found here.
-
The included model combines a pretrained MobileFaceNet backbone, with a quality regression head trained using the proceedure presented in the original paper.
-
The model predicts quality scores of aligned face samples, where a higher predicted score corresponds to a higher quality of the input sample.
-
In the figure below we show the quality distribution on two distinct datasets: LFW[1] and XQLFW[2]. The LFW dataset contains images of relatively high quality, whereas the XQLFW dataset contains images of variable quality. There is a clear difference between the two distributions, with high quality images from the LFW dataset receiving quality scores higher than 0.5, while the mixed images from XQLFW receive much lower quality scores on average.

[1] B. Huang, M. Ramesh, T. Berg, and E. Learned-Miller “Labeled Faces in the Wild: A Database for Studying Face Recognition in Unconstrained Environments” University of Massachusetts, Amherst, Tech. Rep. 07-49, October 2007.
[2] M. Knoche, S. Hormann, and G. Rigoll “Cross-Quality LFW: A Database for Analyzing Cross-Resolution Image Face Recognition in Unconstrained Environments,” in Proceedings of the IEEE International Conference on Automatic Face and Gesture Recognition (FG), 2021, pp. 1–5.
Demo
NOTE: The provided demo uses ../face_detection_yunet for face detection, in order to properly align the face samples, while the original implementation uses a RetinaFace(ResNet50) model, which might cause some differences between the results of the two implementations.
To try the demo run the following commands:
# Assess the quality of 'image1'
python demo.py -i /path/to/image1
# Output all the arguments of the demo
python demo.py --help
Example outputs

The demo outputs the quality of the sample via terminal (print) and via image in results.jpg.
License
All files in this directory are licensed under CC-BY-4.0.
Files (10)
Related models
More from opencv
More models
No task type declared.