Robert0812 / deepsaldet

Source code for our CVPR 2015 work on saliency detection by multi-context deep learning
70 stars 45 forks source link

Problem running on CPU machine #4

Open varadgunjal opened 9 years ago

varadgunjal commented 9 years ago

Got this error running on a CPU machine (which had Caffe installed earlier), after following all the steps listed -


F1015 23:31:27.377449  4597 common.cpp:53] CPU-only Mode
*** Check failure stack trace: ***
    @     0x7efe9b0e9dcd  google::LogMessage::Fail()
    @     0x7efe9b0ebfb2  google::LogMessage::SendToLog()
    @     0x7efe9b0e9953  google::LogMessage::Flush()
    @     0x7efe9b0ec8ad  google::LogMessageFatal::~LogMessageFatal()
    @           0x445960  caffe::Caffe::SetDevice()
    @           0x4108b4  feature_extraction_pipeline<>()
    @     0x7efe98661ec5  __libc_start_main
    @           0x40bdd7  (unknown)
Aborted (core dumped)
Traceback (most recent call last):
  File "predict_stage1.py", line 161, in <module>
    main()
  File "predict_stage1.py", line 138, in main
    outputs = leveldb2ndarray(dbfolder=leveldb_folder, num_feat=num_window, dim_feat=2)
  File "predict_stage1.py", line 42, in leveldb2ndarray
    dt.ParseFromString(db.Get('%d' %(idx)))
KeyError
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method UmfpackContext.new_del of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x7feaa8df2350>> ignored
cp: cannot stat ‘_tmp/smaps_sc/*’: No such file or directory

Any ideas what might be going wrong?

ShufengWang commented 8 years ago

i met this problem too, have you solved it?

varadgunjal commented 8 years ago

I did get it to build completely by making changes in the makefile to build Caffe with CPU instead of the default GPU - however it still gave a runtime error. Finally, the only way I got it to run without issue was running it on a GPU : ensure you have the appropriate paths set in the makefile. If you face issues running it on a GPU, I could help you. Good luck.

ShufengWang commented 8 years ago

i modified the makefile.config, and then i got another issues.

.build_release/lib/libcaffe.a(mcwindow_data_layer.o): In function caffe::MCWindowDataLayer<double>::InternalThreadEntry()': mcwindow_data_layer.cpp:(.text._ZN5caffe17MCWindowDataLayerIdE19InternalThreadEntryEv[_ZN5caffe17MCWindowDataLayerIdE19InternalThreadEntryEv]+0x33b): undefined reference tocv::imread(cv::String const&, int)' mcwindow_data_layer.cpp:(.text._ZN5caffe17MCWindowDataLayerIdE19InternalThreadEntryEv[_ZN5caffe17MCWindowDataLayerIdE19InternalThreadEntryEv]+0x4e4): undefined reference to cv::imread(cv::String const&, int)' .build_release/lib/libcaffe.a(mcwindow_data_layer.o): In functioncaffe::MCWindowDataLayer::InternalThreadEntry()': mcwindow_data_layer.cpp:(.text._ZN5caffe17MCWindowDataLayerIfE19InternalThreadEntryEv[_ZN5caffe17MCWindowDataLayerIfE19InternalThreadEntryEv]+0x330): undefined reference to cv::imread(cv::String const&, int)' mcwindow_data_layer.cpp:(.text._ZN5caffe17MCWindowDataLayerIfE19InternalThreadEntryEv[_ZN5caffe17MCWindowDataLayerIfE19InternalThreadEntryEv]+0x4d4): undefined reference tocv::imread(cv::String const&, int)'

do i need to modify the makefile? thank you!

varadgunjal commented 8 years ago

Based on the error you are getting

undefined reference tocv::imread(cv::String const&, int)

it looks like you don't have OpenCV installed correctly on your machine. Try getting it with sudo apt-get install python-opencv and then re-compiling. I would just like to repeat, you have a better chance of getting this to run with a GPU - if you don't have access to one, by all means continue trying on a CPU.

ShufengWang commented 8 years ago

thank you very much, i have solved the issue by adding the opencv_imgcodecs to LIBRARIES in the Makefile