我在dlib python上的pose_predictor = dlib.shape_predictor(predictor_model)
上收到错误。
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
答案 0 :(得分:5)
我遇到了同样的问题,并尝试重新下载该文件,然后就可以了。
我是从。下载的 https://github.com/JeffTrain/selfie/blob/master/shape_predictor_68_face_landmarks.dat
答案 1 :(得分:0)
使用命令下载
wget -nd https://github.com/JeffTrain/selfie/raw/master/shape_predictor_68_face_landmarks.dat
从github下载时,下载原始文件而不是blob。
答案 2 :(得分:0)
希望这会对某人有所帮助。我正在使用 google colab,重新下载和重新上传对我不起作用。 所以我克隆了一个具有形状预测器的 git repo 并使用了它的路径
这是我做的
!git clone https://github.com/nicolasmetallo/eameo-faceswap-generator
cd eameo-faceswap-generator
然后将形状预测器的路径更改为
predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
然后运行你的代码