Skip to content

Commit

Permalink
[Feature] Update New SegFormer models (open-mmlab#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
MengzhangLI authored Jun 25, 2022
1 parent 1a18f1f commit 06d40a1
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 66 deletions.
71 changes: 44 additions & 27 deletions configs/segformer/README.md

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions configs/segformer/segformer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Models:
crop size: (512,512)
lr schd: 160000
inference time (ms/im):
- value: 19.49
- value: 26.2
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -33,18 +33,18 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 37.41
mIoU(ms+flip): 38.34
mIoU: 37.85
mIoU(ms+flip): 38.97
Config: configs/segformer/segformer_mit-b0_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b0_512x512_160k_ade20k/segformer_mit-b0_512x512_160k_ade20k_20210726_101530-8ffa8fda.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b0_512x512_160k_ade20k/segformer_mit-b0_512x512_160k_ade20k_20220617_162207-c00b9603.pth
- Name: segformer_mit-b1_512x512_160k_ade20k
In Collection: Segformer
Metadata:
backbone: MIT-B1
crop size: (512,512)
lr schd: 160000
inference time (ms/im):
- value: 20.98
- value: 26.46
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -55,18 +55,18 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 40.97
mIoU(ms+flip): 42.54
mIoU: 42.13
mIoU(ms+flip): 43.74
Config: configs/segformer/segformer_mit-b1_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b1_512x512_160k_ade20k/segformer_mit-b1_512x512_160k_ade20k_20210726_112106-d70e859d.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b1_512x512_160k_ade20k/segformer_mit-b1_512x512_160k_ade20k_20220620_112037-c3f39e00.pth
- Name: segformer_mit-b2_512x512_160k_ade20k
In Collection: Segformer
Metadata:
backbone: MIT-B2
crop size: (512,512)
lr schd: 160000
inference time (ms/im):
- value: 32.38
- value: 37.31
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -77,18 +77,18 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 45.58
mIoU(ms+flip): 47.03
mIoU: 46.8
mIoU(ms+flip): 48.12
Config: configs/segformer/segformer_mit-b2_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b2_512x512_160k_ade20k/segformer_mit-b2_512x512_160k_ade20k_20210726_112103-cbd414ac.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b2_512x512_160k_ade20k/segformer_mit-b2_512x512_160k_ade20k_20220620_114047-64e4feca.pth
- Name: segformer_mit-b3_512x512_160k_ade20k
In Collection: Segformer
Metadata:
backbone: MIT-B3
crop size: (512,512)
lr schd: 160000
inference time (ms/im):
- value: 45.23
- value: 52.11
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -99,18 +99,18 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 47.82
mIoU(ms+flip): 48.81
mIoU: 48.25
mIoU(ms+flip): 49.58
Config: configs/segformer/segformer_mit-b3_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b3_512x512_160k_ade20k/segformer_mit-b3_512x512_160k_ade20k_20210726_081410-962b98d2.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b3_512x512_160k_ade20k/segformer_mit-b3_512x512_160k_ade20k_20220617_162254-3a4b7363.pth
- Name: segformer_mit-b4_512x512_160k_ade20k
In Collection: Segformer
Metadata:
backbone: MIT-B4
crop size: (512,512)
lr schd: 160000
inference time (ms/im):
- value: 64.72
- value: 68.78
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -121,10 +121,10 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 48.46
mIoU(ms+flip): 49.76
mIoU: 49.09
mIoU(ms+flip): 50.72
Config: configs/segformer/segformer_mit-b4_512x512_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b4_512x512_160k_ade20k/segformer_mit-b4_512x512_160k_ade20k_20210728_183055-7f509d7d.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b4_512x512_160k_ade20k/segformer_mit-b4_512x512_160k_ade20k_20220620_112216-4fa4f58f.pth
- Name: segformer_mit-b5_512x512_160k_ade20k
In Collection: Segformer
Metadata:
Expand Down Expand Up @@ -154,7 +154,7 @@ Models:
crop size: (640,640)
lr schd: 160000
inference time (ms/im):
- value: 88.5
- value: 94.34
hardware: V100
backend: PyTorch
batch size: 1
Expand All @@ -165,10 +165,10 @@ Models:
- Task: Semantic Segmentation
Dataset: ADE20K
Metrics:
mIoU: 49.62
mIoU(ms+flip): 50.36
mIoU: 50.19
mIoU(ms+flip): 51.41
Config: configs/segformer/segformer_mit-b5_640x640_160k_ade20k.py
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b5_640x640_160k_ade20k/segformer_mit-b5_640x640_160k_ade20k_20210801_121243-41d2845b.pth
Weights: https://download.openmmlab.com/mmsegmentation/v0.5/segformer/segformer_mit-b5_640x640_160k_ade20k/segformer_mit-b5_640x640_160k_ade20k_20220617_203542-940a6bd8.pth
- Name: segformer_mit-b0_8x1_1024x1024_160k_cityscapes
In Collection: Segformer
Metadata:
Expand Down
5 changes: 3 additions & 2 deletions configs/segformer/segformer_mit-b0_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
]

