首页 > 代码库 > faster-rcnn(testing): ubuntu14.04+caffe+cuda7.5+cudnn5.1.3+opencv3.0+matlabR2014a环境搭建记录
faster-rcnn(testing): ubuntu14.04+caffe+cuda7.5+cudnn5.1.3+opencv3.0+matlabR2014a环境搭建记录
python版本的faster-rcnn见我的另一篇博客:
py-faster-rcnn(running the demo): ubuntu14.04+caffe+cuda7.5+cudnn5.1.3+python2.7环境搭建记录
1. 首先需要配置编译caffe的环境,并降级gcc为4.7.见: ubuntu14.04下安装cudnn5.1.3,opencv3.0,编译caffe及matlab和python接口过程记录(不好意思,这也是我自己写的)
2. clone 源码:
git clone --recursive https://github.com/ShaoqingRen/faster_rcnn
3. clone 作者的caffe源码(记住一定要是作者的,不然运行matlab程序时会出错,我想这个道理应该很明白).不过这一步应该在上面的recursive clone做到了.
4. 在作者提供的百度云链接上下载训练好的模型,当然也可以"Run fetch_data/fetch_faster_rcnn_final_model.m
to download our trained models",不过速度会很慢.
5. 进入faster_rcnn/external/caffe,复制一份之前编译caffe时的Makefile.config,也可以复制当前文件夹下的Makefile.config.example,去掉.example后缀.
cd external/caffe
6. 修改Makefile.config文件,加入matlab路径.我的.config文件重要部分如下:
USE_CUDNN := 1 OPENCV_VERSION := 3CUDA_DIR := /usr/local/cudaBLAS := atlas MATLAB_DIR := /usr/local/MATLAB/R2014aANACONDA_HOME := $(HOME)/anaconda2PYTHON_INCLUDE := $(ANACONDA_HOME)/include $(ANACONDA_HOME)/include/python2.7 $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include PYTHON_LIB := $(ANACONDA_HOME)/libINCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/includeLIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib USE_PKG_CONFIG := 1
7 开始编译caffe和matlab接口
make cleanmake -j8make matcaffe
8 按照作者提供的testing步骤跑demo:
- Run
faster_rcnn_build.m
- Run
startup.m
- Run
experiments/script_faster_rcnn_demo.m
to test a single demo image.
9 到此,算是功德圆满.大致结果如下:
faster-rcnn(testing): ubuntu14.04+caffe+cuda7.5+cudnn5.1.3+opencv3.0+matlabR2014a环境搭建记录