You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cv2.resize() is sometimes called on a 0-pixel area; I've found this more likely to happen when faces are approaching the edges of an image.
I know this occurred occasionally while running Blazeface; I am unsure about other detection backends.
I would offer to add a check for this in a pull request, but there's also the question of what should be done if the detection area is 0 pixels. I assume a reasonable step would be to treat it as a false positive detection and skip over it.
In that case, the question then shifts to when that check for a 0-pixel area should be done.
The text was updated successfully, but these errors were encountered:
I believe the face detector should not return faces than have an area equal to 0 since arguable that's not a correct detection. As such I will prefer to keep the check on the face detector. You could add this to the core face detection class and apply the check to all detectors.
Feel free to make a pull request when you have the time.
In:
https://github.com/1adrianb/face-alignment/blob/master/face_alignment/utils.py#L127
When called by:
https://github.com/1adrianb/face-alignment/blob/master/face_alignment/api.py#L225
cv2.resize() is sometimes called on a 0-pixel area; I've found this more likely to happen when faces are approaching the edges of an image.
I know this occurred occasionally while running Blazeface; I am unsure about other detection backends.
I would offer to add a check for this in a pull request, but there's also the question of what should be done if the detection area is 0 pixels. I assume a reasonable step would be to treat it as a false positive detection and skip over it.
In that case, the question then shifts to when that check for a 0-pixel area should be done.
The text was updated successfully, but these errors were encountered: