1. 程式人生 > >faster-rcnn配置和訓練小結

faster-rcnn配置和訓練小結

論文:http://arxiv.org/abs/1506.01497

1.準備工作

類似於fast-rcnn

http://blog.csdn.net/u010678153/article/details/46892911

2.安裝(用於demo

2.1 githubclonepy-faster-rcnn的庫。
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git

2.2建立模組

cd py-faster-rcnn/lib/
make

2.3 生成Caffepycaffe

cd $py-faster-rcnn/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: make -j8 && make pycaffe

2.4 下載Faster RCNN檢測器

cd $py-faster-rcnn
./data/scripts/fetch_faster_rcnn_models.sh

3.執行demo

如果報錯可以看下是否支援vgg網路的視訊記憶體以及demo裡網路模型路徑

cd py-faster-rcnn/

./tools/demo.py

4.訓練

cd py-faster-rcnn/

./tools/train_faster_rcnn_alt_opt.py

一些可能根據自己的需要所修改的地方:

./tools/train_faster_rcnn_alt_opt.py

      parse_args()中weights的路徑等引數,

      最大迭代次數max_iters = [80000, 40000, 80000, 40000]

./lib/datasets

     如果你的groundtruth和我一樣並非xml檔案,pascal_voc.py,imdb.py,factory.py修改成自己所需要的讀入方式

     如果有,可以照搬fast-rcnn的修改模式

./models/ZF/faster_rcnn_alt_opt (我用的zf模型)