Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resnest

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resnest

ResNeSt

  • 0.0.5
  • PyPI
  • Socket score

Maintainers
1

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 Backbone 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 sizePyTorchGluon
ResNeSt-5022481.0381.04
ResNeSt-10125682.8382.81
ResNeSt-20032083.8483.88
ResNeSt-26941684.5484.53
  • 3rd party implementations are available: Tensorflow, Caffe.

  • 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

Detectron Models

Training code and pretrained models are released at our Detectron2 Fork.

Object Detection on MS-COCO validation set
MethodBackbonemAP%
Faster R-CNNResNet-5039.25
ResNet-10141.37
ResNeSt-50 (ours)42.33
ResNeSt-101 (ours)44.72
Cascade R-CNNResNet-5042.52
ResNet-10144.03
ResNeSt-50 (ours)45.41
ResNeSt-101 (ours)47.50
ResNeSt-200 (ours)49.03
Instance Segmentation
MethodBackbonebboxmask
Mask R-CNNResNet-5039.9736.05
ResNet-10141.7837.51
ResNeSt-50 (ours)42.8138.14
ResNeSt-101 (ours)45.7540.65
Cascade R-CNNResNet-5043.0637.19
ResNet-10144.7938.52
ResNeSt-50 (ours)46.1939.55
ResNeSt-101 (ours)48.3041.56
ResNeSt-200 (w/ tricks ours)50.5444.21
ResNeSt-200-dcn (w/ tricks ours)50.9144.50
53.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 Segmentation

BackbonebboxmaskPQ
ResNeSt-20051.0043.6847.90

Semantic Segmentation

Results on ADE20K
MethodBackbonepixAcc%mIoU%
Deeplab-V3
ResNet-5080.3942.1
ResNet-10181.1144.14
ResNeSt-50 (ours)81.1745.12
ResNeSt-101 (ours)82.0746.91
ResNeSt-200 (ours)82.4548.36
ResNeSt-269 (ours)82.6247.60
Results on Cityscapes
MethodBackboneSplitw MapillarymIoU%
Deeplab-V3+
ResNeSt-200 (ours)Validationno82.7
ResNeSt-200 (ours)Validationyes83.8
ResNeSt-200 (ours)Testyes83.3

Verify 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 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc