Giter Club home page Giter Club logo

Comments (1)

coneypo avatar coneypo commented on May 30, 2024

Difference between shape_predictor_5_face_landmarks.dat and shape_predictor_68_face_landmarks.dat:

For 5:

  # This is a 5 point landmarking model which identifies the corners of the eyes and bottom of the nose.
  # It is trained on the dlib 5-point face landmark dataset, which consists of 7198 faces.
  # This model is designed to work well with dlib's HOG face detector and the CNN face detector (the one in mmod_human_face_detector.dat).

  predictor = dlib.shape_predictor("data/data_dlib/shape_predictor_5_face_landmarks.dat")
  shape = predictor(img_rd, faces[i])

For 68:

  # This is trained on the ibug 300-W dataset (https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/)
  # Also note that this model file is designed for use with dlib's HOG face detector.
  # That is, it expects the bounding boxes from the face detector to be aligned a certain way, the way dlib's HOG face detector does it.
  # It won't work as well when used with a face detector that produces differently aligned boxes,
  # such as the CNN based mmod_human_face_detector.dat face detector.

  predictor = dlib.shape_predictor("data/data_dlib/shape_predictor_68_face_landmarks.dat")
  shape = predictor(img_rd, faces[i])

So if it shows the Runtime Error with "The full_object_detection must use the iBUG 300W 68 point face landmark style", we need replace shape_predictor_5_face_landmarks.dat with shape_predictor_68_face_landmarks.dat.

from dlib_face_recognition_from_camera.

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.