Ubuntu14.04下Py-faster-rcnn在GPU下的配置编译
1.安装依赖项,cuda,cudnn等(cudnn的版本要和cuda版本匹配,下载网址https://developer.nvidia.com/cuda-toolkit和https://developer.nvidia.com/rdp/cudnn-download)
2.下载faster-rcnn
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git
3.安装cython和easydict
Sudo pip install cython
Sudo pip install easydict
然后编译cython,进入py-faster-rcnn/lib,make
4.修改makefile.config,将如下两行前的#去掉
USE_CUDNN := 1
WITH_PYTHON_LAYER := 1
5.需要将caffe-fast-rcnn中的一些cudnn文件替换掉,因为faster-rcnn使用的caffe版本比较老,下载一个新的caffe(git clone https://github.com/bvlc/caffe.git)
(1)将caffe-fast-rcnn/include/caffe/util/cudnn.hpp以最新版本caffe的相同文件代替。
(2)将caffe-fast-rcnn/include/caffe/layers中所有以cudnn开头的文件全部替换为最新版本。
(3)将caffe-fast-rcnn/src/caffe/layers所有以cudnn开头的文件全部替换为最新版本。
6.编译
Make -j8 && make pycaffe