model = dict(
pretrained='pretrain/mit_b0.pth', decode_head=dict(num_classes=150))
checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa

model = dict(pretrained=checkpoint, decode_head=dict(num_classes=150))

# optimizer
optimizer = dict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
]

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa

model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b0.pth')),
backbone=dict(init_cfg=dict(type='Pretrained', checkpoint=checkpoint)),
test_cfg=dict(mode='slide', crop_size=(1024, 1024), stride=(768, 768)))

# optimizer
Expand Down
4 changes: 3 additions & 1 deletion configs/segformer/segformer_mit-b1_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_base_ = ['./segformer_mit-b0_512x512_160k_ade20k.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b1_20220624-02e5a6a1.pth' # noqa

# model settings
model = dict(
pretrained='pretrain/mit_b1.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[2, 2, 2, 2]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
_base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b1_20220624-02e5a6a1.pth' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b1.pth'),
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
embed_dims=64),
decode_head=dict(in_channels=[64, 128, 320, 512]))
4 changes: 3 additions & 1 deletion configs/segformer/segformer_mit-b2_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_base_ = ['./segformer_mit-b0_512x512_160k_ade20k.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa

# model settings
model = dict(
pretrained='pretrain/mit_b2.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[3, 4, 6, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
_base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b2.pth'),
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
embed_dims=64,
num_layers=[3, 4, 6, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
4 changes: 3 additions & 1 deletion configs/segformer/segformer_mit-b3_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_base_ = ['./segformer_mit-b0_512x512_160k_ade20k.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b3_20220624-13b1141c.pth' # noqa

# model settings
model = dict(
pretrained='pretrain/mit_b3.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[3, 4, 18, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
_base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b3_20220624-13b1141c.pth' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b3.pth'),
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
embed_dims=64,
num_layers=[3, 4, 18, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
4 changes: 3 additions & 1 deletion configs/segformer/segformer_mit-b4_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_base_ = ['./segformer_mit-b0_512x512_160k_ade20k.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b4_20220624-d588d980.pth' # noqa

# model settings
model = dict(
pretrained='pretrain/mit_b4.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[3, 8, 27, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
_base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b4_20220624-d588d980.pth' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b4.pth'),
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
embed_dims=64,
num_layers=[3, 8, 27, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
4 changes: 3 additions & 1 deletion configs/segformer/segformer_mit-b5_512x512_160k_ade20k.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_base_ = ['./segformer_mit-b0_512x512_160k_ade20k.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b5_20220624-658746d9.pthh' # noqa

# model settings
model = dict(
pretrained='pretrain/mit_b5.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[3, 6, 40, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
3 changes: 2 additions & 1 deletion configs/segformer/segformer_mit-b5_640x640_160k_ade20k.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
test=dict(pipeline=test_pipeline))

# model settings
checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b5_20220624-658746d9.pthh' # noqa
model = dict(
pretrained='pretrain/mit_b5.pth',
pretrained=checkpoint,
backbone=dict(
embed_dims=64, num_heads=[1, 2, 5, 8], num_layers=[3, 6, 40, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
_base_ = ['./segformer_mit-b0_8x1_1024x1024_160k_cityscapes.py']

checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b5_20220624-658746d9.pthh' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', checkpoint='pretrain/mit_b5.pth'),
init_cfg=dict(type='Pretrained', checkpoint=checkpoint),
embed_dims=64,
num_layers=[3, 6, 40, 3]),
decode_head=dict(in_channels=[64, 128, 320, 512]))

0 comments on commit 06d40a1

Please sign in to comment.