mpatacchiola / deepgaze

Computer Vision library for human-computer interaction. It implements Head Pose and Gaze Direction Estimation Using Convolutional Neural Networks, Skin Detection through Backprojection, Motion Detection and Tracking, Saliency Map.
MIT License
1.79k stars 478 forks source link

Missing haar landmark file #63

Closed 8enmann closed 6 years ago

8enmann commented 6 years ago
xvfb-run -s "-screen 0 140
0x900x24" python ex_dlib_pnp_head_pose_estimation_video.py ../../data/1.mp4 ./output.avi
Estimated camera matrix:
[[0. 0. 0.]
 [0. 0. 0.]
 [0. 0. 1.]]

Traceback (most recent call last):
  File "ex_dlib_pnp_head_pose_estimation_video.py", line 213, in <module>
    main()
  File "ex_dlib_pnp_head_pose_estimation_video.py", line 139, in main
    my_detector = faceLandmarkDetection('./etc/shape_predictor_68_face_landmarks.dat')
  File "/home/ben/anaconda3/envs/deepgaze/lib/python2.7/site-packages/deepgaze/face_landmark_detection.py", line
 35, in __init__
    raise ValueError('haarCascade: the files specified do not exist.')
ValueError: haarCascade: the files specified do not exist.
8enmann commented 6 years ago

Looks like the correct paths are: my_cascade = HaarFaceDetector("../etc/xml/haarcascade_frontalface_alt.xml", "../etc/xml/haarcascade_profileface.xml") and .dat file in the next line from wget dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 bzip2 -d shape_predictor_68_face_landmarks.dat.bz2

mpatacchiola commented 6 years ago

Thank you for pointing that out. I added a warning if the file dat is missing. The path of the XML files has also been fixed.