Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyPI PyPI Pre-release PyPI Nightly Downloads License Unit Test arXiv

PWC PWC PWC PWC PWC PWC

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 ImageNet Results
  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.04
ResNeSt-101 256 82.83 82.81
ResNeSt-200 320 83.84 83.88
ResNeSt-269 416 84.54 84.53
  • 3rd party implementations are available: Tensorflow, Caffe, JAX.

  • Extra ablation study models are available in link

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

Detectron2

We provide a wrapper for training Detectron2 models with ResNeSt backbone at d2. Training configs and pretrained models are released. See details in d2.

MMDetection

The ResNeSt backbone has been adopted by MMDetection.

Semantic Segmentation

Verify ImageNet Results:

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

ImageNet Models

Detectron Models

For object detection and instance segmentation models, please visit our detectron2-ResNeSt fork.

Semantic Segmentation

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

Major Contributors

Metadata

Release files for resnest 0.0.6b20220413

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for resnest 0.0.6b20220413
File Size Uploaded
resnest-0.0.6b20220413.tar.gz 36.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for resnest 0.0.6b20220413
File Interpreter ABI Platform
resnest-0.0.6b20220413-py3-none-any.whl Python 3 none any Details

Total release size: 85.1 kB

Release files / resnest-0.0.6b20220413.tar.gz

Download URL resnest-0.0.6b20220413.tar.gz
Size 36.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d5e82a3788eea8c5118bf7e9a523783fa06821f79baf9b6848473ad99229a9c8
BLAKE2b-256 checksum
How to use checksums
fef7e05ef31a4767da5ff947ea3e2f88f17c302967f9f68668e49626c71e0635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.7.12

Release files / resnest-0.0.6b20220413-py3-none-any.whl

Download URL resnest-0.0.6b20220413-py3-none-any.whl
Size 49.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b6cab67a5c9375c2d13f1ddce6a7d6eaede43d5a25ce610641fa3d63532c89b
BLAKE2b-256 checksum
How to use checksums
9c3d612a4a8179b29abc7bf88d92e0a63be7961ccddaf6f4c44d10658c2e117f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.7.12

Release history Release notifications | RSS feed

This release

0.0.6b20220413 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page