Faster R-CNN 配置

Main steps are from: https://github.com/ShaoqingRen/faster_rcnn, and there are some changes in Preparation step to make it more adaptive and clearer.  

Requirements:software

  1. Caffe build for Faster R-CNN (included in this repository, see external/caffe)
    • If you are using Windows, you may download a compiled mex file by running fetch_data/fetch_caffe_mex_windows_vs2013_cuda65.m
    • If you are using Linux or you want to compile for Windows, please follow the instructions on our Caffe branch.
  1. MATLAB
  2. CUDA
  3. Visual Studio

 

( I run the deep neural network withwindows10, matlab 2016a, cuda7.5, visual studio 2013 );

Requirements:hardware

GPU: Titan, Titan Black, Titan X, K20, K40,K80.

  1. Region Proposal Network (RPN)
    • 2GB GPU memory for ZF net
    • 5GB GPU memory for VGG-16 net
  2. Object Detection Network (Fast R-CNN)
    • 3GB GPU memory for ZF net
    • 8GB GPU memory for VGG-16 net

Preparation forTesting:

  1. Run fetch_data/fetch_caffe_mex_windows_vs2013_cuda65.m to download a compiled Caffe mex (for Windows only).
    1. In China, dowmload from BaiduYun  is a better choice. Unzip and move the file to ~\faster_rcnn-master\external. The final direct is as follows:
      1. ~\faster_rcnn-master\external\caffe\matlab\caffe_faster_rcnn
      2. ~\faster_rcnn-master\external\caffe\matlab\caffe_faster_rcnn_dbg
    1. If you using cuda6.5, you can operate as the readme file directly, otherwise when you run the demo it might report an error as follow:

"Invalid MEX-file '~\faster_rcnn-master\external\caffe\matlab\caffe_faster_rcnn\caffe_.mexw64':The specified

module could notbe found."

It is because the auther uses cuda6.5 while userschoose some different version. If you use cuda7.5, you can follow http://blog.csdn.net/Swordddddd/article/details/51555128.  However, if you apply a higher verion like8.0, you have to build the caffe yourself, refer to instructions.

 

  1. Run faster_rcnn_build.m
  2. Run startup.m

Testing Demo:

  1. Run fetch_data/fetch_faster_rcnn_final_model.m to download our trained models.
    1. In China, dowmload from BaiduYun is a better choice. Unzip and move the file to ~\faster_rcnn-master\output. Put test pictures (000456.jpg,  …) in root dir of  Faster R-CNN.
    2. Copy experiments/script_faster_rcnn_demo.m to the  root dir of  Faster R-CNN, and add a directory name 'faster_rcnn-master' to the path in script_faster_demo.m, line 6, before 'start up' .

 

  1. 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

 

Reference :

https://github.com/ShaoqingRen/faster_rcnn#introduction

http://blog.csdn.net/Swordddddd/article/details/51555128

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值