opencv / opencv_zoo

Model Zoo For OpenCV DNN and Benchmarks.
Apache License 2.0
646 stars 191 forks source link

SFace: Quantized model is slower #248

Open yjpak0608 opened 7 months ago

yjpak0608 commented 7 months ago

Thank you for great work. I tested SFace recognition. Surprisingly, face_recognition_sface_2021dec_int8.onnx is slower about 50% than face_recognition_sface_2021dec.onnx. Is it normal? Initially I wanted to speed up this model by converting TF Lite. I wonder if this would be effective or not.

fengyuentau commented 7 months ago

Surprisingly, face_recognition_sface_2021dec_int8.onnx is slower about 50% than face_recognition_sface_2021dec.onnx.

OpenCV dnn supports int8 quantized models but is not optimized good enough for that. I would suggest using non quantized version if it meets your need.

MuskanYadavPro commented 3 months ago

The int8 version can be slower because of how it processes data. Converting to TF Lite might speed things up, especially on devices that work well with TF Lite.