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

difficulties installing #86

Closed nyck33 closed 5 years ago

nyck33 commented 5 years ago
git checkout 2.0
Branch '2.0' set up to track remote branch '2.0' from 'origin'.
Switched to a new branch '2.0'
(deepgaze) nobu@gold3forever /media/nobu/Ubuntu Backup1/1DeepLearning/2pixelation/deepgaze (2.0) $ sudo python setup.py install --record record.txt
[sudo] password for nobu: 
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'
  warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/bayes_filter.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/cnn_head_pose_estimator.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/color_classification.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/color_detection.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/face_detection.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/face_landmark_detection.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/haar_cascade.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/head_pose_estimation.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/mask_analysis.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/motion_detection.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/motion_tracking.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/saliency_map.py -> build/lib.linux-x86_64-2.7/deepgaze
copying deepgaze/__init__.py -> build/lib.linux-x86_64-2.7/deepgaze
running install_lib
copying build/lib.linux-x86_64-2.7/deepgaze/bayes_filter.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/cnn_head_pose_estimator.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/color_classification.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/color_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/face_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/face_landmark_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/haar_cascade.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/head_pose_estimation.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/mask_analysis.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/motion_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/motion_tracking.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/saliency_map.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/__init__.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/bayes_filter.py to bayes_filter.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/cnn_head_pose_estimator.py to cnn_head_pose_estimator.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/color_classification.py to color_classification.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/color_detection.py to color_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/face_detection.py to face_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/face_landmark_detection.py to face_landmark_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/haar_cascade.py to haar_cascade.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/head_pose_estimation.py to head_pose_estimation.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/mask_analysis.py to mask_analysis.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/motion_detection.py to motion_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/motion_tracking.py to motion_tracking.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/saliency_map.py to saliency_map.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/__init__.py to __init__.pyc
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/deepgaze-0.1.egg-info
Writing /usr/local/lib/python2.7/dist-packages/deepgaze-0.1.egg-info
writing list of installed files to 'record.txt'
(deepgaze) nobu@gold3forever /media/nobu/Ubuntu Backup1/1DeepLearning/2pixelation/deepgaze (2.0) $ ls
build     doc  examples  README.md   setup.py
deepgaze  etc  LICENSE   record.txt  tests
(deepgaze) nobu@gold3forever /media/nobu/Ubuntu Backup1/1DeepLearning/2pixelation/deepgaze (2.0) $ cat record.txt
/usr/local/lib/python2.7/dist-packages/deepgaze/bayes_filter.py
/usr/local/lib/python2.7/dist-packages/deepgaze/cnn_head_pose_estimator.py
/usr/local/lib/python2.7/dist-packages/deepgaze/color_classification.py
/usr/local/lib/python2.7/dist-packages/deepgaze/color_detection.py
/usr/local/lib/python2.7/dist-packages/deepgaze/face_detection.py
/usr/local/lib/python2.7/dist-packages/deepgaze/face_landmark_detection.py
/usr/local/lib/python2.7/dist-packages/deepgaze/haar_cascade.py
/usr/local/lib/python2.7/dist-packages/deepgaze/head_pose_estimation.py
/usr/local/lib/python2.7/dist-packages/deepgaze/mask_analysis.py
/usr/local/lib/python2.7/dist-packages/deepgaze/motion_detection.py
/usr/local/lib/python2.7/dist-packages/deepgaze/motion_tracking.py
/usr/local/lib/python2.7/dist-packages/deepgaze/saliency_map.py
/usr/local/lib/python2.7/dist-packages/deepgaze/__init__.py
/usr/local/lib/python2.7/dist-packages/deepgaze/bayes_filter.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/cnn_head_pose_estimator.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/color_classification.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/color_detection.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/face_detection.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/face_landmark_detection.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/haar_cascade.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/head_pose_estimation.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/mask_analysis.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/motion_detection.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/motion_tracking.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/saliency_map.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze/__init__.pyc
/usr/local/lib/python2.7/dist-packages/deepgaze-0.1.egg-info

I get

ImportError: No module named 'deepgaze'

for both notebooks in branch 2.0, and for ex_cnn_head_pose_estimation.py.

I have looked into using master branch but hesitating since installing opencv ver 2 from source is complex.

Are there any quick fixes for above issues in branch 2.0?

mpatacchiola commented 5 years ago

This is a strange problem. It seems that python do not find the library. This may happen if you installed the library with python 2 and then try to run the module with python 3 (or viceversa). You may have multiple versions of python installed that are in conflict.

Try to explicitly install Deepgaze in this way (run the command from the main deepgaze folder where the file setup.py is located):

sudo python3 setup.py install

After doing this you can open python 3 in the same terminal with the command:

python3

Now in the python terminal just type the following command and then press enter:

import deepgaze

This should work without errors if the library has been correctly installed.

nyck33 commented 5 years ago

Thanks for the reply. I was installing in a Python 3 Conda env but I'll try again.

nyck33 commented 5 years ago

Steps to get it working:

  1. conda create -n myenv python=3.5
  2. git clone repo
  3. cd deepgaze and git checkout 2.0
  4. python3 setup.py install
  5. python3 to get into interactive mode and import deepgaze with no errors.

Also for step 5, 'python' and 'import deepgaze' was okay with no errors.