-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflowclas_city.yaml
More file actions
167 lines (153 loc) · 3.65 KB
/
Copy pathflowclas_city.yaml
File metadata and controls
167 lines (153 loc) · 3.65 KB
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
# FlowCLAS experiment: Cityscapes + COCO (512×1024 training crops)
# Usage: --data configs/base/cityscapes_coco.yaml -c configs/base/base.yaml -c configs/flowclas/flowclas_city.yaml
# --- Experiment ---
experiment:
logger: [wandb, csv]
name: flowclas
offline: false
project_name: flowclas_Cityscapes
wandb_id: null
task: segmentation
# --- Data ---
data:
divisor: 14
train_batch_size: 16
eval_batch_size: 8
city_train_transform:
class_path: albumentations.Compose
init_args:
transforms:
- class_path: HorizontalFlip
init_args:
p: 0.5
- class_path: RandomCrop
init_args:
height: 512
width: 1024
p: 1.0
coco_train_mix_transform:
class_path: albumentations.Compose
init_args:
transforms:
- class_path: RandomScaleV2
init_args:
scale_factors: [.1, .125, .25, .5, .5, .75]
interpolation: 3
p: 1.0
- class_path: PadIfNeeded
init_args:
min_height: 512
min_width: 1024
border_mode: 0
value: 0.0
mask_value: 255
always_apply: true
- class_path: CenterCrop
init_args:
height: 512
width: 1024
always_apply: true
coco_train_ood_transform:
class_path: albumentations.Compose
init_args:
transforms:
- class_path: PadIfNeeded
init_args:
min_height: 512
min_width: 1024
border_mode: 0
value: 0.0
mask_value: 255
always_apply: true
- class_path: CenterCrop
init_args:
height: 512
width: 1024
always_apply: true
# --- Model ---
model:
class_path: core.models.FlowCLAS
init_args:
backbone: rein_dinov2
backbone_ckpt: ../weights/rein_dinov2l_city.pth
layers: [0, 1, 2, 3]
proj_dim: 128
num_classes: 20
flow_steps: 16
use_gaussian: false
ood_index: 254
ignore_index: 255
alpha: 1e-6
temperature: 0.13
use_logp_score: false
use_sam: true
no_ood: false
subnet_type: residual
load_strict: false
use_seg: true
slide_inf_cfg:
enable: false
# --- Metrics (overrides base; full-resolution thresholds) ---
metrics:
image: []
pixel:
- class_path: BinaryAUROC
init_args:
thresholds: null
ignore_index: 255
- class_path: BinaryAP
init_args:
thresholds: null
ignore_index: 255
- class_path: RecallAt05
init_args:
thresholds: null
ignore_index: 255
- class_path: RecallAt01
init_args:
thresholds: null
ignore_index: 255
- class_path: FPR95
init_args:
thresholds: null
ignore_index: 255
- class_path: ECEMetric
init_args:
ignore_index: 255
- class_path: MCEMetric
init_args:
ignore_index: 255
# --- Optimization ---
optimizer:
class_path: torch.optim.AdamW
init_args:
lr: 1e-6
weight_decay: 1e-5
lr_scheduler:
class_path: LinearWarmupCosineAnnealingLR
init_args:
max_lr: 1e-6
# --- Visualization ---
visualization:
save: true
total: 10
features_only: false
# --- Checkpoint monitors (per OOD benchmark) ---
monitor1:
metric:
- p_FPR95-Fishy
- p_FPR95-RoadAnomaly
# - p_FPR95-AnomalyTrack
# - p_FPR95-ObstacleTrack
mode: min
monitor2:
metric:
- p_BinaryAP-Fishy
- p_BinaryAP-RoadAnomaly
# - p_BinaryAP-AnomalyTrack
# - p_BinaryAP-ObstacleTrack
mode: max
# --- Trainer overrides ---
trainer:
max_epochs: 600
# strategy: ddp_find_unused_parameters_true