yosinski / deep-visualization-toolbox

DeepVis Toolbox
http://yosinski.com/deepvis
MIT License
4.02k stars 924 forks source link

Unable to run deep-vis-toolbox in CentOS release 6.6 (Final) #62

Open riteshpradhan opened 8 years ago

riteshpradhan commented 8 years ago
  1. Compiled caffe and make runtest passed
screen shot 2016-08-03 at 11 52 58 am
  1. Compiled the deconv-deep-vis-toolbox branch of caffe
  2. make pycaffe (successful)
[rpradhan@darth caffe]$ make pycaffe
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
touch python/caffe/proto/__init__.py
PROTOC (python) src/caffe/proto/caffe.proto
  1. python -c "import scipy, cv2, skimage" (successful)
  2. ./run_toolbox.py

running toolbox messages

  1. Open CV installed with cmake -D WITH_GTK=ON
--   GUI:
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.24.23)
--     GThread :                    YES (ver 2.28.8)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO

But still I am unable to run the toolbox in centos-release-6-6.el6.centos.12.2.x86_64 .

yosinski commented 8 years ago

Hmmm... it seems like a problem with the way OpenCV was built for your system:

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp, line 483

In particular, it looks like it was built without support for the cv2.namedWindow function. Can you try this to see if it works?

$ python
>>> import numpy as np
>>> import cv2
>>> im = np.random.randint(0, 255, (128, 128, 3)).astype('uint8')
>>> cv2.namedWindow('foo')
>>> cv2.imshow('foo', im)
>>> cv2.waitKey(0)

If all is working, it should pop up a window with some random pixels.

riteshpradhan commented 8 years ago

Thanks for your reply.

I cannot get past cv2.namedWindow('..'). It gives me same error. I have installed opencv with GTK ON. May be I need to reinstall opencv. Will let you know after that.

Actually, I am running these command in remote server by accessing it with ssh -X -Y server@ip Is this due to the problem with X11 forwarding ?

yosinski commented 8 years ago

The toolbox can be run via X11 forwarding, though I wouldn't recommend it generally, as it will be rather slow. I think reinstalling opencv such that the namedWindow command works will be the best approach.