Unable to open dlib/shape_predictor_68_face_landmarks.dat
mrpasquali opened this issue · 7 comments
Hello,
How can I resolve the error Unable to open dlib/shape_predictor_68_face_landmarks.dat
when I run the command python python VisualizeLip.py --input sample_video.mp4 --output sample_video.mp4
?
Thank you!
Attention to your directory when you run the python script.
The dlib directory is in the root of this repo. So, either you should cd to the repo root, or copy the dlib folder (including the dat file) to the directory (e.g. code/lip_tracking) then run the command above.
Thank you, @Xiaokeai18. I copied the dlib folder as well as the date folder to the code/lip_tracking folder where Visualize.py
is. And even then, the same error remains unable to open dlib/shape_predictor_68_face_landmarks.dat
. Is the correct command python VisualizeLip.py --input sample_video.mp4 --output sample_video.mp4
to run?
@mrpasquali No, I used the absolute dir path of the output mp4.
python VisualizeLip.py --input id2_vcd_swwp2s.mpg --output /home/wp/GITHUB/lip-reading-deeplearning/code/lip_tracking/sample_video.mp4
Thanks, @Xiaokeai18. I did not get it yet. Does it work on a particular operating system like Ubuntu or Linux?
@mrpasquali For convience, I recomend to run it on ubuntu. However, I don't think it is the difference of operation system that causes this error. In contrast, you should check the code in VisualizeLip.py, espacially line 34 to 36:
predictor_path = 'dlib/shape_predictor_68_face_landmarks.dat'
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor(predictor_path)
Check is this set correctly. And then check is the file put in the right path.
I don't know where the problem exists exactly. You might need to ask other people.
Sorry about haven't address your question.
I am getting the same RuntimeError.
RuntimeError: Unable to open dlib/shape_predictor_68_face_landmarks.dat
RuntimeError: Unable to open dlib/shape_predictor_68_face_landmarks.dat
i am facing this error