caffe icon indicating copy to clipboard operation
caffe copied to clipboard

caffe version r-cnn

Open hanklin3 opened this issue 12 years ago • 5 comments

I tried running this command but couldn't figure this issue for a few days...

sudo ../python/detect.py --crop_mode=selective_search --pretrained_model=imagenet/caffe_rcnn_imagenet_model --model_def=imagenet/rcnn_imagenet_deploy.prototxt --gpu --raw_scale=255 _temp/det_input.txt _temp/det_output.h5

selective_search_rcnn({'/home/hank/Projects/caffe/examples/images/fish-bike.jpg'}, '/tmp/tmpZ0B5zO.mat') Traceback (most recent call last): File "../python/detect.py", line 168, in main(sys.argv) File "../python/detect.py", line 139, in main detections = detector.detect_selective_search(inputs) File "/home/hank/Projects/caffe/python/caffe/detector.py", line 119, in detect_selective_search cmd='selective_search_rcnn' File "/usr/lib/python2.7/selective_search_ijcv_with_python/selective_search.py", line 39, in get_windows shlex.split(mc), stdout=open('/dev/null', 'w'), cwd=script_dirname) File "/usr/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

I'm running on Ubuntu 14, without cuda. (I had trouble installing optimus driver, with gtx 765m). so now I'm just testing on CPU any help would be grateful, thx!

hanklin3 avatar Sep 03 '14 18:09 hanklin3

Did you install and build the selective search pcode with MATLAB? Closing for discussion on the mailing list instead.

Ask installation and usage questions on the caffe-users mailing list.

shelhamer avatar Sep 03 '14 21:09 shelhamer

@hanklin3 hi, I get the same problem, and I couldn't figure this issus for seveal days too. Do you fixed it? And how to solved it? I am not sure if I am right with the info " run the demo in MATLAB to compile the necessary functions, then add it to your PYTHONPATH for importing". I just do ti follows:

  1. run demo.m
  2. copy the folder to /caffe-master/python or /caffe-master/python/caffe thank you!

ouxinyu avatar Oct 01 '14 08:10 ouxinyu

Hi, I asked the same question in:

https://groups.google.com/forum/#!searchin/caffe-users/caffe$2Fpython$2Fcaffe$2Fdetector.py|sort:relevance/caffe-users/TtxNVw3Vt0Y/ASlwNoh0CV0J

requote my own solution:

I figured out the problem finally. The command calls 'matlab' mc = "matlab -nojvm -r "try; {}; catch; exit; end; exit"".format(command)

but the problem is my 'matlab' command is not setup correctly in ubuntu, so I simply make it to the path of my matlab bin

Hope this helps!

hanklin3 avatar Oct 01 '14 16:10 hanklin3

@hanklin3 Excuse me, I have seen your commented several days ago, but I am not understand the means. Can you give me more detail about " make it to the path of my matlab bin" ? copy some files to matlab path? or ? thank you.

ouxinyu avatar Oct 02 '14 04:10 ouxinyu

basically when you type 'matlab' command in terminal, the matlab program should start. if not then the 'matlab' command is not setup correctly.

either you add the matlab bin folder to your system environment variable (~/.bashrc), or you change that line of code to where your matlab is installed: mc = "\pathtomatlab\bin\matlab -nojvm -r "try; {}; catch; exit; end; exit"".format(command)

Hope this helps!

hanklin3 avatar Oct 02 '14 16:10 hanklin3