1adrianb / face-alignment

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

some face landmarks have negative value on y-axis & return difference between face_detector and get_landmark #204

Closed Tristan-J closed 3 years ago

Tristan-J commented 3 years ago

Hi, when I was dealing with some image, I found the ordinates of some landmarks are negative. And also, if the return is fa.face_detector.detect_from_image, the area is not always the same with the outline of landmarks. So how do you decide the area of faces? Thanks.

1adrianb commented 3 years ago

If the landmark estimator believes one of the points is located outside the boundaries of the images, its values can be negative. The face detector is just used to get a region of the face, it will not confine the landmark to be within that region. This will not be desired in general since the face detector may sometimes cut portions of the face.

Tristan-J commented 3 years ago

@1adrianb Thanks for your reply, that's helpful to me.