软件需求:
已经安装过caffe和pycaffe,也就是
# In your Makefile.config, make sure to have this line uncommentedWITH_PYTHON_LAYER := 1
硬件需求:
CaffeNet, VGG_CNN_M_1024 这样的小型网络需要至少3g的显存
VGG16 需要约11g显存,推荐k40
安装步骤:
1、
下载fast rcnn
# Make sure to clone with --recursivegit clone --recursive
https://github.com/rbgirshick/fast-rcnn.git
在我的资源里面也能找到完整的fast rcnn的包
2、
修改 Makefile.config ,一定要使用python层
WITH_PYTHON_LAYER := 1
3、
Build the Cython modules
cd $FRCN_ROOT/libmake
4、
cd $FRCN_ROOT/caffe-fast-rcnnmake -j8 && make pycaffe
如果出现层编译错误,建议使用单线程编译,去掉-j4
5、
下载预训练好的模型
cd $FRCN_ROOT./data/scripts/fetch_fast_rcnn_models.sh
6、
运行demo
cd $FRCN_ROOT./tools/demo.py
注意:demo运行的模型是在PASCAL VOC 2007数据集上训练的VGG16网络,如果你的gpu不够或者没够gpu可以使用一下命令进行调整
./tools/demo.py --net caffenet or with
--net vgg_cnn_m_1024.
Or run in CPU mode
./tools/demo.py --cpu