-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path034_SR4IR_swinir_x4.yml
109 lines (99 loc) · 2.07 KB
/
034_SR4IR_swinir_x4.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: 034_SR4IR_swinir_x4
model_type: sr4ir_seg
num_threads: 16
print_freq: 45 # unit: iter
manual_seed: 200
scale: 4
deterministic: true
# test_only: true
# data and augmentation
data:
name: voc
path: datasets/VOC
base_size: 520
crop_size: 480
# network specs
network_sr:
name: swinir
upscale: 4
in_chans: 3
img_size: 48
window_size: 8
img_range: 1.
depths: [6, 6, 6, 6, 6, 6]
embed_dim: 180
num_heads: [6, 6, 6, 6, 6, 6]
mlp_ratio: 2
upsampler: 'pixelshuffle'
resi_connection: '1conv'
network_seg:
name: deeplabv3_mobilenet_v3_large
weights_backbone: MobileNet_V3_Large_Weights.IMAGENET1K_V1
num_classes: 21
aux_loss: true
# path for pretrained model
path:
network_sr: experiments/pretrained_models/001_classicalSR_DIV2K_s48w8_SwinIR-M_x4.pth
network_sr_key: params
network_seg: ~
# training config
train:
batch_size: 4 # 4 GPU
epoch: 100
save_freq: 50 # unit: epoch
eval_freq: 10
warmup_epoch: 10
# optimizer
optim_sr:
type: AdamW
lr: !!float 1e-4
weight_decay: 0
betas: [0.9, 0.999]
optim_seg:
type: SGD
lr: !!float 2e-2
momentum: 0.9
weight_decay: !!float 1e-6
# scheduler
scheduler_sr:
type: CosineAnnealingRestartLR
periods: [10, 90]
restart_weights: [1, 1]
eta_min: !!float 1e-6
scheduler_seg:
type: CosineAnnealingRestartLR
periods: [10, 90]
restart_weights: [1, 1]
eta_min: !!float 1e-4
# phase 1 losses
pixel_opt:
type: L1Loss
loss_weight: !!float 1.0
reduction: mean
tdp_opt:
type: FeatureLoss
loss_weight: !!float 1.0
criterion: l1
layer_weights:
C5: 1.0
# phase 2 losses
auxce_sr_opt:
type: AUXCELoss
loss_weight: !!float 0.34
aux_loss_weight: !!float 0.5
ignore_index: 255
auxce_hr_opt:
type: AUXCELoss
loss_weight: !!float 0.34
aux_loss_weight: !!float 0.5
ignore_index: 255
auxce_cqmix_opt:
type: AUXCELoss
loss_weight: !!float 0.34
aux_loss_weight: !!float 0.5
ignore_index: 255
# training config
test:
batch_size: 1
# DDP setting
dist_url: env:://