Skip to content

Commit bd1097a

Browse files
authored
[Fix] Fix several config file errors in 2.0 (New) (#1994)
* [Fix] Fix several config file errors in 2.0 * change _base_ config file name in configs
1 parent ae5c13e commit bd1097a

17 files changed

+158
-29
lines changed

configs/bisenetv1/bisenetv1_r101-d32_4xb4-160k_coco-stuff164k-512x512.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
]
66
crop_size = (512, 512)
77
data_preprocessor = dict(size=crop_size)
8+
norm_cfg = dict(type='SyncBN', requires_grad=True)
89
model = dict(
910
data_preprocessor=data_preprocessor,
1011
backbone=dict(
@@ -14,8 +15,30 @@
1415
backbone_cfg=dict(type='ResNet', depth=101)),
1516
decode_head=dict(in_channels=1024, channels=1024, num_classes=171),
1617
auxiliary_head=[
17-
dict(in_channels=512, channels=256, num_classes=171),
18-
dict(in_channels=512, channels=256, num_classes=171),
18+
dict(
19+
type='FCNHead',
20+
in_channels=512,
21+
channels=256,
22+
num_convs=1,
23+
num_classes=171,
24+
in_index=1,
25+
norm_cfg=norm_cfg,
26+
concat_input=False,
27+
align_corners=False,
28+
loss_decode=dict(
29+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
30+
dict(
31+
type='FCNHead',
32+
in_channels=512,
33+
channels=256,
34+
num_convs=1,
35+
num_classes=171,
36+
in_index=2,
37+
norm_cfg=norm_cfg,
38+
concat_input=False,
39+
align_corners=False,
40+
loss_decode=dict(
41+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
1942
])
2043
param_scheduler = [
2144
dict(type='LinearLR', by_epoch=False, start_factor=0.1, begin=0, end=1000),

configs/bisenetv1/bisenetv1_r18-d32_4xb4-160k_coco-stuff164k-512x512.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,35 @@
55
]
66
crop_size = (512, 512)
77
data_preprocessor = dict(size=crop_size)
8+
norm_cfg = dict(type='SyncBN', requires_grad=True)
89
model = dict(
910
data_preprocessor=data_preprocessor,
1011
decode_head=dict(num_classes=171),
1112
auxiliary_head=[
12-
dict(num_classes=171),
13-
dict(num_classes=171),
13+
dict(
14+
type='FCNHead',
15+
in_channels=128,
16+
channels=64,
17+
num_convs=1,
18+
num_classes=171,
19+
in_index=1,
20+
norm_cfg=norm_cfg,
21+
concat_input=False,
22+
align_corners=False,
23+
loss_decode=dict(
24+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
25+
dict(
26+
type='FCNHead',
27+
in_channels=128,
28+
channels=64,
29+
num_convs=1,
30+
num_classes=171,
31+
in_index=2,
32+
norm_cfg=norm_cfg,
33+
concat_input=False,
34+
align_corners=False,
35+
loss_decode=dict(
36+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
1437
])
1538
param_scheduler = [
1639
dict(type='LinearLR', by_epoch=False, start_factor=0.1, begin=0, end=1000),

configs/bisenetv1/bisenetv1_r50-d32_4xb4-160k_coco-stuff164k-512x512.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
]
66
crop_size = (512, 512)
77
data_preprocessor = dict(size=crop_size)
8+
norm_cfg = dict(type='SyncBN', requires_grad=True)
89
model = dict(
910
data_preprocessor=data_preprocessor,
1011
backbone=dict(
@@ -14,8 +15,30 @@
1415
backbone_cfg=dict(type='ResNet', depth=50)),
1516
decode_head=dict(in_channels=1024, channels=1024, num_classes=171),
1617
auxiliary_head=[
17-
dict(in_channels=512, channels=256, num_classes=171),
18-
dict(in_channels=512, channels=256, num_classes=171),
18+
dict(
19+
type='FCNHead',
20+
in_channels=512,
21+
channels=256,
22+
num_convs=1,
23+
num_classes=171,
24+
in_index=1,
25+
norm_cfg=norm_cfg,
26+
concat_input=False,
27+
align_corners=False,
28+
loss_decode=dict(
29+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
30+
dict(
31+
type='FCNHead',
32+
in_channels=512,
33+
channels=256,
34+
num_convs=1,
35+
num_classes=171,
36+
in_index=2,
37+
norm_cfg=norm_cfg,
38+
concat_input=False,
39+
align_corners=False,
40+
loss_decode=dict(
41+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
1942
])
2043
param_scheduler = [
2144
dict(type='LinearLR', by_epoch=False, start_factor=0.1, begin=0, end=1000),
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
_base_ = './deeplabv3plus_r50-d8_4xb4-80k_loveda-512x512.py'
2-
model = dict(
3-
backbone=dict(
4-
depth=101,
5-
init_cfg=dict(
6-
type='Pretrained', checkpoint='open-mmlab://resnet101_v1c')))
2+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))

configs/deeplabv3plus/deeplabv3plus_r18-d8_4xb4-80k_loveda-512x512.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
_base_ = './deeplabv3plus_r50-d8_4xb4-80k_loveda-512x512.py'
22
model = dict(
3-
backbone=dict(
4-
depth=18,
5-
init_cfg=dict(
6-
type='Pretrained', checkpoint='open-mmlab://resnet18_v1c')),
3+
pretrained='open-mmlab://resnet18_v1c',
4+
backbone=dict(depth=18),
75
decode_head=dict(
86
c1_in_channels=64,
97
c1_channels=12,

configs/hrnet/fcn_hr18s_4xb4-80k_loveda-512x512.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
_base_ = './fcn_hr18_4xb4-80k_loveda-512x512.py'
22
model = dict(
3+
pretrained='open-mmlab://msra/hrnetv2_w18_small',
34
backbone=dict(
4-
init_cfg=dict(
5-
type='Pretrained',
6-
checkpoint='open-mmlab://msra/hrnetv2_w18_small'),
75
extra=dict(
86
stage1=dict(num_blocks=(2, )),
97
stage2=dict(num_blocks=(2, 2)),

configs/hrnet/fcn_hr48_4xb4-80k_loveda-512x512.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
_base_ = './fcn_hr18_4xb4-80k_loveda-512x512.py'
22
model = dict(
3+
pretrained='open-mmlab://msra/hrnetv2_w48',
34
backbone=dict(
4-
init_cfg=dict(
5-
type='Pretrained', checkpoint='open-mmlab://msra/hrnetv2_w48'),
65
extra=dict(
76
stage2=dict(num_channels=(48, 96)),
87
stage3=dict(num_channels=(48, 96, 192)),
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
_base_ = './pspnet_r50-d8_4xb4-80k_loveda-512x512.py'
2-
model = dict(
3-
backbone=dict(
4-
depth=101,
5-
init_cfg=dict(
6-
type='Pretrained', checkpoint='open-mmlab://resnet101_v1c')))
2+
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))

configs/pspnet/pspnet_r18-d8_4xb4-80k_loveda-512x512.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
_base_ = './pspnet_r50-d8_4xb4-80k_loveda-512x512.py'
22
model = dict(
3-
backbone=dict(
4-
depth=18,
5-
init_cfg=dict(
6-
type='Pretrained', checkpoint='open-mmlab://resnet18_v1c')),
3+
pretrained='open-mmlab://resnet18_v1c',
4+
backbone=dict(depth=18),
75
decode_head=dict(
86
in_channels=512,
97
channels=128,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
_base_ = [
2+
'swin-large-patch4-window7-in22k-pre_upernet_'
3+
'8xb2-160k_ade20k-512x512.py'
4+
]
5+
checkpoint_file = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_large_patch4_window12_384_22k_20220412-6580f57d.pth' # noqa
6+
model = dict(
7+
backbone=dict(
8+
init_cfg=dict(type='Pretrained', checkpoint=checkpoint_file),
9+
pretrain_img_size=384,
10+
window_size=12))

0 commit comments

Comments
 (0)