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.08k stars 1.35k forks source link

Bounding box wasn't detect well #201

Closed leovn85 closed 4 years ago

leovn85 commented 4 years ago

Hi Adrian. First of all thank you for this amazing work !

Today, I used your project to detect face from some images, the face landmarks were detected well but there were some small cases that the bounding box didn't work well.

I've attached the screenshots from my work. And here is one example of image that the bounding box didn't work well: https://imgur.com/QHQMkBp

2020-08-17 22_56_43-Window

1adrianb commented 4 years ago

Hi, I am glad that you found it useful!

The SFD has some issues with high resolution images, if you can downsample it before passing it to the detector this will be both faster and likely more accurate. For example you could easily downsample that image 4x. Alternatively, can you also try using the blaze face detector to test if this improves your results? (e.g.: fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device='cpu', face_detector='blazeface') )

leovn85 commented 4 years ago

Thank you for your fast reply. I will try.