选择参考:https://github.com/rbgirshick/fast-rcnn.git
本文参考:https://github.com/ShaoqingRen/faster-rcnn.git
另外有两个安装方法,可供参考,但是现在安装似乎就没那么复杂了,作者给了简便方法。
选择参考:http://blog.youkuaiyun.com/samylee/article/details/50965935
选择参考:http://blog.youkuaiyun.com/qq_30040223/article/details/48491997
Preparation for Testing:
Run fetch_data/fetch_caffe_mex_windows_vs2013_cuda65.m to download a compiled Caffe mex (for Windows only).
Run faster_rcnn_build.m
Run startup.m
Testing Demo:
Run fetch_data/fetch_faster_rcnn_final_model.m to download our trained models.
Run experiments/script_faster_rcnn_demo.m to test a single demo image.
You will see the timing information as below. We get the following running time on K40 @ 875 MHz and Intel Xeon CPU E5-2650 v2 @ 2.60GHz for the demo images with VGG-16:
001763.jpg (500x375): time 0.201s (resize+conv+proposal: 0.150s, nms+regionwise: 0.052s)
004545.jpg (500x375): time 0.201s (resize+conv+proposal: 0.151s, nms+regionwise: 0.050s)
000542.jpg (500x375): time 0.192s (resize+conv+proposal: 0.151s, nms+regionwise: 0.041s)
000456.jpg (500x375): time 0.202s (resize+conv+proposal: 0.152s, nms+regionwise: 0.050s)
001150.jpg (500x375): time 0.194s (resize+conv+proposal: 0.151s, nms+regionwise: 0.043s)
mean time: 0.198s
and with ZF net:
001763.jpg (500x375): time 0.061s (resize+conv+proposal: 0.032s, nms+regionwise: 0.029s)
004545.jpg (500x375): time 0.063s (resize+conv+proposal: 0.034s, nms+regionwise: 0.029s)
000542.jpg (500x375): time 0.052s (resize+conv+proposal: 0.034s, nms+regionwise: 0.018s)
000456.jpg (500x375): time 0.062s (resize+conv+proposal: 0.034s, nms+regionwise: 0.028s)
001150.jpg (500x375): time 0.058s (resize+conv+proposal: 0.034s, nms+regionwise: 0.023s)
mean time: 0.059s
The visual results might be different from those in the paper due to numerical variations.
Running time on other GPUs
GPU / mean time VGG-16 ZF
K40 198ms 59ms
Titan Black 174ms 56ms
Titan X 151ms 59ms
Preparation for Training:
Run fetch_data/fetch_model_ZF.m to download an ImageNet-pre-trained ZF net.
Run fetch_data/fetch_model_VGG16.m to download an ImageNet-pre-trained VGG-16 net.
Download VOC 2007 and 2012 data to ./datasets
Training:
Run experiments/script_faster_rcnn_VOC2007_ZF.m to train a model with ZF net. It runs four steps as follows:
Train RPN with conv layers tuned; compute RPN results on the train/test sets.
Train Fast R-CNN with conv layers tuned using step-1 RPN proposals; evaluate detection mAP.
Train RPN with conv layers fixed; compute RPN results on the train/test sets.
Train Fast R-CNN with conv layers fixed using step-3 RPN proposals; evaluate detection mAP.
Note: the entire training time is ~12 hours on K40.
Run experiments/script_faster_rcnn_VOC2007_VGG16.m to train a model with VGG net.
Note: the entire training time is ~2 days on K40.
Check other scripts in ./experiments for more settings.
因为在安装caffe时候已经安装了matlab了,所以现在的安装直接在命令行中执行即可
我是在putty上执行命令的,远程连接主机,用起来很方便。
在命令行中输入matlab来到matlab编辑界面,然后运行上面的命令注意,运行某个脚本时候只需要输入相应的名字就好,不需要加后缀。
比如:运行
startup.m
只需要输入
startup
即可。