Skip to content

Commit

Permalink
[Feature] ResNet Strikes Back. (#7001)
Browse files Browse the repository at this point in the history
* [Feature] ResNet Strikes Back.

* add more cfg

* add readme

* update

* update

* update

* update

* update

* update
  • Loading branch information
RangiLyu authored Feb 24, 2022
1 parent cda1e21 commit 96a322a
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
<li><a href="configs/gn+ws">Weight Standardization (ArXiv'2019)</a></li>
<li><a href="configs/pisa">Prime Sample Attention (CVPR'2020)</a></li>
<li><a href="configs/strong_baselines">Strong Baselines (CVPR'2021)</a></li>
<li><a href="configs/resnet_strikes_back">Resnet strikes back (ArXiv'2021)</a></li>
</ul>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ MMDetection 是一个基于 PyTorch 的目标检测开源工具箱。它是 [Ope
<li><a href="configs/gn+ws">Weight Standardization (ArXiv'2019)</a></li>
<li><a href="configs/pisa">Prime Sample Attention (CVPR'2020)</a></li>
<li><a href="configs/strong_baselines">Strong Baselines (CVPR'2021)</a></li>
<li><a href="configs/resnet_strikes_back">Resnet strikes back (ArXiv'2021)</a></li>
</ul>
</td>
</tr>
Expand Down
37 changes: 37 additions & 0 deletions configs/resnet_strikes_back/README.md
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) &#124; [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) &#124; [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) &#124; [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) &#124; [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}
}
```
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))
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))
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))
116 changes: 116 additions & 0 deletions configs/resnet_strikes_back/metafile.yml
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
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))

0 comments on commit 96a322a

Please sign in to comment.