Skip to content

Commit

Permalink
[Feature] Support Resnet strikes back (open-mmlab#1390)
Browse files Browse the repository at this point in the history
* [Feature] Support Resnet strikes back

* fix url

* [Feature] Add multi machine `dist_train`. (open-mmlab#1383)

* Add training startup documentation

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* modify R-50b rsb

Co-authored-by: FangjianLin <93248678+linfangjian01@users.noreply.github.com>
  • Loading branch information
2 people authored and mob5566 committed Apr 13, 2022
1 parent be3e2e3 commit 11f0610
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 19 deletions.
54 changes: 35 additions & 19 deletions configs/pspnet/README.md

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions configs/pspnet/pspnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,28 @@ Models:
mIoU(ms+flip): 79.79
Config: configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes/pspnet_r50-d8_512x1024_80k_cityscapes_20200606_112131-2376f12b.pth
- Name: pspnet_r50-d8_rsb-pretrain_512x1024_adamw_80k_cityscapes
In Collection: PSPNet
Metadata:
backbone: R-50b-D8 rsb
crop size: (512,1024)
lr schd: 80000
inference time (ms/im):
- value: 261.78
hardware: V100
backend: PyTorch
batch size: 1
mode: FP32
resolution: (512,1024)
Training Memory (GB): 6.2
Results:
- Task: Semantic Segmentation
Dataset: Cityscapes
Metrics:
mIoU: 78.47
mIoU(ms+flip): 79.45
Config: configs/pspnet/pspnet_r50-d8_rsb-pretrain_512x1024_adamw_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes/pspnet_r50-d8_rsb-pretrain_512x1024_adamw_80k_cityscapes_20220315_123238-588c30be.pth
- Name: pspnet_r101-d8_512x1024_80k_cityscapes
In Collection: PSPNet
Metadata:
Expand Down Expand Up @@ -365,6 +387,72 @@ Models:
mIoU(ms+flip): 80.04
Config: configs/pspnet/pspnet_r101b-d8_769x769_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r101b-d8_769x769_80k_cityscapes/pspnet_r101b-d8_769x769_80k_cityscapes_20201226_171823-f0e7c293.pth
- Name: pspnet_r50-d32_512x1024_80k_cityscapes
In Collection: PSPNet
Metadata:
backbone: R-50-D32
crop size: (512,1024)
lr schd: 80000
inference time (ms/im):
- value: 65.75
hardware: V100
backend: PyTorch
batch size: 1
mode: FP32
resolution: (512,1024)
Training Memory (GB): 3.0
Results:
- Task: Semantic Segmentation
Dataset: Cityscapes
Metrics:
mIoU: 73.88
mIoU(ms+flip): 76.85
Config: configs/pspnet/pspnet_r50-d32_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d32_512x1024_80k_cityscapes/pspnet_r50-d32_512x1024_80k_cityscapes_20220316_224840-9092b254.pth
- Name: pspnet_r50-d32_rsb-pretrain_512x1024_adamw_80k_cityscapes
In Collection: PSPNet
Metadata:
backbone: R-50b-D32 rsb
crop size: (512,1024)
lr schd: 80000
inference time (ms/im):
- value: 62.19
hardware: V100
backend: PyTorch
batch size: 1
mode: FP32
resolution: (512,1024)
Training Memory (GB): 3.1
Results:
- Task: Semantic Segmentation
Dataset: Cityscapes
Metrics:
mIoU: 74.09
mIoU(ms+flip): 77.18
Config: configs/pspnet/pspnet_r50-d32_rsb-pretrain_512x1024_adamw_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50-d32_rsb-pretrain_512x1024_adamw_80k_cityscapes/pspnet_r50-d32_rsb-pretrain_512x1024_adamw_80k_cityscapes_20220316_141229-dd9c9610.pth
- Name: pspnet_r50b-d32_512x1024_80k_cityscapes
In Collection: PSPNet
Metadata:
backbone: R-50b-D32
crop size: (512,1024)
lr schd: 80000
inference time (ms/im):
- value: 64.89
hardware: V100
backend: PyTorch
batch size: 1
mode: FP32
resolution: (512,1024)
Training Memory (GB): 2.9
Results:
- Task: Semantic Segmentation
Dataset: Cityscapes
Metrics:
mIoU: 72.61
mIoU(ms+flip): 75.51
Config: configs/pspnet/pspnet_r50b-d32_512x1024_80k_cityscapes.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/pspnet/pspnet_r50b-d32_512x1024_80k_cityscapes/pspnet_r50b-d32_512x1024_80k_cityscapes_20220311_152152-23bcaf8c.pth
- Name: pspnet_r50-d8_512x512_80k_ade20k
In Collection: PSPNet
Metadata:
Expand Down
5 changes: 5 additions & 0 deletions configs/pspnet/pspnet_r50-d32_512x1024_80k_cityscapes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_base_ = [
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
]
model = dict(backbone=dict(dilations=(1, 1, 2, 4), strides=(1, 2, 2, 2)))
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
_base_ = [
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
]
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa
model = dict(
pretrained=None,
backbone=dict(
type='ResNet',
init_cfg=dict(
type='Pretrained', prefix='backbone.', checkpoint=checkpoint),
dilations=(1, 1, 2, 4),
strides=(1, 2, 2, 2)))

optimizer = dict(_delete_=True, type='AdamW', lr=0.0005, weight_decay=0.05)
optimizer_config = dict(grad_clip=dict(max_norm=1, norm_type=2))
# learning policy
lr_config = dict(
_delete_=True,
policy='step',
warmup='linear',
warmup_iters=1000,
warmup_ratio=0.001,
step=[60000, 72000],
by_epoch=False)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
_base_ = [
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
]
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/resnet/resnet50_8xb256-rsb-a1-600e_in1k_20211228-20e21305.pth' # noqa
model = dict(
pretrained=None,
backbone=dict(
type='ResNet',
init_cfg=dict(
type='Pretrained', prefix='backbone.', checkpoint=checkpoint)))

optimizer = dict(_delete_=True, type='AdamW', lr=0.0005, weight_decay=0.05)
optimizer_config = dict(grad_clip=dict(max_norm=1, norm_type=2))
# learning policy
lr_config = dict(
_delete_=True,
policy='step',
warmup='linear',
warmup_iters=1000,
warmup_ratio=0.001,
step=[60000, 72000],
by_epoch=False)
7 changes: 7 additions & 0 deletions configs/pspnet/pspnet_r50b-d32_512x1024_80k_cityscapes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_base_ = [
'../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
]
model = dict(
pretrained='torchvision://resnet50',
backbone=dict(type='ResNet', dilations=(1, 1, 2, 4), strides=(1, 2, 2, 2)))

0 comments on commit 11f0610

Please sign in to comment.