-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
maskformer_swin_tiny_ade20k_512x512_160k.yml
75 lines (69 loc) · 1.7 KB
/
maskformer_swin_tiny_ade20k_512x512_160k.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
batch_size: 4
iters: 160000
train_dataset:
type: ADE20K
dataset_root: data/ADEChallengeData2016/
transforms:
- type: ResizeByShort
short_size: [256, 307, 358, 409, 460, 512, 563, 614, 665, 716, 768, 819, 870, 921, 972, 1024]
max_size: 2048
- type: RandomPaddingCrop
crop_size: [512, 512]
- type: RandomDistort
brightness_range: 0.125
brightness_prob: 1.0
contrast_range: 0.5
contrast_prob: 1.0
saturation_range: 0.5
saturation_prob: 1.0
hue_range: 18
hue_prob: 1.0
- type: RandomHorizontalFlip
- type: GenerateInstanceTargets
num_classes: 150
ignore_index: 255
- type: Normalize
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
val_dataset:
type: ADE20K
dataset_root: data/ADEChallengeData2016/
transforms:
- type: ResizeByShort
short_size: 512
- type: Normalize
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
mode: val
model:
type: MaskFormer
num_classes: 150
backbone:
type: SwinTransformer_tiny_patch4_window7_224_maskformer
pretrained: https://bj.bcebos.com/paddleseg/paddleseg/dygraph/ade20k/maskformer_ade20k_swin_tiny/pretrain/model.pdparams
optimizer:
type: AdamW
weight_decay: 0.01
custom_cfg:
- name: backbone
lr_mult: 1.0
- name: norm
weight_decay_mult: 0.0
- name: relative_position_bias_table
weight_decay_mult: 0.0
grad_clip_cfg:
name: ClipGradByNorm
clip_norm: 0.01
lr_scheduler:
type: PolynomialDecay
warmup_iters: 1500
warmup_start_lr: 6.0e-11
learning_rate: 6.0e-05
end_lr: 0
power: 0.9
loss:
types:
- type: MaskFormerLoss
num_classes: 150
eos_coef: 0.1
coef: [1]