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

How crop face according outline of face? #125

Closed lucasjinreal closed 5 years ago

lucasjinreal commented 5 years ago

Hi, thanks for your wonderful repo. May I ask a question about my attempt?

I want crop a face out of 2d image. Based on the ouline of face (simply I already get the face rect, but it has background, I wanna crop the face and remove the background or vise-verse.

Can it be done this this repo? Thanks in advance

1adrianb commented 5 years ago

Hi @jinfagang sorry for delay. Depends on what you need exactly. The method provides 68 points points located on the face and the edge of the face (see the images from the readme). Note: you need to run the method in 2D mode in order to obtain them in the configuration you need. However please note that there are no points located on the forehead.