lantern-abeta / config.json
apooladi's picture
config
99e0249 verified
Raw History Blame Contribute Delete
5.82 kB
{
"model_type": "ResEncLUNet",
"task": "binary 3D segmentation of amyloid-beta plaques in light-sheet microscopy (all LANTERN Abeta cohorts)",
"framework": "pytorch",
"num_input_channels": 1,
"num_classes": 2,
"encoder": {
"name": "ResEncL",
"n_stages": 6,
"features_per_stage": [
32,
64,
128,
256,
320,
320
],
"frozen": true,
"init": "nnBYOL3D self-supervised pretraining on ~50k near-iso-4 light-sheet patches"
},
"params_total": 102462826,
"params_trainable": 12166250,
"input": {
"patch_size": [
128,
128,
128
],
"axes_order": "ZYX",
"voxel_size_um": {
"z": "2.75-4.4 (cohort dependent)",
"y": 3.25,
"x": 3.25
},
"dtype": "float32",
"note": "raw intensities; NOT N4-corrected or rescaled"
},
"preprocessing": {
"method": "per-tile percentile clip then z-score",
"clip_percentiles": [
0.5,
99.5
],
"order": "clip first, then mean/std computed on the clipped volume"
},
"inference": {
"n_folds": 5,
"combine": "sum of per-fold plaque decisions (softmax[1] >= 0.5); plaque where votes >= 3",
"prob_threshold": 0.5,
"tiling_stride": 64,
"tile_overlap_combine": "mean of per-fold softmax over overlapping tiles (not max)",
"recommended_precision": "bf16",
"recommended_batch_size": 8,
"benchmark_ms_per_tile_L40S": 27.8,
"recommended_postprocess": "drop predicted plaque components < 8 near-iso voxels"
},
"training": {
"n_patches": 178,
"n_subjects": 68,
"set": "v7/total_set/v1",
"composition": {
"ki3": 74,
"o22b": 4,
"mc4": 53,
"prune": 4,
"vac": 3,
"mapt": 40
},
"empty_plaque_patches": 19,
"patches_with_label2_folded_to_background": 25,
"cv": "5-fold, random patch-level split (NOT subject-grouped)",
"split_seed": 1234,
"gt_min_connected_component_voxels": 4,
"label_mode": "plaque",
"loss": "DiceCE (batch-Dice on plaque)",
"decoder_init": "random (no warm start)",
"encoder": "frozen SSL ResEncL (byol_c128)",
"epochs": 250,
"optimizer": "AdamW",
"lr": 0.001,
"warmup_epochs": 10,
"schedule": "cosine",
"batch_size": 2,
"accumulate_grad_batches": 4,
"precision": "bf16-mixed",
"checkpoint": "best-val object F1"
},
"evaluation": {
"primary_metric": "object F1 @ IoU>=0.5, 26-connectivity, per-fold validation split (36 patches), mean over 5 folds at each fold's best epoch",
"object_f1": 0.4589,
"object_f1_sd_over_folds": 0.06,
"precision": 0.426,
"recall": 0.501,
"fp_per_patch": 100.7,
"object_f1_with_pred_min_cc_8": 0.5042,
"fp_per_patch_with_pred_min_cc_8": 70.0,
"voxel_dice": 0.605,
"per_fold": [
{
"fp_per_patch": 108.88888549804688,
"fp_per_patch_predfilt": 74.02777862548828,
"loss": 0.3341991901397705,
"object_f1": 0.4092409312725067,
"object_f1_predfilt": 0.4598941504955292,
"object_precision": 0.36280885338783264,
"object_recall": 0.4693019390106201,
"voxel_dice": 0.6610821485519409,
"epoch": 99
},
{
"fp_per_patch": 81.22222137451172,
"fp_per_patch_predfilt": 58.83333206176758,
"loss": 0.3775239586830139,
"object_f1": 0.4456420838832855,
"object_f1_predfilt": 0.4795815646648407,
"object_precision": 0.45058247447013855,
"object_recall": 0.44080883264541626,
"voxel_dice": 0.7066648602485657,
"epoch": 64
},
{
"fp_per_patch": 99.97222137451172,
"fp_per_patch_predfilt": 66.44444274902344,
"loss": 0.2981194853782654,
"object_f1": 0.5641064643859863,
"object_f1_predfilt": 0.6198633313179016,
"object_precision": 0.5060389637947083,
"object_recall": 0.6372277736663818,
"voxel_dice": 0.6496661901473999,
"epoch": 119
},
{
"fp_per_patch": 122.68571472167969,
"fp_per_patch_predfilt": 88.71428680419922,
"loss": 0.49983668327331543,
"object_f1": 0.397587388753891,
"object_f1_predfilt": 0.4390422999858856,
"object_precision": 0.3591044843196869,
"object_recall": 0.4453081488609314,
"voxel_dice": 0.5200831294059753,
"epoch": 109
},
{
"fp_per_patch": 90.97142791748047,
"fp_per_patch_predfilt": 61.88571548461914,
"loss": 0.5084365010261536,
"object_f1": 0.47774097323417664,
"object_f1_predfilt": 0.5225977301597595,
"object_precision": 0.44923022389411926,
"object_recall": 0.5101158618927002,
"voxel_dice": 0.4864481985569,
"epoch": 24
}
],
"note": "patch-level CV with same-subject leakage; validation metric at the selected (best) epoch, so optimistic; LR 3e-4/1e-4 within 0.02; GT floor 8 variant +0.02 raw F1 / +0.05 pred-filtered F1 at identical voxel Dice"
},
"license": "cc-by-nc-4.0",
"code": "https://github.com/Arshya-Guru/LANTERN",
"classes": [
"background",
"plaque"
],
"hub_repo": "apooladi/lantern-abeta",
"arm": "scratchdec_mincc4_cond",
"weights": "best-val",
"bottleneck_conditioner": {
"enabled": true,
"inputs": [
"log1p(mean of raw tile)",
"log1p(std of raw tile)"
],
"where": "bottleneck (deepest encoder features), Linear(2->32) broadcast + 1x1x1 conv mix",
"standardisation": "per-fold buffers in state_dict (cond.log_mean_mu, cond.log_mean_sd, cond.log_std_mu, cond.log_std_sd)",
"train_dropout": 0.3,
"required_at_inference": true,
"forward_signature": "net(x, raw_mean=torch.tensor([[m]]), raw_std=torch.tensor([[s]])) # m, s over the RAW (unnormalised) 128^3 tile"
}
}