ResNeSt: A ResNet Variant With Split-Attention Blocks, and What Its Repository Actually Ships
ResNeSt: Split-Attention Networks
At a glance
- What is it?
- ResNeSt is a drop-in ResNet replacement built on split-attention blocks, distributed as a pip package with pretrained weights and wrappers for Detectron2 and MMDetection. The interesting part is not the accuracy table but the fact that the PyTorch training path runs through an external toolkit, not this repository.
- Who is it for?
- Adopt ResNeSt if you need a pretrained ImageNet backbone that drops into an existing ResNet-shaped pipeline, particularly detection or segmentation work already on Detectron2 or MMDetection, and you accept that ImageNet training itself is documented through the external PyTorch Encoding Toolkit rather than this repository.
- 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 5 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 September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The Problem ResNeSt Targets: A Backbone Swap, Not a New Stack
Most teams that reach for ResNeSt are not looking for a new training framework. They already have a detection or segmentation pipeline with a ResNet backbone wired into it, and they want better features without rewriting the pipeline. ResNeSt is positioned exactly there. The README describes it as a ResNet variant and states that it boosts the performance of downstream models such as Mask R-CNN, Cascade R-CNN and DeepLabV3. That is the audience: engineers working on object detection, instance segmentation and semantic segmentation who can replace a backbone and keep the rest. The repository is Python, Apache-2.0 licensed, and published on PyPI as resnest. It is not archived, and the most recent push recorded for the repository is 2026-09-11, though the release history tells a different story about how actively artifacts are being cut.
Split-Attention: What Changes Inside the Block
The name in the paper title is the mechanism: split-attention networks. The repository does not reproduce the block diagram in text, so the architecture has to be read from the paper and the code rather than the README. What the README does establish is the shape of the deliverable. There are four published PyTorch variants, ResNeSt-50, ResNeSt-101, ResNeSt-200 and ResNeSt-269, each paired with a crop size: 224, 256, 320 and 416 respectively. The same four are listed with Gluon counterparts, and the reported ImageNet numbers are close between the two implementations, for example 81.03 for PyTorch ResNeSt-50 against 81.04 for Gluon. The README also notes that inference speed reported in the paper was measured using the Gluon implementation with RecordIO data. That note matters because it means the speed figures do not transfer directly to a PyTorch deployment reading raw JPEGs. If throughput is your deciding factor, the repository gives you no PyTorch speed table to work from.
Installing ResNeSt and Loading a Pretrained Backbone
There are two install paths in the README and they are presented as alternatives. Either install from the GitHub URL with pip install git+https://github.com/zhanghang1989/ResNeSt, or install from PyPI with pip install resnest --pre. The --pre flag is not incidental: the README links a PyPI pre-release badge for v0.0.6, and the release list shows v0.0.5 as the last stable-looking tag, dated 2020-06-28, with two weight-release steps in May 2021. Loading a model can be done through Torch Hub, where the README shows torch.hub.list('zhanghang1989/ResNeSt', force_reload=True) to enumerate models and torch.hub.load('zhanghang1989/ResNeSt', 'resnest50', pretrained=True) to fetch one. The package route is a plain import: from resnest.torch import resnest50, then resnest50(pretrained=True). A Gluon equivalent exists at resnest.gluon. The three routes are not equivalent in practice. Torch Hub pulls from the repository, the package pulls from PyPI, and the version you get depends on which you chose, which is worth pinning explicitly in a requirements file rather than leaving to a default.
Verifying the Claimed ImageNet Numbers Yourself
The repository does ship a way to check the published accuracies rather than take them on faith, and this is the most useful part of the README for a sceptical adopter. The flow is two steps. First prepare ImageNet in raw image format: cd scripts/dataset/ then python prepare_imagenet.py --download-dir ./ with the dataset already downloaded into that directory. The README points to the GluonCV tutorial for RecordIO format if you prefer it. Second, run the verification script for the framework you care about: cd scripts/torch/ then python verify.py --model resnest50 --crop-size 224, or the Gluon equivalent under scripts/gluon/. The crop size argument is not decorative: each variant has its own listed crop size, so resnest101 expects 256 and resnest269 expects 416. Passing the wrong crop size will not reproduce the table. Note that this verification path requires a full ImageNet copy, which is a substantial amount of storage and preparation before you learn anything.
Detection and Segmentation: Where the Integration Actually Lives
For detection work the README is explicit that a wrapper exists for training Detectron2 models with a ResNeSt backbone, located in the d2 directory, with training configs and pretrained models released. That is a separate fork, linked as detectron2-ResNeSt. For MMDetection, the README states the backbone has been adopted upstream and points at the resnest configs in that project. Semantic segmentation is split by framework: PyTorch models and training live in the PyTorch Encoding Toolkit, and Gluon models and training live in GluonCV. This is the structural fact that should shape your decision. The repository is a backbone distribution and a set of pointers. The training code for ImageNet is not here, and the README itself concedes that the PyTorch training route produces results slightly worse than the Gluon implementation. If you need to train from scratch in PyTorch, you are depending on a toolkit outside this repository.
Where ResNeSt Is the Wrong Choice
The release history is the first warning sign. The last tagged releases are the two weights steps from May 2021 and v0.0.5 from June 2020, even though the repository shows a much more recent push. A recent push does not mean new artifacts, and there is nothing in the supplied material describing what changed. The second limitation is the training gap already noted: ImageNet training in PyTorch is documented as living in the PyTorch Encoding Toolkit, and the README flags it as slightly worse than the Gluon path. If your workflow is Gluon, you are on the better-supported training route but in a framework with a smaller ecosystem for detection and segmentation than PyTorch. Third, the accuracy advantage narrows as you move to larger variants: the gap between ResNeSt-50 at 81.03 and ResNeSt-101 at 82.83 comes with a jump in crop size from 224 to 256 and a correspondingly larger model, so the cost is not linear. If your constraint is latency on a fixed input resolution, the small variants are the only ones that fit the 224 crop, and that is a real ceiling.
Alternatives and the Actual Difference in Approach
The obvious alternative is plain torchvision ResNet, and the difference is not just accuracy. A torchvision ResNet is maintained inside a framework you already depend on, with training recipes and versioning tied to PyTorch releases. ResNeSt gives you a different block design and pretrained weights, but pushes training and some downstream integration outward to forks and external toolkits. The trade is control for convenience. A second alternative, for detection specifically, is to stay on MMDetection's own backbone zoo: the README notes MMDetection adopted the ResNeSt backbone, so if you are already in MMDetection you can evaluate ResNeSt as one config change rather than a repository dependency, which is a materially lower-commitment way to test whether the accuracy is worth it for your data. Third-party ports exist for TensorFlow, Caffe and JAX per the README, but those are separate projects with their own maintenance status, and nothing in the supplied material describes how closely they track the reference implementation.
Licence, Maintenance Cost and What to Pin
The licence is Apache-2.0, which permits commercial use and modification with the usual attribution and notice requirements; this is a description of the licence identifier, not legal advice, and the patent grant and notice obligations should be read in the LICENSE file before shipping. Maintenance cost is the practical concern. Because the install path can be either a Git URL or a PyPI pre-release, the same requirements file can resolve to different code on different days. Pin the version explicitly and prefer the PyPI route if you want reproducible installs, since the Git URL tracks the default branch. The pretrained weights are distributed through GitHub Releases (the weights_step1 and weights_step2 tags), so an air-gapped or release-mirrored environment needs those artifacts staged separately. Expect the surrounding integration code, the Detectron2 fork and the Encoding Toolkit, to move on its own schedule rather than in lockstep with this repository.
Editorial conclusion
Adopt ResNeSt if you need a pretrained ImageNet backbone that drops into an existing ResNet-shaped pipeline, particularly detection or segmentation work already on Detectron2 or MMDetection, and you accept that ImageNet training itself is documented through the external PyTorch Encoding Toolkit rather than this repository. Do not adopt it if you need a maintained training framework inside the repo, a recent release cadence, or a backbone you can retrain end to end without leaving the codebase. Verify first that the pretrained weights download and that your torch version can load them, then run scripts/torch/verify.py --model resnest50 --crop-size 224 against a prepared ImageNet copy before committing to a swap.
Community notes