Skip to main content

ResNeSt

Project description

PyPI PyPI Pre-release Upload Python Package Downloads License

ResNeSt

Split-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 Contents

  1. Pretrained Models
  2. Transfer Learning Models
  3. Verify Models
  4. How to Train
  5. Reference

Pypi / GitHub Install

  1. Install this package repo, note that you only need to choose one of the options
# using github url
pip install git+https://github.com/zhanghang1989/ResNeSt

# using pypi
pip install resnest --pre

Pretrained Models

crop size PyTorch Gluon
ResNeSt-50 224 81.03 81.14
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)

Transfer Learning Models

Detectron Models

Training code and pretrained models are coming soon.

  • Object Detection
Method Backbone mAP%
Faster R-CNN ResNet-50 38.5
ResNet-101 41.2
ResNeSt-50 (ours) 41.4
ResNeSt-101 (ours) 43.8
Cascade R-CNN ResNet-50 42.52
ResNet-101 44.03
ResNeSt-50 (ours) 45.41
ResNeSt-101 (ours) 47.5
  • 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

Training code and pretrained models are coming soon.

  • 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

Verify 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 follow GluonCV tutorial if you would like to use RecordIO format.

cd scripts/dataset/
# assuming you have downloaded the dataset in the current folder
python prepare_imagenet.py --download-dir ./

Torch Model

# use resnest50 as an example
cd scripts/torch/
python verify.py --model resnest50 --crop-size 224

Gluon Model

# use resnest50 as an example
cd scripts/gluon/
python verify.py --model resnest50 --crop-size 224

How to Train

Coming Soon.

Reference

ResNeSt: 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},
year={2020}
}

Major Contributors

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resnest-0.0.2b6042020.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

resnest-0.0.2b6042020-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file resnest-0.0.2b6042020.tar.gz.

File metadata

  • Download URL: resnest-0.0.2b6042020.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for resnest-0.0.2b6042020.tar.gz
Algorithm Hash digest
SHA256 ad1ccd93a9980d00a9cd5474e25515756a2bd03c21e0cbb1d84d067570f3ab22
MD5 0f9822d1cbcaa33de946461c3be4ab9f
BLAKE2b-256 e7d263ec505f6e0edfbc19fef5252ce1c1dcf63573b9658c3f3617b2b8083187

See more details on using hashes here.

File details

Details for the file resnest-0.0.2b6042020-py3-none-any.whl.

File metadata

  • Download URL: resnest-0.0.2b6042020-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for resnest-0.0.2b6042020-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb3c9850fe47bcbadc615c95b48b84bd6a73e210e56e88c7c114962d1c8167e
MD5 695819930118b7f44d03e566362ac316
BLAKE2b-256 84887367b89d4527c357d6df875f2cd04e64a6165958df85b6915900cc816f85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page