MidasMap / config /config.yaml
AnikS22's picture
Upload config/config.yaml with huggingface_hub
35db09e verified
data:
# TODO: Update this path for your HPC cluster, e.g.:
# root: "/scratch/$USER/immunogold_data/Gold Particle Labelling"
root: "/Users/mpcr/Downloads/Max Planck Data/Gold Particle Labelling"
analyzed_dir: "analyzed synapses"
test_dir: "labeled replica - Test Data from Synapses"
synapse_ids: ["S1", "S4", "S7", "S8", "S13", "S15", "S22", "S25", "S27", "S29"]
# S7 and S15 have no 6nm annotations — exclude from 6nm evaluation
incomplete_6nm: ["S7", "S15"]
raw_dir: "data/raw"
annotation_dir: "data/annotations"
weights_dir: "weights"
patch_size: 512
stride: 2
bead_classes: ["6nm", "12nm"]
heatmap:
sigmas:
6nm: 1.0
12nm: 1.5
model:
backbone: "resnet50"
pretrained_weights: "weights/cem500k_mocov2_resnet50.pth.tar"
cem500k_url: "https://zenodo.org/records/6453140/files/cem500k_mocov2_resnet50_200ep.pth.tar?download=1"
bifpn_channels: 128
bifpn_rounds: 2
num_classes: 2
training:
batch_size: 8
n_seeds: 5
n_snapshot_epochs: [150, 170, 190]
hard_mining_fraction: 0.7
copy_paste_per_class: 5
phases:
phase1:
epochs: 60
lr: 1.0e-3
weight_decay: 1.0e-4
freeze_encoder: true
phase2:
epochs: 60
lr_layer3: 1.0e-5
lr_layer4: 5.0e-5
lr_decoder: 5.0e-4
weight_decay: 1.0e-4
phase3:
epochs: 80
lr_stem: 1.0e-6
lr_layer1: 5.0e-6
lr_layer2: 1.0e-5
lr_layer3: 5.0e-5
lr_layer4: 1.0e-4
lr_decoder: 2.0e-4
weight_decay: 1.0e-4
eta_min: 1.0e-7
loss:
focal_alpha: 2
focal_beta: 4
lambda_offset: 1.0
early_stopping:
patience: 20
monitor: "val_f1_mean"
postprocessing:
nms_kernel_size:
6nm: 3
12nm: 5
confidence_threshold_sweep:
start: 0.05
stop: 0.95
step: 0.01
mask_filter_margin_px: 5
cross_class_nms_distance_px: 8
evaluation:
match_radii_px:
6nm: 9
12nm: 15
loocv_val_offset: 1
tta:
enabled: true
n_geometric: 8 # D4 group: 4 rotations x 2 reflections
intensity_factors: [0.9, 1.1]
ensemble:
n_seeds: 5
snapshot_epochs: [150, 170, 190]
# Total ensemble members per fold: 5 seeds x 3 snapshots = 15