fast-rcnn的例子执行和selective search中遇到的问题及解决(二)

1.出现了EnvironmentError: MATLAB command ‘matlab’ not found.Please add ‘matlab’ to yourPATH.这种错误
原因:没有把matlab的路径添加到环境变量中
解决:设置环境变量 export PATH=$PATH:”/home/cl/install/MATLAB/bin”

2.这个问题在selective search的执行过程中出的问题。github上的那个用python调用MATLAB的例子。在执行那句调用MATLAB时报的错。
原因:MATLAB没起来。
问题:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
selective_search_rcnn({'/home/cl/examples/images/00001.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

解决:在~/.bashrc中添加你的matlab的bin路径(例如,我的是exportPATH=$PATH:”/home/cl/install/Matlab/bin”)。
记得source是没有用的,需要重启才可以

文章作者:Lily

原始链接:/2018/04/08/fast-rcnn%E7%9A%84%E4%BE%8B%E5%AD%90%E6%89%A7%E8%A1%8C%E5%92%8Cselective%20search%E4%B8%AD%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%EF%BC%88%E4%BA%8C%EF%BC%89/

版权说明:转载请保留原文链接及作者。