Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caffe version r-cnn #1030

Closed
hanklin3 opened this issue Sep 3, 2014 · 5 comments
Closed

caffe version r-cnn #1030

hanklin3 opened this issue Sep 3, 2014 · 5 comments

Comments

@hanklin3
Copy link

hanklin3 commented Sep 3, 2014

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!

@shelhamer
Copy link
Member

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.

@ouxinyu
Copy link

ouxinyu commented Oct 1, 2014

@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!

@hanklin3
Copy link
Author

hanklin3 commented Oct 1, 2014

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!

@ouxinyu
Copy link

ouxinyu commented Oct 2, 2014

@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.

@hanklin3
Copy link
Author

hanklin3 commented Oct 2, 2014

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants