Home

Awesome

Res2Net

The official pytorch implemention of the paper "Res2Net: A New Multi-scale Backbone Architecture"

Our paper is accepted by IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).

Update

Introduction

We propose a novel building block for CNNs, namely Res2Net, by constructing hierarchical residual-like connections within one single residual block. The Res2Net represents multi-scale features at a granular level and increases the range of receptive fields for each network layer. The proposed Res2Net block can be plugged into the state-of-the-art backbone CNN models, e.g. , ResNet, ResNeXt, BigLittleNet, and DLA. We evaluate the Res2Net block on all these models and demonstrate consistent performance gains over baseline models.

<p align="center"> <img src="https://mftp.mmcheng.net/imgs800/19Res2Net.jpg" alt="Sample" width="500"> <p align="center"> <em>Res2Net module</em> </p> </p>

Useage

Requirement

PyTorch>=0.4.1

Examples

git clone https://github.com/gasvn/Res2Net.git

from res2net import res2net50
model = res2net50(pretrained=True)

Input image should be normalized as follows:

normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                  std=[0.229, 0.224, 0.225])

(By default, the model will be downloaded automatically. If the default download link is not available, please refer to the Download Link listed on Pretrained models.)

Pretrained models

model#ParamsMACCstop-1 errortop-5 errorLink
Res2Net-50-48w-2s25.29M4.222.686.47OneDrive
Res2Net-50-26w-4s25.70M4.222.016.15OneDrive
Res2Net-50-14w-8s25.06M4.221.866.14OneDrive
Res2Net-50-26w-6s37.05M6.321.425.87OneDrive
Res2Net-50-26w-8s48.40M8.320.805.63OneDrive
Res2Net-101-26w-4s45.21M8.120.815.57OneDrive
Res2NeXt-5024.67M4.221.766.09OneDrive
Res2Net-DLA-6021.15M4.221.535.80OneDrive
Res2NeXt-DLA-6017.33M3.621.555.86OneDrive
Res2Net-v1b-5025.72M4.519.734.96Link
Res2Net-v1b-10145.23M8.318.774.64Link
Res2Net-v1d-200-SSLD76.21M15.714.872.58PaddlePaddleLink

News

The download link from Baidu Disk is now available. (Baidu Disk password: vbix)

Applications

Other applications such as Classification, Instance segmentation, Object detection, Semantic segmentation, Salient object detection, Class activation map,Tumor segmentation on CT scans can be found on https://mmcheng.net/res2net/ .

Citation

If you find this work or code is helpful in your research, please cite:

@article{gao2019res2net,
  title={Res2Net: A New Multi-scale Backbone Architecture},
  author={Gao, Shang-Hua and Cheng, Ming-Ming and Zhao, Kai and Zhang, Xin-Yu and Yang, Ming-Hsuan and Torr, Philip},
  journal={IEEE TPAMI},
  year={2021},
  doi={10.1109/TPAMI.2019.2938758}, 
}

Contact

If you have any questions, feel free to E-mail me via: shgao(at)live.com

License

The code is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License for Noncommercial use only. Any commercial use should get formal permission first.