You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
face_descriptor = facerec.compute_face_descriptor(img_gray, shape)
RuntimeError: The full_object_detection must use the iBUG 300W 68 point face landmark style.
Reason:
Casued by Dlib version
Solution:
Apply this patch: c277dbb
(Replace "shape_predictor_5_face_landmarks.dat" with "shape_predictor_68_face_landmarks.dat" in face_reco.py)
The text was updated successfully, but these errors were encountered:
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.
Error log:
face_descriptor = facerec.compute_face_descriptor(img_gray, shape)
RuntimeError: The full_object_detection must use the iBUG 300W 68 point face landmark style.
Reason:
Casued by Dlib version
Solution:
Apply this patch: c277dbb
(Replace "shape_predictor_5_face_landmarks.dat" with "shape_predictor_68_face_landmarks.dat" in face_reco.py)
The text was updated successfully, but these errors were encountered: