-
Notifications
You must be signed in to change notification settings - Fork 8
/
refign_daformer.yaml
218 lines (218 loc) · 6.25 KB
/
refign_daformer.yaml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
seed_everything: 0
data:
class_path: data_modules.CombinedDataModule
init_args:
batch_size: 4
num_workers: 4
load_config:
train:
Cityscapes:
rcs_enabled: True
dims:
- 512
- 1024
load_keys:
- image
- semantic
transforms:
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.RandomCrop
init_args:
size:
- 512
- 512
cat_max_ratio: 0.75
- class_path: data_modules.transforms.RandomHorizontalFlip
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
DarkZurich:
dims:
- 540
- 960
load_keys:
- image
- image_ref
transforms:
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.RandomCrop
init_args:
size:
- 512
- 512
- class_path: data_modules.transforms.RandomHorizontalFlip
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
val:
DarkZurich:
dims:
- 540
- 960
load_keys:
- image
- semantic
transforms:
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
test:
DarkZurich:
load_keys:
- image
- semantic
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size:
- 540
- 960
img_only: True
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
NighttimeDriving:
load_keys:
- image
- semantic
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size:
- 540
- 960
img_only: True
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
BDD100kNight:
load_keys:
- image
- semantic
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size:
- 540
- 960
img_only: True
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
predict:
DarkZurich:
predict_on: test
load_keys:
- image
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size:
- 540
- 960
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
model:
class_path: models.DomainAdaptationSegmentationModel
init_args:
backbone_lr_factor: 0.1
enable_fdist: True
use_refign: True
adapt_to_ref: True
gamma: 0.25
backbone:
class_path: models.backbones.MixVisionTransformer
init_args:
model_type: mit_b5
pretrained: imagenet
head:
class_path: models.heads.DAFormerHead
init_args:
in_channels:
- 64
- 128
- 320
- 512
in_index:
- 0
- 1
- 2
- 3
num_classes: 19
input_transform: multiple_select
alignment_backbone:
class_path: models.backbones.VGG
init_args:
model_type: vgg16
pretrained: imagenet
out_indices:
- 2
- 3
- 4
alignment_head:
class_path: models.heads.UAWarpCHead
init_args:
in_index:
- 0
- 1
input_transform: multiple_select
estimate_uncertainty: True
pretrained: pretrained_models/uawarpc_megadepth.ckpt
loss:
class_path: models.losses.PixelWeightedCrossEntropyLoss
metrics:
val:
DarkZurich:
- class_path: helpers.metrics.IoU
init_args:
ignore_index: 255
num_classes: 19
compute_on_step: False
test:
DarkZurich:
- class_path: helpers.metrics.IoU
init_args:
ignore_index: 255
num_classes: 19
compute_on_step: False
NighttimeDriving:
- class_path: helpers.metrics.IoU
init_args:
ignore_index: 255
num_classes: 19
compute_on_step: False
BDD100kNight:
- class_path: helpers.metrics.IoU
init_args:
ignore_index: 255
num_classes: 19
compute_on_step: False
optimizer:
class_path: torch.optim.AdamW
init_args:
lr: 0.0006
weight_decay: 0.01
lr_scheduler:
class_path: helpers.lr_scheduler.LinearWarmupPolynomialLR
init_args:
warmup_iters: 1500
warmup_ratio: 0.000001
power: 1.0
max_steps: 40000
trainer:
max_steps: 40000
check_val_every_n_epoch: 40000
sync_batchnorm: True
multiple_trainloader_mode: min_size
logger:
class_path: pytorch_lightning.loggers.TensorBoardLogger
init_args:
save_dir: lightning_logs
name: refign_daformer_darkzurich
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: helpers.callbacks.ValEveryNSteps
init_args:
every_n_steps: 4000
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
init_args:
save_last: True