AnikS22 commited on
Commit
35db09e
·
verified ·
1 Parent(s): cfd9548

Upload config/config.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. config/config.yaml +94 -0
config/config.yaml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ data:
2
+ # TODO: Update this path for your HPC cluster, e.g.:
3
+ # root: "/scratch/$USER/immunogold_data/Gold Particle Labelling"
4
+ root: "/Users/mpcr/Downloads/Max Planck Data/Gold Particle Labelling"
5
+ analyzed_dir: "analyzed synapses"
6
+ test_dir: "labeled replica - Test Data from Synapses"
7
+ synapse_ids: ["S1", "S4", "S7", "S8", "S13", "S15", "S22", "S25", "S27", "S29"]
8
+ # S7 and S15 have no 6nm annotations — exclude from 6nm evaluation
9
+ incomplete_6nm: ["S7", "S15"]
10
+ raw_dir: "data/raw"
11
+ annotation_dir: "data/annotations"
12
+ weights_dir: "weights"
13
+ patch_size: 512
14
+ stride: 2
15
+ bead_classes: ["6nm", "12nm"]
16
+
17
+ heatmap:
18
+ sigmas:
19
+ 6nm: 1.0
20
+ 12nm: 1.5
21
+
22
+ model:
23
+ backbone: "resnet50"
24
+ pretrained_weights: "weights/cem500k_mocov2_resnet50.pth.tar"
25
+ cem500k_url: "https://zenodo.org/records/6453140/files/cem500k_mocov2_resnet50_200ep.pth.tar?download=1"
26
+ bifpn_channels: 128
27
+ bifpn_rounds: 2
28
+ num_classes: 2
29
+
30
+ training:
31
+ batch_size: 8
32
+ n_seeds: 5
33
+ n_snapshot_epochs: [150, 170, 190]
34
+ hard_mining_fraction: 0.7
35
+ copy_paste_per_class: 5
36
+
37
+ phases:
38
+ phase1:
39
+ epochs: 60
40
+ lr: 1.0e-3
41
+ weight_decay: 1.0e-4
42
+ freeze_encoder: true
43
+ phase2:
44
+ epochs: 60
45
+ lr_layer3: 1.0e-5
46
+ lr_layer4: 5.0e-5
47
+ lr_decoder: 5.0e-4
48
+ weight_decay: 1.0e-4
49
+ phase3:
50
+ epochs: 80
51
+ lr_stem: 1.0e-6
52
+ lr_layer1: 5.0e-6
53
+ lr_layer2: 1.0e-5
54
+ lr_layer3: 5.0e-5
55
+ lr_layer4: 1.0e-4
56
+ lr_decoder: 2.0e-4
57
+ weight_decay: 1.0e-4
58
+ eta_min: 1.0e-7
59
+
60
+ loss:
61
+ focal_alpha: 2
62
+ focal_beta: 4
63
+ lambda_offset: 1.0
64
+
65
+ early_stopping:
66
+ patience: 20
67
+ monitor: "val_f1_mean"
68
+
69
+ postprocessing:
70
+ nms_kernel_size:
71
+ 6nm: 3
72
+ 12nm: 5
73
+ confidence_threshold_sweep:
74
+ start: 0.05
75
+ stop: 0.95
76
+ step: 0.01
77
+ mask_filter_margin_px: 5
78
+ cross_class_nms_distance_px: 8
79
+
80
+ evaluation:
81
+ match_radii_px:
82
+ 6nm: 9
83
+ 12nm: 15
84
+ loocv_val_offset: 1
85
+
86
+ tta:
87
+ enabled: true
88
+ n_geometric: 8 # D4 group: 4 rotations x 2 reflections
89
+ intensity_factors: [0.9, 1.1]
90
+
91
+ ensemble:
92
+ n_seeds: 5
93
+ snapshot_epochs: [150, 170, 190]
94
+ # Total ensemble members per fold: 5 seeds x 3 snapshots = 15