Package: resnest
ResNeStSplit-Attention Network, A New ResNet Variant. It significantly boosts the performance of downstream models such as Mask R-CNN, Cascade R-CNN and DeepLabV3.Table of ContentsPretrained ModelsTransfer Learning ModelsVerify Backbone ModelsHow to TrainReferencePypi / GitHub InstallInstall this package repo, note that you only need to choose one of the options# using github urlpipinstallgit+https://github.com/zhanghang1989/ResNeSt# using pypipipinstallresnest--prePretrained Modelscrop sizePyTorchGluonResNeSt-5022481.0381.04ResNeSt-10125682.8382.81ResNeSt-20032083.8483.88ResNeSt-26941684.5484.533rd party implementationsare available:Tensorflow,Caffe.Extra ablation study models are available inlinkPyTorch ModelsLoad using Torch Hubimporttorch# get list of modelstorch.hub.list('zhanghang1989/ResNeSt',force_reload=True)# load pretrained models, using ResNeSt-50 as an examplenet=torch.hub.load('zhanghang1989/ResNeSt','resnest50',pretrained=True)Load using python package# using ResNeSt-50 as an examplefromresnest.torchimportresnest50net=resnest50(pretrained=True)Gluon ModelsLoad pretrained model:# using ResNeSt-50 as an examplefromresnest.gluonimportresnest50net=resnest50(pretrained=True)Transfer Learning ModelsDetectron ModelsTraining code and pretrained models are released at ourDetectron2 Fork.Object Detection on MS-COCO validation setMethodBackbonemAP%Faster R-CNNResNet-5039.25ResNet-10141.37ResNeSt-50 (ours)42.33ResNeSt-101 (ours)44.72Cascade R-CNNResNet-5042.52ResNet-10144.03ResNeSt-50 (ours)45.41ResNeSt-101 (ours)47.50ResNeSt-200 (ours)49.03Instance SegmentationMethodBackbonebboxmaskMask R-CNNResNet-5039.9736.05ResNet-10141.7837.51ResNeSt-50 (ours)42.8138.14ResNeSt-101 (ours)45.7540.65Cascade R-CNNResNet-5043.0637.19ResNet-10144.7938.52ResNeSt-50 (ours)46.1939.55ResNeSt-101 (ours)48.3041.56ResNeSt-200 (w/ tricksours)50.5444.21ResNeSt-200-dcn (w/ tricksours)50.9144.5053.30*47.10*All of results are reported on COCO-2017 validation dataset. The values with * demonstrate the mutli-scale testing performance on the test-dev2019.Panoptic SegmentationBackbonebboxmaskPQResNeSt-20051.0043.6847.90Semantic SegmentationPyTorch models and training: Please visitPyTorch Encoding Toolkit.Training with Gluon: Please visitGluonCV Toolkit.Results on ADE20KMethodBackbonepixAcc%mIoU%Deeplab-V3ResNet-5080.3942.1ResNet-10181.1144.14ResNeSt-50 (ours)81.1745.12ResNeSt-101 (ours)82.0746.91ResNeSt-200 (ours)82.4548.36ResNeSt-269 (ours)82.6247.60Results on CityscapesMethodBackboneSplitw MapillarymIoU%Deeplab-V3+ResNeSt-200 (ours)Validationno82.7ResNeSt-200 (ours)Validationyes83.8ResNeSt-200 (ours)Testyes83.3Verify Backbone Models:Note:the inference speed reported in the paper are tested using Gluon implementation with RecordIO data.Prepare ImageNet dataset:Here we use raw image data format for simplicity, please followGluonCV tutorialif you would like to use RecordIO format.cdscripts/dataset/# assuming you have downloaded the dataset in the current folderpythonprepare_imagenet.py--download-dir./Torch Model# use resnest50 as an examplecdscripts/torch/
pythonverify.py--modelresnest50--crop-size224Gluon Model# use resnest50 as an examplecdscripts/gluon/
pythonverify.py--modelresnest50--crop-size224How to TrainImageNet ModelsTraining with MXNet Gluon: Please visitGluon folder.Training with PyTorch: Please visitPyTorch Encoding Toolkit(slightly worse than Gluon implementation).Detectron ModelsFor object detection and instance segmentation models, please visit ourdetectron2-ResNeSt fork.Semantic SegmentationTraining with PyTorch:Encoding Toolkit.Training with MXNet:GluonCV Toolkit.ReferenceResNeSt: Split-Attention Networks[arXiv]Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Muller, R. Manmatha, Mu Li and Alex Smola@article{zhang2020resnest,
title={ResNeSt: Split-Attention Networks},
author={Zhang, Hang and Wu, Chongruo and Zhang, Zhongyue and Zhu, Yi and Zhang, Zhi and Lin, Haibin and Sun, Yue and He, Tong and Muller, Jonas and Manmatha, R. and Li, Mu and Smola, Alexander},
journal={arXiv preprint arXiv:2004.08955},
year={2020}
}Major ContributorsResNeSt Backbone (Hang Zhang)Detectron Models (Chongruo Wu,Zhongyue Zhang)Semantic Segmentation (Yi Zhu)Distributed Training (Haibin Lin)