-
Notifications
You must be signed in to change notification settings - Fork 8
/
uawarpc_stage2.yaml
192 lines (192 loc) · 5.69 KB
/
uawarpc_stage2.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
seed_everything: 0
data:
class_path: data_modules.CombinedDataModule
init_args:
batch_size: 6
num_workers: 4
load_config:
train:
MegaDepth:
store_scene_info_in_memory: True
exchange_images_with_proba: 0.5
dims:
- 750
- 750
load_keys:
- image
- image_ref
- image_prime
transforms:
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ColorJitter
init_args:
apply_keys:
- image_prime
brightness: 0.6
contrast: 0.6
saturation: 0.6
hue: 0
- class_path: data_modules.transforms.ChannelShuffle
init_args:
apply_keys:
- image_prime
- class_path: data_modules.transforms.RandomGaussianBlur
init_args:
apply_keys:
- image_prime
p: 0.2
kernel_size: 7
sigma:
- 0.2
- 2.0
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
- class_path: data_modules.transforms.CompositeFlow
init_args:
apply_keys:
- image_prime
include_transforms:
- hom
- tps
- afftps
random_alpha: 0.26
random_s: 0.45
random_tx: 0.25
random_ty: 0.25
random_t_hom: 0.4
random_t_tps: 0.4
random_t_tps_for_afftps: 0.26
parameterize_with_gaussian: False
add_elastic: True
- class_path: data_modules.transforms.CenterCrop
init_args:
size:
- 520
- 520
val:
MegaDepth:
dims:
- 480
- 720
load_keys:
- image
- image_ref
transforms:
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
test:
MegaDepth:
load_keys:
- image
- image_ref
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size: 480
img_interpolation: lanczos
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
- class_path: data_modules.transforms.PadBottomRight
init_args:
same_shape_keys:
- image
- image_ref
RobotCarMatching:
load_keys:
- image
- image_ref
transforms:
- class_path: data_modules.transforms.Resize
init_args:
size: 480
img_interpolation: lanczos
- class_path: data_modules.transforms.ToTensor
- class_path: data_modules.transforms.ConvertImageDtype
- class_path: data_modules.transforms.Normalize
- class_path: data_modules.transforms.PadBottomRight
init_args:
same_shape_keys:
- image
- image_ref
model:
class_path: models.AlignmentModel
init_args:
pretrained: path_to_last_stage1.ckpt
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
iterative_refinement: True
selfsupervised_loss:
class_path: models.losses.MultiScaleFlowLoss
init_args:
loss_type: HuberLoss
unsupervised_loss:
class_path: models.losses.WBipathLoss
init_args:
objective: multi_scale_flow_loss
loss_type: HuberLoss
visibility_mask: True
metrics:
val:
MegaDepth:
- class_path: helpers.metrics.SparseEPE
init_args:
compute_on_step: False
uncertainty_estimation: True
test:
MegaDepth:
- class_path: helpers.metrics.SparseEPE
init_args:
compute_on_step: False
uncertainty_estimation: True
RobotCarMatching:
- class_path: helpers.metrics.SparseEPE
init_args:
compute_on_step: False
uncertainty_estimation: True
optimizer:
class_path: torch.optim.Adam
init_args:
lr: 0.00005
weight_decay: 0.0004
lr_scheduler:
class_path: torch.optim.lr_scheduler.MultiStepLR
init_args:
milestones:
- 100000
- 150000
- 200000
gamma: 0.5
trainer:
max_steps: 225000
sync_batchnorm: True
check_val_every_n_epoch: 225000
logger:
class_path: pytorch_lightning.loggers.TensorBoardLogger
init_args:
save_dir: lightning_logs
name: uawarpc_megadepth_stage2
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
init_args:
save_last: True
- class_path: helpers.callbacks.ValEveryNSteps
init_args:
every_n_steps: 5000