Dlib "Error deserializing object of type short"

Viewed 8588

I am getting error on pose_predictor = dlib.shape_predictor(predictor_model) on dlib python.

RuntimeError: Error deserializing object of type short
   while deserializing a floating point number.
   while deserializing a dlib::matrix
   while deserializing object of type std::vector
   while deserializing object of type std::vector
   while deserializing object of type std::vector
3 Answers

Download using command

wget -nd https://github.com/JeffTrain/selfie/raw/master/shape_predictor_68_face_landmarks.dat

when downloading from github download raw file instead of blob.

Hopefully this will help someone. I was using google colab and redownloading and reuploading did not work for me. So I cloned a git repo which had the shape predictor and used it's path

This is what I did

!git clone https://github.com/nicolasmetallo/eameo-faceswap-generator

cd eameo-faceswap-generator

Then change your shape predictor's path to

predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")

Then run your code

Related