Open pradhole opened 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.
Hi @mdraw ,
--scalelim
argument is super helpful for face anonymization where there is certainty that faces do not become larger than a particular size in the mounted camera field of view (camera at a traffic signal). I cannot upload the images from project I am working on due to CDA; but there have been cases where large anonymization masks were created (false positives) which obscured large portion of field of view. These are created due to sensitive and variable lighting conditions where background is seen as face. I was able to prevent these large masks from being applied just by setting this optional value.--scorethresh
argument is used to tune applications of masks quicker as a second level of adjustment. The --thresh
argument can be compounded with --scorethresh
to drop masks with very low confidence to reduce amount of false positives in camera field of view.
I used these two additional arguments to make my anonymizations cleaner and as much as possible only applied to faces.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.
--thresh
value is preferable.Solution
--scorethresh
that can be tuned to throw out masks with lower scores.--scalelim
that can be tuned to throw out masks unrealistically large for the scene in consideration.