# Best free/production-grade model for simple face-detection (yes/no + confidence) in a Python microservice?

> Source: <https://discuss.huggingface.co/t/best-free-production-grade-model-for-simple-face-detection-yes-no-confidence-in-a-python-microservice/180012#post_3>
> Published: 2026-09-08 09:10:56+00:00

Thanks for the recommendation! I followed your suggestion and benchmarked YuNet against RetinaFace and MTCNN on my dataset.

The results were quite interesting. YuNet performed the best overall for my use case. At a confidence threshold of 0.8, YuNet achieved 97.67% accuracy, 95.45% precision, 100% recall, and a 97.67% F1 score, with only 1 false positive out of 43 images.

I also measured inference time on CPU. YuNet averaged around 11.6 ms per image, compared with about 175 ms for MTCNN and approximately 1051 ms for RetinaFace. So YuNet was roughly 15× faster than MTCNN and 90× faster than RetinaFace in my testing.

I also tested different confidence thresholds. Interestingly, 0.8 gave the best balance for my current dataset, while 0.9 eliminated the false positive but started missing actual faces. This also reinforced your point that the confidence score shouldn’t automatically be interpreted as a calibrated probability.

The dataset is still small (43 images), so I don’t consider these production-level accuracy numbers yet. My next step is to test YuNet on a much larger and more diverse dataset and determine the final threshold based on the acceptable false-positive/false-negative tradeoff.

Thanks again — your suggestion to start with YuNet was very helpful!
