Releases: zhanghang1989/ResNeSt
Releases · zhanghang1989/ResNeSt
Releasing Model Weights via GitHub Release Step 2
Add ResNeSt 50, 101, 200, 269 MXNet Gluon Model Weights
Releasing Model Weights via GitHub Release Step 1
ResNeSt 50, 101, 200, 269 model & detectron2 backbones
ResNeSt All Wasabi Url
Change All Models Using Wasabi Url
ResNeSt PyTorch Wasabi Url
Update PyTorch S3 Url to Wasabi to save money.
ResNeSt Detectron2 + ADE20K SoTA + Ablation Study and ImageNet Training
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
- PyTorch models and training: Please visit PyTorch Encoding Toolkit.
- Training with Gluon: Please visit GluonCV Toolkit.
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
ResNeSt Pretrained Models on Pytorch and Gluon
Pretrained Models
crop size | PyTorch | Gluon | |
---|---|---|---|
ResNeSt-50 | 224 | 81.03 | 81.04 |
ResNeSt-101 | 256 | 82.83 | 82.81 |
ResNeSt-200 | 320 | 83.84 | 83.88 |
ResNeSt-269 | 416 | 84.54 | 84.53 |
PyTorch Models
- Load using Torch Hub
import torch
# get list of models
torch.hub.list('zhanghang1989/ResNeSt', force_reload=True)
# load pretrained models, using ResNeSt-50 as an example
net = torch.hub.load('zhanghang1989/ResNeSt', 'resnest50', pretrained=True)
- Load using python package
# using ResNeSt-50 as an example
from resnest.torch import resnest50
net = resnest50(pretrained=True)
Gluon Models
- Load pretrained model:
# using ResNeSt-50 as an example
from resnest.gluon import resnest50
net = resnest50(pretrained=True)