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 to detect face #105

Closed bikekowal closed 6 years ago

bikekowal commented 6 years ago

Hi,

Maybe answer to my question is very simple, but actually I couldn't do it. How to detect face, or get coordinates of the bounding box of a face?

1adrianb commented 6 years ago

Hi @bikekowal,

The code by default easily exposes only the face alignment part, despite duing also a face detection in the process (if required).

However you can find an example on how to call it here: https://github.com/1adrianb/face-alignment/blob/3750f83b4d7bf3f4ba6318e40a4292e1aeb241a4/face_alignment/api.py#L171

Alternatively, you can compute a bounding box based on the fitted landmarks.