ResNeSt: a split-attention ResNet variant whose release list documents a URL change, not a version history
ResNeSt: Split-Attention Networks
At a glance
- What is it?
- ResNeSt ships the same backbone in a PyTorch and a Gluon implementation with pretrained weights and a verification script for each, but the repository that owns the network mostly points training elsewhere, versions its own builds with a date suffix, and keeps a test runner as a hard install requirement.
- Who is it for?
- Take ResNeSt when you want a drop-in backbone for Mask R-CNN, Cascade R-CNN or DeepLabV3 and do not want to write it yourself, since the pretrained weights, the Detectron2 wrapper and the MMDetection configs are what this project actually delivers. Three things to check first.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 73 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.
Star history
- zhanghang1989/ResNeSt3,258 ★ · -1
| Repository | 2026-09-11 | 2026-11-23 |
|---|---|---|
| zhanghang1989/ResNeSt | 3.3k | 3.3k |
-1 Stars in the last 73 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Without RELEASE set, a build appends today's date to version 0.0.6
The version string is computed at install time rather than declared:
version = '0.0.6'
try:
if not os.getenv('RELEASE'):
from datetime import date
today = date.today()
day = today.strftime("b%Y%m%d")
version += day
except Exception:
passThe condition is inverted from what a release scheme usually looks like. A clean release build, where RELEASE is present, keeps the plain 0.0.6, and every other build, the everyday case of installing from a checkout, gets today's date glued onto the end. The format string is the other old artefact: b before the year is the prefix Python 2 used for long integers, so a local install reports a version such as 0.0.6b20261005. Meanwhile the newest release tag is v0.0.5, so the source tree has already moved past the last thing anyone can install from the release list, and nothing in the repository marks which commit became which build.
The release list records a URL change and two workflow steps
Three releases are published, and none of them is a version of the code. Two are dated the same minute-range on 2021-05-17 and are named weights_step1 and weights_step2, with titles describing the first and second step of releasing model weights through GitHub Releases. They are the residue of working through a hosting tutorial, left in the release list where a version history should be. The third is v0.0.5 from 2020-06-28, titled ResNeSt All Wasabi Url, which records a change of download host and nothing else. What that produces is a release page that cannot answer the only question a user usually has, which published build corresponds to the source I am reading. The paper is dated 2020 and the homepage is its arXiv abstract, so the research artifact and the hosting history are both anchored well before the last push on 2026-09-11.
The version file is written only when setup.py runs as a script
The package does not keep a version file in the tree. One function generates it during setup:
def create_version_file():
global version, cwd
print('-- Building version ' + version)
version_path = os.path.join(cwd, 'resnest', 'version.py')
with open(version_path, 'w') as fh:
fh.write('"""This is resnest version file."""\n')
fh.write("__version__ = '{}'\n".format(version))That call sits below an if __name__ equals __main__ guard, which is the ordinary pattern for a setup script and also the only condition under which the file appears. A build path that imports setup.py rather than executing it produces no version.py, and the date suffix described above never reaches the installed package. The rest of the packaging is conventional: find_packages with scripts, examples and tests excluded, README.md read as the long description, Apache-2.0 declared, and package_data carrying only the LICENSE file inside the package directory.
nose is an install requirement while the tests directory is excluded
The requirement list is nine entries long, and one of them does not belong to inference:
requirements = [
'numpy',
'tqdm',
'nose',
'torch>=1.0.0',
'Pillow',
'scipy',
'requests',
'iopath',
'fvcore',
]Only torch carries a version bound, and it is a lower bound of 1.0.0, so the resolver is free to pair the backbone with whatever torch the machine already has, which is the right call for a library and also the one that makes a five-year-old torchvision a plausible outcome nobody planned. nose is the odd one: it is a test runner, it sits in install_requires rather than in an extras group, and the same call that installs it explicitly excludes tests from the distribution. So anyone who installs resnest gets a test framework and does not get the tests. Nothing else in the list is pinned, including numpy and scipy, which is consistent with a package whose point is to be a dependency rather than a pinned environment.
The verification path does not reproduce the paper's conditions
The project asks you to verify its own numbers, and tells you in one line why your numbers may differ:
**Note:** the inference speed reported in the paper are tested using Gluon implementation with RecordIO data.The dataset preparation step that follows uses raw image files instead, on the stated grounds of simplicity, with a pointer to the GluonCV tutorial for anyone who wants RecordIO. So the default verification route differs from the paper's route in both the implementation and the input format, and the accuracy table beside it reports two columns, PyTorch and Gluon, that agree to within a hundredth of a point at every depth: 81.03 against 81.04 at 224 crop for ResNeSt-50, 82.83 against 82.81 for the 101 model, 83.84 against 83.88 for the 200 model and 84.54 against 84.53 for the 269 model.
Each implementation gets one verify script and a model flag
Verification is two directories with the same shape. The dataset step is
cd scripts/dataset/
python prepare_imagenet.py --download-dir ./and each backend then runs its own script with the model name and crop size as arguments, first under scripts/torch and then under scripts/gluon, both invoked as python verify.py --model resnest50 --crop-size 224. The two flags are the whole interface: the model selector picks a depth from the pretrained table and the crop size is the value that table pairs with it, so 224 belongs to the 50 model and 416 to the 269 model. Weights themselves are not in the tree. Loading is done through torch.hub for the PyTorch side, where hubconf.py at the root registers the models, or by importing resnest50 from resnest.torch or from resnest.gluon and passing pretrained=True, which is where the download happens.
Training is delegated to four other repositories
The How to Train section points outward almost everywhere. ImageNet training with PyTorch goes to the PyTorch Encoding Toolkit at hangzhang.org, and the same page is named again for semantic segmentation, with the Gluon equivalent being the GluonCV model zoo. Detectron models are trained in a separate detectron2-ResNeSt fork rather than in this tree, and this repository contributes only a wrapper directory for training Detectron2 models with the backbone. MMDetection adopted the backbone through its own configuration directory. The one comparison the project makes between its own paths is an admission: the PyTorch Encoding route is described as slightly worse than the Gluon implementation. Read together with the table of contents, where all five entries are numbered 0, the picture is a project whose durable value is the backbone definition and the weights, with the training instructions maintained somewhere else.
Editorial conclusion
Take ResNeSt when you want a drop-in backbone for Mask R-CNN, Cascade R-CNN or DeepLabV3 and do not want to write it yourself, since the pretrained weights, the Detectron2 wrapper and the MMDetection configs are what this project actually delivers. Three things to check first. The verification path does not reproduce the paper's conditions, because the paper's speed numbers came from the Gluon implementation reading RecordIO data while the documented scripts read raw images, so a matching number is not the same as a correct comparison. Training is not here: the PyTorch Encoding Toolkit, GluonCV, the Detectron2 fork and MMDetection are four other places to read, and the project itself calls its PyTorch training route slightly worse than its Gluon one. And the packaging is dated: a build made without RELEASE set carries a date suffix on version 0.0.6, the newest tagged release is v0.0.5, and nose sits in the install requirements while the tests directory is excluded from the package.
Frequently asked questions
How do you load a pretrained ResNeSt model in PyTorch?
Either through Torch Hub, by calling torch.hub.load with the zhanghang1989/ResNeSt repository and a model name such as resnest50 with pretrained set, after torch.hub.list on the same repository returns the model list, or by importing resnest50 from resnest.torch and calling it with pretrained set. hubconf.py at the repository root is what registers the models for the Hub route.
How does ResNeSt install, and why does one command need a flag?
Two routes are documented and only one is needed: pip install git+https://github.com/zhanghang1989/ResNeSt from source, or pip install resnest --pre from the package index. The flag is needed because the published distribution is a pre-release. Separately, a build made without the RELEASE environment variable set appends today's date to version 0.0.6.
Which ResNeSt depths are available and what accuracy do they reach?
Four depths with pretrained weights: ResNeSt-50 at 224 crop, ResNeSt-101 at 256, ResNeSt-200 at 320 and ResNeSt-269 at 416. The table reports ImageNet figures for two implementations, and they agree closely: 81.03 and 81.04, 82.83 and 82.81, 83.84 and 83.88, and 84.54 and 84.53.
Which frameworks can use the ResNeSt backbone?
The repository ships PyTorch and Gluon implementations and points at third-party TensorFlow, Caffe and JAX ports. Downstream, the backbone is used through a Detectron2 wrapper directory in this tree, MMDetection configuration files, the PyTorch Encoding Toolkit for segmentation, and the GluonCV model zoo for the Gluon route.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/zhanghang1989-resnest)Star history chart for your README
[](https://hysenlabs.com/projects/zhanghang1989-resnest)Was this useful?