pyhon版faster-r-cnn搭建

1.https://github.com/rbgirshick/py-faster-rcnn

参考本链接,下载相应的Makefile.config,如果使用CPU则uncomment CPU := 1

注意python的版本,及以来的python第三方库。

如果使用Anaconda Python,还需要安装python-opencv,easydict,protobuf

Linux下安装python-opencv  http://blog.csdn.net/llp1992/article/details/50066983

Linux下安装easydict  下载https://pypi.python.org/pypi/easydict, python setup.py install

python版protobuf安装, http://www.cnblogs.com/chegnshi-coding/p/4457738.html

2. faster r-cnn CPU版本编译与运行

http://blog.sina.com.cn/s/blog_679f93560102wpyf.html

http://blog.csdn.net/wuzuyu365/article/details/51895255

(cpu版本容易出现如下错误:

ImportError: No module named gpu_nms
修改nms_wrapper.py,改force_cpu =True
[root@localhost py-faster-rcnn]# vi lib/fast_rcnn/nms_wrapper.py
def nms (dets, thresh, force_cpu =True):

3.Export设置python caffe路径,参考官网python caffe教程

vim /etc/profile
profile最后添加: export PYTHONPATH=/root/$CAFFE_ROOT/python:$PYTHONPATH
source /etc/profile
posted @ 2016-08-22 17:05  venus024  阅读(1864)  评论(0)    收藏  举报