ORB-HD / deface

Video anonymization by face detection
MIT License
684 stars 95 forks source link

Limit mask size to filter out unrealistic false positives #43

Open pradhole opened 1 year ago

pradhole commented 1 year ago

Solution

mdraw commented 1 year ago

Can you please give an example where these new options would be helpful, preferably with example images? I'm not sure if I understand the advantage over just tuning the --thresh value.

pradhole commented 1 year ago

Hi @mdraw ,

mdraw commented 1 year ago

Thanks for the explanation and sorry for the late reply. I understand that the --scalelim argument can be useful but it is still not clear to me what --scorethresh can achieve that --thresh can't. --thresh is applied directly on the heatmap output of the neural network model to filter out candidates with low scores here, before applying non-maximum-suppression (NMS): https://github.com/ORB-HD/deface/blob/master/deface/centerface.py#L138 --scorethresh is applied after NMS, so it doesn't have exactly the same effect, but to my understanding, everything that --scorethresh can filter can also be filtered by tuning the --thresh value, which also trades off the false positive/false negative ratio.