You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we all know, the cascade structure is designed for R-CNN structure, so i just used the cascade structure based on DetNet to train and test on pascal voc dataset (DetNet is not only faster than fpn-resnet101, but also better than fpn-resnet101).
Based on DetNet_Pytorch, i mainly changed the forward function in fpn.py. It‘s just a naive implementation, so its speed is not fast.
Update
2019/01/01:
Fix bugs in demo, now you can run demo.py file. Note the default demo.py merely support pascal_voc categories. You need to change the pascal_classes in demo.py to adapt your own dataset. If you want to know more details, please see the usage part.
upload the pretrained DetNet59-Cascade which in below table.
Benchmarking
I benchmark this code thoroughly on pascal voc2007 and 07+12. Below are the results:
1). PASCAL VOC 2007 (Train/Test: 07trainval/07test, scale=600, ROI Align)
model(FPN)
GPUs
Batch Size
lr
lr_decay
max_epoch
Speed/epoch
Memory/GPU
AP
AP50
AP75
DetNet59
1 GTX 1080 (Ti)
2
1e-3
10
12
0.89hr
6137MB
44.8
76.1
46.2
DetNet59-Cascade
1 GTX 1080 (Ti)
2
1e-3
10
12
1.62hr
6629MB
48.9
75.9
53.0
2). PASCAL VOC 07+12 (Train/Test: 07+12trainval/07test, scale=600, ROI Align)
Pytorch 0.2.0 or higher(not support pytorch version >=0.4.0)
CUDA 8.0 or higher
tensorboardX
Data Preparation
VOC2007: Please follow the instructions in py-faster-rcnn to prepare VOC datasets. Actually, you can refer to any others. After downloading the data, creat softlinks in the folder data/.
VOC 07 + 12: Please follow the instructions in YuwenXiong/py-R-FCN . I think this instruction is more helpful to prepare VOC datasets.
Pretrained Model
You can download the detnet59 model which i trained on ImageNet from:
Compile the cuda dependencies using following simple commands:
cd lib
sh make.sh
It will compile all the modules you need, including NMS, ROI_Pooing, ROI_Align and ROI_Crop. The default version is compiled with Python 2.7, please compile by yourself if you are using a different python version.
Usage
If you want to use cascade structure, you must set --cascade and --cag in the below script. cag determine whether perform class_agnostic bbox regression.
Before run demo, you must make dictionary 'demo_images' and put images (VOC images) in it. You can download the pretrained model listed in above tables.