编译rbgirshick的py-faster-rcnn
来源:互联网 发布:网络政治参与图片 编辑:程序博客网 时间:2024/05/18 02:20
安装:
事先安装好anaconda2,opencv3.1,cuda8.0,cudnn5.1,参见点击打开链接
安装tensorflow:
pip install tensorflow_gpu-1.0.1-cp27-none-linux_x86_64.whl
安装faster-cnn:
1.Clone the Faster R-CNN repository:
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git
2.Build the Cython modules:
cd $FRCN_ROOT/libmake
3.Build Caffe and pycaffe:
cd $FRCN_ROOT/caffe-fast-rcnn
make -j8 && make pycaffe
makefile 见点击打开链接
makefile.config文件的修改如下:
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3
# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
# PYTHON_INCLUDE := /usr/include/python2.7 \
#/usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
ANACONDA_HOME := $(HOME)/Softwares/anaconda
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib
# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
#INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
#LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
问题:
1.与cudnn有关
rbgirshick的py-faster-rcnn实现,因为其cudnn实现为旧版本的实现,与系统所安装的cudnn的版本不一致。
解决办法:
1 .将./include/caffe/util/cudnn.hpp 换成最新版的caffe里的cudnn的实现,即相应的cudnn.hpp.
2. 将./include/caffe/layers里的,所有以cudnn开头的文件,例如cudnn_conv_layer.hpp。 都替换成最新版的caffe里的相应的同名文件。
3.将./src/caffe/layer里的,所有以cudnn开头的文件,例如cudnn_lrn_layer.cu,cudnn_pooling_layer.cpp,cudnn_sigmoid_layer.cu。
都替换成最新版的caffe里的相应的同名文件。
2.与google::protobuf有关
undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
解决办法:
下载protobuf-2.5.0手动编译安装,然后讲google这个文件夹拷贝到site-packages下面
3. /usr/bin/ld: cannot find -lxxx
意思是编译过程找不到对应库文件。其中,-lxxx表示链接库文件 libxxx.so。
解决办法:apt-get install libxxx-dev
关于数据集:
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tarwget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tarwget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCdevkit_08-Jun-2007.tar关于训练;
python ./tools/train_net.py --gpu 0 --solver models/pascal_voc/VGG16/fast_rcnn/solver.prototxt --iters 50000 --cfg experiments/cfgs/faster_rcnn_end2end.yml --imdb voc_2007_trainval
- 编译rbgirshick的py-faster-rcnn
- Run rbgirshick/py-faster-rcnn on ubuntu with gpu
- 编译py-faster-rcnn全过程
- py-Faster-RCNN在windows下的pycaffe编译
- 编译py-faster-rcnn的问题汇总及解决方法
- windows下编译py-faster-rcnn
- Windows+VS2015编译caffe+py-faster-rcnn
- Windows+VS2015编译caffe+py-faster-rcnn
- Faster RCNN 的py-faster-rcnn详细配置安装过程
- windows 下 编译py-faster-rcnn,py-rfcn, py-pva-frcn 下的lib。编译Cython模块
- 运行py-faster-rcnn遇到的问题
- py-faster-rcnn训练自己的数据
- Windows64 Py-Faster-RCNN的配置
- py-faster-rcnn 的常见错误
- Faster RCNN roidb.py
- Faster RCNN train_faster_rcnn_alt_opt.py
- Faster RCNN layer.py
- Faster RCNN train.py
- Python 排序算法小结
- C++ 修改图片格式(后缀)
- 池化
- 【App Store审核】因PLA1.2被拒事件频发,这篇干货或能帮你解决所有忧愁
- 磁盘io
- 编译rbgirshick的py-faster-rcnn
- 算法导论 练习题 13.1-2
- 15个高级Java多线程面试题及回答
- 欢迎使用CSDN-markdown编辑器
- XMind思维导图软件中的实用小功能
- 基于java+play的相关数据库的查询和多表查询问题
- ffmpeg rtsp
- sed与awk学习笔记(一)
- Java泛型详解