zzdang / cascade_rcnn_gluon

Cascade R-CNN forked from gluon-cv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status GitHub license Code Coverage PyPI

| Installation | Documentation | Tutorials |

Cascade R-CNN

forked from gluon-cv

edited by Yuerong Chen and Ning Li

Benchmarking

  1. PASCAL VOC 2007 (Train/Test: 2007+2012trainval/2007test, shorter size: 600)
model #GPUs bs lr wd epoch decay AP50 AP75 AP AP Reference
VGG-RPN-baseline(pruned) 2 1   1e-3 5e-4 20 14 75 wait wait 42.9
VGG-RPN-cascade(pruned) 2 1   1e-3 5e-4 20 14 76.20 57.79 53.05 51.2
RESNET50-RPN-cascade 8 1   4e-3 5e-4 20 14 79.71 60.00 wait None
Res50-RFCN-Cascade 8 1 2e-3 1e-4 20 14 76.87 55.80 50.95 51.8
Res101-RFCN-Cascade 8 1 2e-3 1e-4 20 14 79.12 59.45 54.79 54.2
  1. MS-COCO (Train/Test: train2017/val2017, shorter size: 800 for FPN and 600 for the others)
model #GPUs bs epoch decay AP AP Reference
Res101-RFCN-Cascade     8 1   24 16 34.4 33.3

Developing Environment

MXNet 1.3.0

The repo is based on the 1.3.x version MXNet. You will probably need to go to the MXNet official github repo and compile it.

If your MXNet installed by using pip install(at least on August). It should be of MXNet version 1.2.x, which is too old for this repo. You might need to solve the related problems because of the version mismatch.

Installation

  1. Clone the cascade_rcnn_gluon repository, and we'll call the directory that you cloned cascade_rcnn_gluon into CASCADE_ROOT

    git clone https://github.com/zzdang/cascade_rcnn_gluon.git
  2. Build cascade_rcnn_gluon

    cd $CASCADE_ROOT/
    # Follow the gluon-cv installation instructions here:
    #   https://gluon-cv.mxnet.io/
    python setup.py install

Training Cascade-RCNN

  1. Get the training data

    # This will download the pascal_voc dataset
    python scripts/datasets/pascal_voc.py
  2. Download the pretrained models on ImageNet. For VGG-Net(we called vgg16_pruned), the FC layers are pruned and 2048 units per FC layer are remained. In addition, the two FC layers are copied three times for Cascade R-CNN training.

    # Download pre-trained model(You can download it use dropbox or baiduyun link)
    -[dropbox link](https://www.dropbox.com/s/tjgcwqgber2tlxh/VGG_16_fc2048_prune.params?dl=0)
    -[baiduyun link](https://pan.baidu.com/s/1RgG33zy40ssdWHdhPx0-Kg) passwd: b7ev  
    
    # copy the pre-trained models to $CASCADE_ROOT/models/
    cp /PATH/TO/DOWNLOAD/MODEL $CASCADE_ROOT/models/
    # convert the vgg16_pruned pretained params to vgg 16_pruned_cascade params
    python load_params.py
  3. training for Cascade-RCNN

    # training for pruned VGG16 
    python scripts/detection/cascade_rcnn/train_cascade_rcnn.py --network vgg16_pruned
  4. Testing Demo

    # testing for pruned VGG16 (VOC dataset)
    python scripts/detection/cascade_rcnn/demo_cascade_rcnn.py --network cascade_rcnn_vgg16_pruned_voc --pretrained /PATH/TO/TRAINED/MODEL

Training Cascade-RFCN

  1. training for Cascade-RFCN

    # training for resnet101_v1b
    python scripts/detection/cascade_rcnn/train_cascade_rfcn.py --network resnet101_v1b --lr 0.002 --wd 0.0001 --save-prefix ./models/ --gpus 0

Examples

To Do List

  • Train Cascade-RCNN with FPN backbone

About

Cascade R-CNN forked from gluon-cv

License:Apache License 2.0


Languages

Language:Python 99.7%Language:MATLAB 0.3%Language:Makefile 0.0%