"OSError: [Errno 2] No such file or directory" in "R-CNN detection"
I am sorry I can't visit the group.google.com, so I show my question at here. Thank you!
Excuse me, I have a question about how to use R-CNN in Caffe, which trouble me for a serval days...
When I execute the command " python selective_search.py " or " 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 " I get the error message:
~~ 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 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 it, follows:
-
run demo.m
-
copy the folder to /caffe-master/python or /caffe-master/python/caffe
thank you!
@ouxinyu Hi, I encountered the exact same error, could you tell me what's wrong and how you fix it? Do I have to install matlab first? Thanks.
@zirohut yes,
- install matlab
- make matcaffe and make pycaffe, make sure all is ok
- copy 'selective_search_ijcv_with_python-master' to 'caffe-master/python/selective_search_ijcv_with_python' (there is no '-master' in use)
- run Demo.m in matlab
- all done, I think.
@ouxinyu OK, thank you very much. By the way, will there be some new files created after Demo.m that will be used in the detection afterwards? What is the purpose of running Demo.m? Thanks a lot.