Reputation: 31
I am quite new at python programming. I am trying to run the sample code for dlib facial landmark detector. Unfortunately I got the following error:
Traceback (most recent call last):
File "facial_landmarks.py", line 109, in <module>
predictor = dlib.shape_predictor(predictor_path)
RuntimeError: Error deserializing object of type long
while deserializing a dlib::matrix
Does anyone have an idea how to solve it?
Upvotes: 2
Views: 2913
Reputation: 2087
The shape predictor for dlib is missing:
Download and extract the model for shape predicting (about 60 MB):
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -dk shape_predictor_68_face_landmarks.dat.bz2
The pass the the predictor file path as first argument to your Python script:
python facial_landmarks.py shape_predictor_68_face_landmarks.dat faces/*.jpg
A great walkthrough, on how to use dlib for facial landmark detection can be found here: http://www.learnopencv.com/facial-landmark-detection/
Upvotes: 2
Reputation: 2419
This message will be caused by one of the following:
Take a more detailed look at the dlib example itself: http://dlib.net/face_landmark_detection.py.html
Upvotes: 1