fast rcnn的安装与使用
大致来自于:
本文环境:ubuntu14.04
步骤如下:
1、确定你机器上安装有caffe,并且编译成功。安装过程可以参考博客中其他文章。
2、从githhub上下载程序:
可以使用:
# Make sure to clone with --recursive
git clone --recursive https://github.com/rbgirshick/fast-rcnn.git
3、更新:
git submodule update --init --recursive
4、编译cpython模块:
5、编译caffe和pycaffecd $FRCN_ROOT/lib make
6、下载作者编译好的模型:自己可以先不编译,你的硬件估计不够cd $FRCN_ROOT/caffe-fast-rcnn # Now follow the Caffe installation instructions here: # http://caffe.berkeleyvision.org/installation.html # If you're experienced with Caffe and have all of the requirements installed # and your Makefile.config in place, then simply do:(这步将你自己的caffe中makeFile.config文件拷贝过来) make -j8 && make pycaffe
7、运行demo程序cd $FRCN_ROOT ./data/scripts/fetch_fast_rcnn_models.sh
注:该程序中到proposals都存在mat中,若自己需要测试其他图像,需要先生存该文件,备选有:cd $FRCN_ROOT ./tools/demo.py若无cv2:apt-get install python-opencv
若无easydict:
sudo pip install easydict若显存不够,请在后面加--cpu
- Selective Search: original matlab code, python wrapper
- EdgeBoxes: matlab code
- GOP and LPO: python code
- MCG: matlab code
- RIGOR: matlab code
最终结果展示:
在ubuntu下没有插件,图片无法上传.
Demo for data/demo/000004.jpg
Detection took 68.442s for 2888 object proposals
All car detections with p(car | box) >= 0.8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo for data/demo/001551.jpg
Detection took 59.334s for 2057 object proposals
All sofa detections with p(sofa | box) >= 0.8
All tvmonitor detections with p(tvmonitor | box) >= 0.8
结果说明:在cpu下速度太慢,没有论文上那么快(毕竟人用到是k40,哈哈),demo中到效果相当不错。