Skip to content

SCRFD issues #1518

@SthPhoenix

Description

@SthPhoenix

Hi! I'm testing your new SCRFD face detector and have noticed some issues with onnx inference code and network outputs:

  1. In scrfd.py line 275 you are filtering bboxes, but later at line 278 you return det, so max_num parameter have no effect and may cause exceptions.

  2. 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

  3. 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:
    1
    Original image size is 1200x1200.
    As you can see when detection is run with resize to 640x640 score is 0.38
    For 480x480 score is 0.86, and for 736x736 score is 0.07.
    Same behavior is noticed for both scrfd_10g_bnkps and scrfd_2.5g_bnkps models.
    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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions