1. 程式人生 > >Faster R-CNN-MXNet框架下的訓練與測試

Faster R-CNN-MXNet框架下的訓練與測試

(Mxnet官方版本中對Faster R-CNN的實現)

1 下載預訓練模型和資料集

進入example/rcnn資料夾

1) 安裝附加依賴的環境,其中會因為超時多次中斷

example/rcnn$:bash script/additional_deps.sh

2) 下載VOC資料集

example/rcnn$:bash script/get_voc.sh

包括:VOCtrainval_06-Nov-2007.tar

          VOCtest_06-Nov-2007.tar

          VOCtrainval_11-May-2012.tar

3) 下載預訓練模型

example/rcnn$: bashscript/get_pretrained_model.sh

4) 訓練及測試

example/rcnn$: bash script/vgg_voc07.sh 0,1(use gpu 0 and 1)

執行完之後會在rcnn資料夾中多出data和model兩個資料夾。

分別在資料集VOC07和VOC07+VOC12下訓練(example/rcnn$: bash script/vgg_voc0712.sh 0,1),並在VOC07的測試集下測試,mAP分別為69.7%和76.1%(論文中為69.9%和73.2%)。

2 測試

mxnet/example/rcnn$python demo.py --prefix final --epoch 0 --image myimage.jpg --gpu 0

000704.jpg前者檢測出person*2,horse*1,後者檢測出person*2,horse*2,bicycle*1