ternaus / retinaface

The remake of the https://github.com/biubug6/Pytorch_Retinaface
MIT License
393 stars 107 forks source link

Default parameter values #26

Open woctezuma opened 3 years ago

woctezuma commented 3 years ago

Hello,

Thank you for sharing this work as a PyPI package!

I have questions about default parameter values.

https://github.com/ternaus/retinaface/blob/29611c722ad400eed977b2df1816ddf914dbb2bf/retinaface/inference.py#L39-L43

Are these values recommended based on the training dataset and procedure of RetinaFace? Or are these values which worked best for you?

More specifically, I don't know which value for max_size to choose for my personal dataset of mixed photos and hand-drawn/computer-assisted artworks. I am analysing 300x450 images. So, maybe I should upsample them 2x, and go for 900 max size.

As for the confidence threshold, I would settle for something closer to 0.5 (or even less, to detect hand-drawn faces), and lower the NMS threshold as well (to avoid detecting too many boxes). I understand that it might not be the case for people using the detector on natural photography. Do you think it is a bad idea to lower the threshold?

woctezuma commented 3 years ago

Apparently, training data was 840x840 resolution.

https://github.com/ternaus/retinaface/blob/29611c722ad400eed977b2df1816ddf914dbb2bf/retinaface/configs/2020-07-20.yaml#L86