Closed tensor2flow closed 5 years ago
Hi @tensor2flow
This is an issue of compatibility between the version of OpenCV you have installed on your system and the version of OpenCV required by Deepgaze.
My suggestion is to switch to the version 2.0 of Deepgaze. Simply clone the repository and then checkout 2.0
to load the updated version. After this you can install again the library. Version 2.0 is compatible with both OpenCV 2 and 3.
(gpu) fridavs@fridavs-pc:~/Desktop/PC/deepgaze/examples$ python ex_pnp_head_pose_estimation_webcam.py The video source has been opened correctly... Estimated camera matrix: [[554.2563 0. 320. ] [ 0. 554.2563 240. ] [ 0. 0. 1. ]]
Traceback (most recent call last): File "ex_pnp_head_pose_estimation_webcam.py", line 321, in
main()
File "ex_pnp_head_pose_estimation_webcam.py", line 168, in main
my_cascade.findFace(gray, True, True, True, True, 1.10, 1.10, 1.15, 1.15, 40, 40, rotationAngleCCW=30, rotationAngleCW=-30, lastFaceType=my_cascade.face_type)
File "/home/fridavs/anaconda3/envs/gpu/lib/python3.7/site-packages/deepgaze/haar_cascade.py", line 88, in findFace
self._findFrontalFace(inputImg, frontalScaleFactor, minSizeX, minSizeY)
File "/home/fridavs/anaconda3/envs/gpu/lib/python3.7/site-packages/deepgaze/haar_cascade.py", line 149, in _findFrontalFace
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
AttributeError: module 'cv2.cv2' has no attribute 'cv'
(gpu) fridavs@fridavs-pc:~/Desktop/PC/deepgaze/examples$