-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Hi! I'm testing your new SCRFD face detector and have noticed some issues with onnx inference code and network outputs:
-
In scrfd.py line 275 you are filtering
bboxes, but later at line 278 you returndet, somax_numparameter have no effect and may cause exceptions. -
Later at line 335 you are calling detector without providing input shape, which wont work with model having dynamic shape. However it won't be an issue when called from
face_analysis.py -
I have noticed that detector returns very low scores or even fails on faces occupying >40% of image, it's especially visible for square shaped images, when there can't be provided additional padding during resize process. Also I have noticed that in such cases accuracy increases when lowering detection size (i.e. 480x480), and decreases when increasing it (i.e 1024x1024).
Here is an example of detection at 640x640 scale:

Original image size is 1200x1200.
As you can see when detection is run with resize to 640x640 score is 0.38
For480x480score is0.86, and for736x736score is0.07.
Same behavior is noticed for bothscrfd_10g_bnkpsandscrfd_2.5g_bnkpsmodels.
In some cases it might be fixed by adding fixed padding around image, but it might lead to decreased accuracy for other image types, so it can't be applied by default.
BTW: Thanks for your great work!