1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
7.05k stars 1.34k forks source link

Bad failures cases on easy images #127

Closed Xavier31 closed 3 years ago

Xavier31 commented 5 years ago

Hi Adrian. First of all thank you for this amazing work ! I am using the pre-trained model that you provide (Large) with the SFD face detector. I am testing on a in the wild dataset and i usually have good results. However, i also obtained quite a lot of strange failures on frontal, rather easy images, like the ones attached. Does it seems like a normal behaviour to you ? I tried in 2D and 3D. Also, results are very different from one run to another. Where does that come from ? I am using pytorch 1.0 on the cpu on windows10 Thanks frame0089 frame0124 frame0127

These images are perfectly detected using the non deep learning face detection and landmarks from dlib (dlib own face detector and ERT from Kazemi)

1adrianb commented 5 years ago

Hi @Xavier31,

Could you please try to plot also the bounding boxes? It looks to me that the face detector may have failed somehow. Can you also attach the original images that you pass to the network please? I will check to see what may have caused this since this should not happen, given how easy the images are (on a linux however, tho there should be no difference really). Thanks!

Xavier31 commented 5 years ago

Adrian, thank you for your answer. This is indeed a problem of face detection, my build of SFD seems to be unstable. I tried 2DFan with dlib's face detection and results are ok. I have a fair share of images (10% of my database) that have face detection problems (no detection on very easy images, strange false alarms, bounding boxes completly off). I noticed this happens only for the largest ones. When I resize these images to a smaller resolution, it works. But this is not systematic as some large images also have ok results. Are there any assumptions in SFD about the resolution ?

BTW, if I have more than one face bounding box, I am taking the box with the largest area. Attached some examples of wrong bounding boxes with SFD. I am sending some original images by email. Thanks

frame0089 frame0124