-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] ResNet Strikes Back. (#7001)
* [Feature] ResNet Strikes Back. * add more cfg * add readme * update * update * update * update * update * update
- Loading branch information
Showing
8 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# ResNet strikes back | ||
|
||
<!-- [OTHERS] --> | ||
|
||
## Abstract | ||
|
||
The influential Residual Networks designed by He et al. remain the gold-standard architecture in numerous scientific publications. They typically serve as the default architecture in studies, or as baselines when new architectures are proposed. Yet there has been significant progress on best practices for training neural networks since the inception of the ResNet architecture in 2015. Novel optimization & dataaugmentation have increased the effectiveness of the training recipes. | ||
|
||
In this paper, we re-evaluate the performance of the vanilla ResNet-50 when trained with a procedure that integrates such advances. We share competitive training settings and pre-trained models in the timm open-source library, with the hope that they will serve as better baselines for future work. For instance, with our more demanding training setting, a vanilla ResNet-50 reaches 80.4% top-1 accuracy at resolution 224×224 on ImageNet-val without extra data or distillation. We also report the performance achieved with popular models with our training procedure. | ||
|
||
<div align=center> | ||
<img src="https://user-images.githubusercontent.com/12907710/149324625-4546a5a7-704f-406c-982f-0376a20d03d8.png"/> | ||
</div> | ||
|
||
## Results and Models | ||
|
||
| Method | Backbone | Lr schd | Mem (GB) | Inf time (fps) | box AP | mask AP | Config | Download | | ||
| :----------: | :-------------: | :-----: | :------: | :------------: | :----: | :------:| :------: | :--------: | | ||
| Faster R-CNN | R-50 rsb | 1x | 3.9 | - | 40.8 (+3.4) | - | [Config](./faster_rcnn_r50_fpn_rsb-pretrain_1x_coco.py)| [model](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_162229-32ae82a9.pth) | [log](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_162229.log.json)| | ||
| Mask R-CNN | R-50 rsb | 1x | 4.5 | - | 41.2 (+3.0) | 38.2 (+3.0) | [Config](./mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py)| [model](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054-06ce8ba0.pth) | [log](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054.log.json)| | ||
| Cascade Mask R-CNN | R-50 rsb | 1x | 6.2 | - | 44.8 (+3.6) | 39.9 (+3.6) | [Config](./cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py)| [model](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_193636-8b9ad50f.pth) | [log](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_193636.log.json)| | ||
| RetinaNet | R-50 rsb | 1x | 3.8 | - | 39.0 (+2.5) | - | [Config](./retinanet_r50_fpn_rsb-pretrain_1x_coco.py)| [model](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/retinanet_r50_fpn_rsb-pretrain_1x_coco/retinanet_r50_fpn_rsb-pretrain_1x_coco_20220113_175432-bd24aae9.pth) | [log](https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/retinanet_r50_fpn_rsb-pretrain_1x_coco/retinanet_r50_fpn_rsb-pretrain_1x_coco_20220113_175432.log.json)| | ||
|
||
**Notes:** | ||
- 'rsb' is short for 'resnet strikes back' | ||
- We have done some grid searches on learning rate and weight decay and get these optimal hyper-parameters. | ||
|
||
## Citation | ||
|
||
```latex | ||
@article{wightman2021resnet, | ||
title={Resnet strikes back: An improved training procedure in timm}, | ||
author={Ross Wightman, Hugo Touvron, Hervé Jégou}, | ||
journal={arXiv preprint arXiv:2110.00476}, | ||
year={2021} | ||
} | ||
``` |
18 changes: 18 additions & 0 deletions
18
configs/resnet_strikes_back/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_base_ = [ | ||
'../_base_/models/cascade_mask_rcnn_r50_fpn.py', | ||
'../_base_/datasets/coco_instance.py', | ||
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' | ||
] | ||
|
||
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa | ||
model = dict( | ||
backbone=dict( | ||
init_cfg=dict( | ||
type='Pretrained', prefix='backbone.', checkpoint=checkpoint))) | ||
|
||
optimizer = dict( | ||
_delete_=True, | ||
type='AdamW', | ||
lr=0.0002, | ||
weight_decay=0.05, | ||
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True)) |
18 changes: 18 additions & 0 deletions
18
configs/resnet_strikes_back/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_base_ = [ | ||
'../_base_/models/faster_rcnn_r50_fpn.py', | ||
'../_base_/datasets/coco_detection.py', | ||
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' | ||
] | ||
|
||
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa | ||
model = dict( | ||
backbone=dict( | ||
init_cfg=dict( | ||
type='Pretrained', prefix='backbone.', checkpoint=checkpoint))) | ||
|
||
optimizer = dict( | ||
_delete_=True, | ||
type='AdamW', | ||
lr=0.0002, | ||
weight_decay=0.05, | ||
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True)) |
18 changes: 18 additions & 0 deletions
18
configs/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_base_ = [ | ||
'../_base_/models/mask_rcnn_r50_fpn.py', | ||
'../_base_/datasets/coco_instance.py', | ||
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' | ||
] | ||
|
||
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa | ||
model = dict( | ||
backbone=dict( | ||
init_cfg=dict( | ||
type='Pretrained', prefix='backbone.', checkpoint=checkpoint))) | ||
|
||
optimizer = dict( | ||
_delete_=True, | ||
type='AdamW', | ||
lr=0.0002, | ||
weight_decay=0.05, | ||
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
Models: | ||
- Name: faster_rcnn_r50_fpn_rsb-pretrain_1x_coco | ||
In Collection: Faster R-CNN | ||
Config: configs/resnet_strikes_back/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco.py | ||
Metadata: | ||
Training Memory (GB): 3.9 | ||
Epochs: 12 | ||
Training Data: COCO | ||
Training Techniques: | ||
- SGD with Momentum | ||
- Weight Decay | ||
Training Resources: 8x V100 GPUs | ||
Architecture: | ||
- ResNet | ||
Results: | ||
- Task: Object Detection | ||
Dataset: COCO | ||
Metrics: | ||
box AP: 40.8 | ||
Weights: https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco/faster_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_162229-32ae82a9.pth | ||
Paper: | ||
URL: https://arxiv.org/abs/2110.00476 | ||
Title: 'ResNet strikes back: An improved training procedure in timm' | ||
README: configs/resnet_strikes_back/README.md | ||
Code: | ||
URL: https://github.com/open-mmlab/mmdetection/blob/v2.22.0/configs/resnet_strikes_back/README.md | ||
Version: v2.22.0 | ||
|
||
- Name: cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco | ||
In Collection: Cascade R-CNN | ||
Config: configs/resnet_strikes_back/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py | ||
Metadata: | ||
Training Memory (GB): 6.2 | ||
Epochs: 12 | ||
Training Data: COCO | ||
Training Techniques: | ||
- SGD with Momentum | ||
- Weight Decay | ||
Training Resources: 8x V100 GPUs | ||
Architecture: | ||
- ResNet | ||
Results: | ||
- Task: Object Detection | ||
Dataset: COCO | ||
Metrics: | ||
box AP: 44.8 | ||
- Task: Instance Segmentation | ||
Dataset: COCO | ||
Metrics: | ||
mask AP: 39.9 | ||
Weights: https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/cascade_mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_193636-8b9ad50f.pth | ||
Paper: | ||
URL: https://arxiv.org/abs/2110.00476 | ||
Title: 'ResNet strikes back: An improved training procedure in timm' | ||
README: configs/resnet_strikes_back/README.md | ||
Code: | ||
URL: https://github.com/open-mmlab/mmdetection/blob/v2.22.0/configs/resnet_strikes_back/README.md | ||
Version: v2.22.0 | ||
|
||
- Name: retinanet_r50_fpn_rsb-pretrain_1x_coco | ||
In Collection: RetinaNet | ||
Config: configs/resnet_strikes_back/retinanet_r50_fpn_rsb-pretrain_1x_coco.py | ||
Metadata: | ||
Training Memory (GB): 3.8 | ||
Epochs: 12 | ||
Training Data: COCO | ||
Training Techniques: | ||
- SGD with Momentum | ||
- Weight Decay | ||
Training Resources: 8x V100 GPUs | ||
Architecture: | ||
- ResNet | ||
Results: | ||
- Task: Object Detection | ||
Dataset: COCO | ||
Metrics: | ||
box AP: 39.0 | ||
Weights: https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/retinanet_r50_fpn_rsb-pretrain_1x_coco/retinanet_r50_fpn_rsb-pretrain_1x_coco_20220113_175432-bd24aae9.pth | ||
Paper: | ||
URL: https://arxiv.org/abs/2110.00476 | ||
Title: 'ResNet strikes back: An improved training procedure in timm' | ||
README: configs/resnet_strikes_back/README.md | ||
Code: | ||
URL: https://github.com/open-mmlab/mmdetection/blob/v2.22.0/configs/resnet_strikes_back/README.md | ||
Version: v2.22.0 | ||
|
||
- Name: mask_rcnn_r50_fpn_rsb-pretrain_1x_coco | ||
In Collection: Mask R-CNN | ||
Config: configs/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco.py | ||
Metadata: | ||
Training Memory (GB): 4.5 | ||
Epochs: 12 | ||
Training Data: COCO | ||
Training Techniques: | ||
- SGD with Momentum | ||
- Weight Decay | ||
Training Resources: 8x V100 GPUs | ||
Architecture: | ||
- ResNet | ||
Results: | ||
- Task: Object Detection | ||
Dataset: COCO | ||
Metrics: | ||
box AP: 41.2 | ||
- Task: Instance Segmentation | ||
Dataset: COCO | ||
Metrics: | ||
mask AP: 38.2 | ||
Weights: https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054-06ce8ba0.pth | ||
Paper: | ||
URL: https://arxiv.org/abs/2110.00476 | ||
Title: 'ResNet strikes back: An improved training procedure in timm' | ||
README: configs/resnet_strikes_back/README.md | ||
Code: | ||
URL: https://github.com/open-mmlab/mmdetection/blob/v2.22.0/configs/resnet_strikes_back/README.md | ||
Version: v2.22.0 |
18 changes: 18 additions & 0 deletions
18
configs/resnet_strikes_back/retinanet_r50_fpn_rsb-pretrain_1x_coco.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_base_ = [ | ||
'../_base_/models/retinanet_r50_fpn.py', | ||
'../_base_/datasets/coco_detection.py', | ||
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' | ||
] | ||
|
||
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa | ||
model = dict( | ||
backbone=dict( | ||
init_cfg=dict( | ||
type='Pretrained', prefix='backbone.', checkpoint=checkpoint))) | ||
|
||
optimizer = dict( | ||
_delete_=True, | ||
type='AdamW', | ||
lr=0.0001, | ||
weight_decay=0.05, | ||
paramwise_cfg=dict(norm_decay_mult=0., bypass_duplicate=True)) |