【Caffe】Python版本Faster R-CNN+ZF代码运行

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/tmylzq187/article/details/51952847

Python Github代码地址:https://github.com/rbgirshick/py-faster-rcnn

相关参考博客:

【1】http://blog.csdn.net/sinat_30071459/article/details/51332084

【2】http://www.cnblogs.com/CarryPotMan/p/5390336.html

【3】http://blog.csdn.net/samylee/article/details/51201744


下面是我自己在跑python版本Faster R-CNN代码ZF模型的流程:

1.git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git

2.进入py-faster-rcnn/lib  make

3.将make.config文件复制到py-faster-config/caffe-fast-rcnn中

   make.config文件及后面用到的VOC数据集及与训练模型imagenet下载地址为:http://pan.baidu.com/s/1slGgac9

4.在py-faster-config/caffe-fast-rcnn下

    make all

    make test (可不要)

    make runtest (可不要)

    make pycaffe


5.复制数据集VOCdevkit2007及与训练模型imagenet_modelst到py-faster-rcnn/data下

   或者 cd py-faster-rcnn下:  ./data/scripts/fetch_faster_rcnn_models.sh


6.在py-faster-rcnn/lib/fast-rcnn/train.py中增加/py-faster-rcnn/caffe-fast-rcnn/python的绝对路径:


7.更改迭代次数

   在py-faster-rcnn/tools/train_faster_rcnn_alt_opt.py中更改(这里我将原来的迭代次数缩小了100倍):



8.可能会出现内存溢出的问题,需要py-faster-rcnn/lib/faster-rcnn/config.py中的图片大小,论文中将最短边缩放到600 pixels,一般电脑吃不消,可以改为450 pixels,对应MAX_SIZE改为750,如下:



9.开始训练

在py-faster-rcnn下执行  ./experiments/scripts/faster_rcnn_alt_opt.sh 0 ZF pascal_voc

    

猜你喜欢

转载自blog.csdn.net/tmylzq187/article/details/51952847