opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.69k stars 55.61k forks source link

Add face detection model YuNet to the main repo #25457

Closed kaingwade closed 1 week ago

kaingwade commented 1 week ago

There is the FaceDetectorYN API for deep learning based face detection, and the related model is quite small, only 227 KB. The model is also frequently used. Therefore it is reasonable to add it to the main repo. But here are some thoughts:

  1. Where should the model be placed? In samples/data/ folder?

  2. Which version should be added: the original fp32 model or the quantized fp16 model?

Models Dataset fp32 acc fp16 acc
YuNet WIDERFace 0.88437(E), 0.86560(M), 0.75030(H) 0.88425(E), 0.86558(M), 0.75018(H)

The accuracies are quite close. Currently opencv_zoo hosts the original model and it's planned to replace it (and other models too) with the fp16 model in the future.

  1. Perhaps in the future tiny and popular dl models which have their specialized DNN API interface can be put to the main repo as well. A possible issue might be synchronizing the models in both the opencv repo and opencv_zoo repo.
ShiqiYu commented 1 week ago

I vote for FP16.

asmorkalov commented 1 week ago

Discussed and decided use the binary from zoo by link as we have it for now.