Coder Social home page Coder Social logo

face_template values about facexlib HOT 5 CLOSED

xinntao avatar xinntao commented on May 22, 2024
face_template values

from facexlib.

Comments (5)

woctezuma avatar woctezuma commented on May 22, 2024 3

For FFHQ, the dlib library is used, so that face alignment is based on 68 landmarks. See: http://dlib.net/face_landmark_detection_ex.cpp.html

This example program shows how to find frontal human faces in an image and
estimate their pose. The pose takes the form of 68 landmarks. These are
points on the face such as the corners of the mouth, along the eyebrows, on
the eyes, and so forth.

The face detector we use is made using the classic Histogram of Oriented
Gradients (HOG) feature combined with a linear classifier, an image pyramid,
and sliding window detection scheme. The pose estimator was created by
using dlib's implementation of the paper:
One Millisecond Face Alignment with an Ensemble of Regression Trees by
Vahid Kazemi and Josephine Sullivan, CVPR 2014
and was trained on the iBUG 300-W face landmark dataset (see
https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/):
C. Sagonas, E. Antonakos, G, Tzimiropoulos, S. Zafeiriou, M. Pantic.
300 faces In-the-wild challenge: Database and results.
Image and Vision Computing (IMAVIS), Special Issue on Facial Landmark Localisation "In-The-Wild". 2016.
You can get the trained model file from:
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2.

So the use of 5 landmarks is not specific to FFHQ at all. I think I saw it first in RetinaFace:

from facexlib.

glennois avatar glennois commented on May 22, 2024 1

Perfect! Thank you so much for answering all my questions!

from facexlib.

woctezuma avatar woctezuma commented on May 22, 2024

These look like coordinates of five points.

See the comment above the line which you quoted:

standard 5 landmarks for FFHQ faces with 512 x 512

if self.template_3points:
self.face_template = np.array([[192, 240], [319, 240], [257, 371]])
else:
# standard 5 landmarks for FFHQ faces with 512 x 512
self.face_template = np.array([[192.98138, 239.94708], [318.90277, 240.1936], [256.63416, 314.01935],
[201.26117, 371.41043], [313.08905, 371.15118]])

See the 5 colored dots on this image:

Landmarks

https://github.com/biubug6/Pytorch_Retinaface

from facexlib.

glennois avatar glennois commented on May 22, 2024

Thanks Woctezuma! I see it says it's for FFHQ, can I use these with LFW?

I'm still learning... thank you.

from facexlib.

glennois avatar glennois commented on May 22, 2024

That comment got me worried 🤣

from facexlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.