Skip to content

ResNeSt Detectron2 + ADE20K SoTA + Ablation Study and ImageNet Training

Pre-release
Pre-release
Compare
Choose a tag to compare
@zhanghang1989 zhanghang1989 released this 25 Apr 22:15
· 24 commits to master since this release
939e303

ResNeSt 0.0.3

Detectron2-ResNeSt

See details in Detectron2-ResNeSt repo

Object Detection on MS-COCO validation set

Method Backbone mAP%
Faster R-CNN ResNet-50 39.25
ResNet-101 41.37
ResNeSt-50 (ours) 42.33
ResNeSt-101 (ours) 44.72
Cascade R-CNN ResNet-50 42.52
ResNet-101 44.03
ResNeSt-50 (ours) 45.41
ResNeSt-101 (ours) 47.50
ResNeSt-200 (ours) 49.03

Instance Segmentation

Method Backbone bbox mask
Mask R-CNN ResNet-50 39.97 36.05
ResNet-101 41.78 37.51
ResNeSt-50 (ours) 42.81 38.14
ResNeSt-101 (ours) 45.75 40.65
Cascade R-CNN ResNet-50 43.06 37.19
ResNet-101 44.79 38.52
ResNeSt-50 (ours) 46.19 39.55
ResNeSt-101 (ours) 48.30 41.56

Semantic Segmentation with New SoTA on ADE20K

Semantic Segmentation

Results on ADE20K

Method Backbone pixAcc% mIoU%
Deeplab-V3
ResNet-50 80.39 42.1
ResNet-101 81.11 44.14
ResNeSt-50 (ours) 81.17 45.12
ResNeSt-101 (ours) 82.07 46.91
ResNeSt-269 (ours) 82.62 47.60

Ablation Study Models

setting #P GFLOPs PyTorch Gluon
ResNeSt-50-fast 1s1x64d 26.3M 4.34 80.33 80.35
ResNeSt-50-fast 2s1x64d 27.5M 4.34 80.53 80.65
ResNeSt-50-fast 4s1x64d 31.9M 4.35 80.76 80.90
ResNeSt-50-fast 1s2x40d 25.9M 4.38 80.59 80.72
ResNeSt-50-fast 2s2x40d 26.9M 4.38 80.61 80.84
ResNeSt-50-fast 4s2x40d 30.4M 4.41 81.14 81.17
ResNeSt-50-fast 1s4x24d 25.7M 4.42 80.99 80.97

ImageNet Training with MXNet Gluon

Install MXNet with Horovod

# assuming you have CUDA 10.0 on your machine
pip install mxnet-cu100
HOROVOD_GPU_ALLREDUCE=NCCL pip install -v --no-cache-dir horovod
pip install --no-cache mpi4py

Prepare ImageNet recordio data format

  • Unfortunately ,this is required for training using MXNet Gluon. Please follow the GluonCV tutorial to prepare the data.

  • Copy the data into ramdisk (optional):

     cd ~/
     sudo mkdir -p /media/ramdisk
     sudo mount -t tmpfs -o size=200G tmpfs /media/ramdisk
     cp -r /home/ubuntu/data/ILSVRC2012/ /media/ramdisk
    

Training command

Using ResNeSt-50 as the target model:

horovodrun -np 64 --hostfile hosts python train.py \
--rec-train /media/ramdisk/ILSVRC2012/train.rec \
--rec-val /media/ramdisk/ILSVRC2012/val.rec \
--model resnest50 --lr 0.05 --num-epochs 270 --batch-size 128 \
--use-rec --dtype float32 --warmup-epochs 5 --last-gamma --no-wd \
--label-smoothing --mixup --save-dir params_ resnest50 \
--log-interval 50 --eval-frequency 5 --auto_aug --input-size 224

Verify pretrained model

python verify.py --model resnest50 --crop-size 224 --resume params_ resnest50/imagenet-resnest50-269.params