Upload trained FetalVision ensemble and model card
Browse files- README.md +44 -0
- ensemble/summary.json +88 -0
- models/seed1337/best_model.pt +3 -0
- models/seed1337/summary.json +145 -0
- models/seed2026/best_model.pt +3 -0
- models/seed2026/score_distributions.png +0 -0
- models/seed2026/summary.json +145 -0
- models/seed2026/training_history.png +0 -0
- models/seed42/best_model.pt +3 -0
- models/seed42/summary.json +143 -0
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
pipeline_tag: image-classification
|
| 4 |
+
tags:
|
| 5 |
+
- medical-imaging
|
| 6 |
+
- ultrasound
|
| 7 |
+
- fetal-ultrasound
|
| 8 |
+
- anomaly-detection
|
| 9 |
+
- out-of-distribution-detection
|
| 10 |
+
- autoencoder
|
| 11 |
+
license: other
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# FetalVision
|
| 15 |
+
|
| 16 |
+
PyTorch hybrid autoencoder + latent classifier for detecting non-standard/OOD fetal ultrasound views. The production ensemble combines three independently trained seeds.
|
| 17 |
+
|
| 18 |
+
## Results
|
| 19 |
+
|
| 20 |
+
| Model | ROC-AUC | AP | F1 | Accuracy |
|
| 21 |
+
|---|---:|---:|---:|---:|
|
| 22 |
+
| Best single model (seed 2026) | 0.9754 | 0.9630 | 0.8782 | 0.9132 |
|
| 23 |
+
| Three-seed ensemble | **0.9796** | **0.9680** | **0.8887** | **0.9219** |
|
| 24 |
+
|
| 25 |
+
The ensemble uses weights `0.30 / 0.35 / 0.35` for seeds `42 / 1337 / 2026`, selected only on the validation set.
|
| 26 |
+
|
| 27 |
+
## Files
|
| 28 |
+
|
| 29 |
+
- `models/seed42/best_model.pt`
|
| 30 |
+
- `models/seed1337/best_model.pt`
|
| 31 |
+
- `models/seed2026/best_model.pt`
|
| 32 |
+
- `ensemble/summary.json`
|
| 33 |
+
- Per-run summaries under each model directory
|
| 34 |
+
- Training and score-distribution plots for the best single run
|
| 35 |
+
|
| 36 |
+
Architecture and preprocessing configuration are stored inside every checkpoint and summary file. Full source code and reproducible training commands are available in [GitHub FetalVision](https://github.com/Tiendat88/FetalVision).
|
| 37 |
+
|
| 38 |
+
## Intended use and limitations
|
| 39 |
+
|
| 40 |
+
`Other` is a proxy for non-standard/out-of-distribution views. It is **not** a fetal pathology label, and this model must not be interpreted as a diagnostic system. Clinical deployment requires external validation, calibration and appropriate regulatory review.
|
| 41 |
+
|
| 42 |
+
## Dataset attribution
|
| 43 |
+
|
| 44 |
+
Trained using FETAL_PLANES_DB by Burgos-Artizzu et al., DOI: [10.5281/zenodo.3904280](https://doi.org/10.5281/zenodo.3904280). The source record does not state a machine-readable license, so this model card uses `license: other` rather than inventing a license.
|
ensemble/summary.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"selection_rule": "Weights and threshold selected only on validation; test used once.",
|
| 3 |
+
"run_dirs": [
|
| 4 |
+
"results/fetal_hybrid/multitask_latent32",
|
| 5 |
+
"results/fetal_hybrid/multitask_latent32_seed1337",
|
| 6 |
+
"results/fetal_hybrid/multitask_latent32_seed2026"
|
| 7 |
+
],
|
| 8 |
+
"weights": [
|
| 9 |
+
0.3,
|
| 10 |
+
0.35,
|
| 11 |
+
0.35
|
| 12 |
+
],
|
| 13 |
+
"validation_transforms": [
|
| 14 |
+
{
|
| 15 |
+
"center": -4.879263421528585e-17,
|
| 16 |
+
"scale": 0.8994131898406392
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"center": 1.8297237830732194e-17,
|
| 20 |
+
"scale": 0.9074870790939894
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"center": -1.2808066481512535e-16,
|
| 24 |
+
"scale": 0.911522702986242
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"validation_metrics": {
|
| 28 |
+
"roc_auc": 0.9655443976832369,
|
| 29 |
+
"average_precision": 0.9462326287165863,
|
| 30 |
+
"threshold": 1.402689945385293,
|
| 31 |
+
"accuracy": 0.9040942232192933,
|
| 32 |
+
"precision": 0.8465116279069768,
|
| 33 |
+
"recall": 0.883495145631068,
|
| 34 |
+
"specificity": 0.9150214592274678,
|
| 35 |
+
"f1": 0.8646080760095013,
|
| 36 |
+
"tp": 546,
|
| 37 |
+
"tn": 1066,
|
| 38 |
+
"fp": 99,
|
| 39 |
+
"fn": 72
|
| 40 |
+
},
|
| 41 |
+
"test_metrics": {
|
| 42 |
+
"roc_auc": 0.9796,
|
| 43 |
+
"average_precision": 0.9680119784953686,
|
| 44 |
+
"threshold": 1.402689945385293,
|
| 45 |
+
"accuracy": 0.9218665219750407,
|
| 46 |
+
"precision": 0.85949177877429,
|
| 47 |
+
"recall": 0.92,
|
| 48 |
+
"specificity": 0.922824302134647,
|
| 49 |
+
"f1": 0.8887171561051004,
|
| 50 |
+
"tp": 575,
|
| 51 |
+
"tn": 1124,
|
| 52 |
+
"fp": 94,
|
| 53 |
+
"fn": 50
|
| 54 |
+
},
|
| 55 |
+
"test_per_class": {
|
| 56 |
+
"Fetal abdomen": {
|
| 57 |
+
"count": 106,
|
| 58 |
+
"mean_ensemble_score": 0.9559957136424069,
|
| 59 |
+
"predicted_other_rate": 0.22641509433962265
|
| 60 |
+
},
|
| 61 |
+
"Fetal brain": {
|
| 62 |
+
"count": 471,
|
| 63 |
+
"mean_ensemble_score": -0.45007270602595306,
|
| 64 |
+
"predicted_other_rate": 0.008492569002123142
|
| 65 |
+
},
|
| 66 |
+
"Fetal femur": {
|
| 67 |
+
"count": 159,
|
| 68 |
+
"mean_ensemble_score": 0.9591376994201026,
|
| 69 |
+
"predicted_other_rate": 0.27044025157232704
|
| 70 |
+
},
|
| 71 |
+
"Fetal thorax": {
|
| 72 |
+
"count": 262,
|
| 73 |
+
"mean_ensemble_score": 0.4298571036400613,
|
| 74 |
+
"predicted_other_rate": 0.08396946564885496
|
| 75 |
+
},
|
| 76 |
+
"Maternal cervix": {
|
| 77 |
+
"count": 220,
|
| 78 |
+
"mean_ensemble_score": -0.6689015967861202,
|
| 79 |
+
"predicted_other_rate": 0.004545454545454545
|
| 80 |
+
},
|
| 81 |
+
"Other": {
|
| 82 |
+
"count": 625,
|
| 83 |
+
"mean_ensemble_score": 3.679058146636188,
|
| 84 |
+
"predicted_other_rate": 0.92
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"task_limitation": "Other is a proxy for non-standard/OOD views, not fetal pathology."
|
| 88 |
+
}
|
models/seed1337/best_model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f6a781db18a5c050ccb572ce3e8d9da0b74c83ea41b2c7f2cd45dcccd06b895
|
| 3 |
+
size 3132021
|
models/seed1337/summary.json
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_name": "multitask_latent32_seed1337",
|
| 3 |
+
"device": "mps",
|
| 4 |
+
"parameter_count": 777986,
|
| 5 |
+
"best_epoch": 13,
|
| 6 |
+
"epochs_completed": 16,
|
| 7 |
+
"training_seconds": 1000.590726791881,
|
| 8 |
+
"data": {
|
| 9 |
+
"train_images": 8290,
|
| 10 |
+
"train_standard": 5522,
|
| 11 |
+
"train_other": 2768,
|
| 12 |
+
"validation_images": 1783,
|
| 13 |
+
"test_images": 1843,
|
| 14 |
+
"image_size": [
|
| 15 |
+
128,
|
| 16 |
+
192
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
"configuration": {
|
| 20 |
+
"manifest_dir": "data/fetal_planes",
|
| 21 |
+
"output_root": "results/fetal_hybrid",
|
| 22 |
+
"run_name": "multitask_latent32_seed1337",
|
| 23 |
+
"epochs": 16,
|
| 24 |
+
"patience": 5,
|
| 25 |
+
"batch_size": 64,
|
| 26 |
+
"num_workers": 0,
|
| 27 |
+
"image_height": 128,
|
| 28 |
+
"image_width": 192,
|
| 29 |
+
"base_channels": 32,
|
| 30 |
+
"latent_channels": 32,
|
| 31 |
+
"reconstruction_loss": "hybrid",
|
| 32 |
+
"classification_weight": 0.75,
|
| 33 |
+
"noise_std": 0.02,
|
| 34 |
+
"mask_prob": 0.1,
|
| 35 |
+
"learning_rate": 0.001,
|
| 36 |
+
"weight_decay": 0.0001,
|
| 37 |
+
"seed": 1337,
|
| 38 |
+
"device": "auto",
|
| 39 |
+
"no_progress": false,
|
| 40 |
+
"resume": false,
|
| 41 |
+
"max_train_samples": null,
|
| 42 |
+
"max_eval_samples": null
|
| 43 |
+
},
|
| 44 |
+
"ensemble": {
|
| 45 |
+
"classifier_weight": 0.9,
|
| 46 |
+
"reconstruction_weight": 0.09999999999999998,
|
| 47 |
+
"reconstruction_center": -4.269355493837512e-17,
|
| 48 |
+
"reconstruction_scale": 0.9999999999999998,
|
| 49 |
+
"classifier_center": -5.557549904197327,
|
| 50 |
+
"classifier_scale": 3.3953835769454943,
|
| 51 |
+
"threshold": 1.3463199026148178,
|
| 52 |
+
"validation_auc": 0.9569232051335472,
|
| 53 |
+
"validation_f1": 0.8465863453815261,
|
| 54 |
+
"reconstruction_model": {
|
| 55 |
+
"component_names": [
|
| 56 |
+
"mse",
|
| 57 |
+
"mae",
|
| 58 |
+
"ssim",
|
| 59 |
+
"gradient"
|
| 60 |
+
],
|
| 61 |
+
"center": [
|
| 62 |
+
0.005649745710246073,
|
| 63 |
+
0.0483627147333049,
|
| 64 |
+
0.34110302091156464,
|
| 65 |
+
0.024708705716826374
|
| 66 |
+
],
|
| 67 |
+
"scale": [
|
| 68 |
+
0.002281657884645313,
|
| 69 |
+
0.012843779402067698,
|
| 70 |
+
0.057011465334869435,
|
| 71 |
+
0.006235540250448552
|
| 72 |
+
],
|
| 73 |
+
"weights": [
|
| 74 |
+
1.0,
|
| 75 |
+
0.0,
|
| 76 |
+
0.0,
|
| 77 |
+
0.0
|
| 78 |
+
],
|
| 79 |
+
"threshold": -1.0451513311018779,
|
| 80 |
+
"validation_auc": 0.6163270691834382,
|
| 81 |
+
"validation_f1": 0.5375565610859728
|
| 82 |
+
}
|
| 83 |
+
},
|
| 84 |
+
"validation_metrics": {
|
| 85 |
+
"roc_auc": 0.9569232051335472,
|
| 86 |
+
"average_precision": 0.9340889725557499,
|
| 87 |
+
"threshold": 1.3463199026148178,
|
| 88 |
+
"accuracy": 0.8928771733034212,
|
| 89 |
+
"precision": 0.8405103668261563,
|
| 90 |
+
"recall": 0.8527508090614887,
|
| 91 |
+
"specificity": 0.9141630901287554,
|
| 92 |
+
"f1": 0.8465863453815261,
|
| 93 |
+
"tp": 527,
|
| 94 |
+
"tn": 1065,
|
| 95 |
+
"fp": 100,
|
| 96 |
+
"fn": 91
|
| 97 |
+
},
|
| 98 |
+
"test_metrics": {
|
| 99 |
+
"roc_auc": 0.9732853858784893,
|
| 100 |
+
"average_precision": 0.9587582026053482,
|
| 101 |
+
"threshold": 1.3463199026148178,
|
| 102 |
+
"accuracy": 0.9120998372219208,
|
| 103 |
+
"precision": 0.8419497784342689,
|
| 104 |
+
"recall": 0.912,
|
| 105 |
+
"specificity": 0.9121510673234812,
|
| 106 |
+
"f1": 0.8755760368663594,
|
| 107 |
+
"tp": 570,
|
| 108 |
+
"tn": 1111,
|
| 109 |
+
"fp": 107,
|
| 110 |
+
"fn": 55
|
| 111 |
+
},
|
| 112 |
+
"test_per_class": {
|
| 113 |
+
"Fetal abdomen": {
|
| 114 |
+
"count": 106,
|
| 115 |
+
"mean_anomaly_score": 0.9546521653304901,
|
| 116 |
+
"predicted_other_rate": 0.27358490566037735
|
| 117 |
+
},
|
| 118 |
+
"Fetal brain": {
|
| 119 |
+
"count": 471,
|
| 120 |
+
"mean_anomaly_score": -0.37824112049043424,
|
| 121 |
+
"predicted_other_rate": 0.016985138004246284
|
| 122 |
+
},
|
| 123 |
+
"Fetal femur": {
|
| 124 |
+
"count": 159,
|
| 125 |
+
"mean_anomaly_score": 0.8448219699689173,
|
| 126 |
+
"predicted_other_rate": 0.22641509433962265
|
| 127 |
+
},
|
| 128 |
+
"Fetal thorax": {
|
| 129 |
+
"count": 262,
|
| 130 |
+
"mean_anomaly_score": 0.4083387485165997,
|
| 131 |
+
"predicted_other_rate": 0.12213740458015267
|
| 132 |
+
},
|
| 133 |
+
"Maternal cervix": {
|
| 134 |
+
"count": 220,
|
| 135 |
+
"mean_anomaly_score": -0.648014399132354,
|
| 136 |
+
"predicted_other_rate": 0.00909090909090909
|
| 137 |
+
},
|
| 138 |
+
"Other": {
|
| 139 |
+
"count": 625,
|
| 140 |
+
"mean_anomaly_score": 3.363634500886128,
|
| 141 |
+
"predicted_other_rate": 0.912
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
"task_limitation": "Other is a proxy for non-standard/OOD views, not fetal pathology."
|
| 145 |
+
}
|
models/seed2026/best_model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:842a4e5f01f554a317088fc4f5d6a8fed77dd89806340370246d9f8241742421
|
| 3 |
+
size 3132021
|
models/seed2026/score_distributions.png
ADDED
|
models/seed2026/summary.json
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_name": "multitask_latent32_seed2026",
|
| 3 |
+
"device": "mps",
|
| 4 |
+
"parameter_count": 777986,
|
| 5 |
+
"best_epoch": 10,
|
| 6 |
+
"epochs_completed": 15,
|
| 7 |
+
"training_seconds": 935.708518124884,
|
| 8 |
+
"data": {
|
| 9 |
+
"train_images": 8290,
|
| 10 |
+
"train_standard": 5522,
|
| 11 |
+
"train_other": 2768,
|
| 12 |
+
"validation_images": 1783,
|
| 13 |
+
"test_images": 1843,
|
| 14 |
+
"image_size": [
|
| 15 |
+
128,
|
| 16 |
+
192
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
"configuration": {
|
| 20 |
+
"manifest_dir": "data/fetal_planes",
|
| 21 |
+
"output_root": "results/fetal_hybrid",
|
| 22 |
+
"run_name": "multitask_latent32_seed2026",
|
| 23 |
+
"epochs": 16,
|
| 24 |
+
"patience": 5,
|
| 25 |
+
"batch_size": 64,
|
| 26 |
+
"num_workers": 0,
|
| 27 |
+
"image_height": 128,
|
| 28 |
+
"image_width": 192,
|
| 29 |
+
"base_channels": 32,
|
| 30 |
+
"latent_channels": 32,
|
| 31 |
+
"reconstruction_loss": "hybrid",
|
| 32 |
+
"classification_weight": 0.75,
|
| 33 |
+
"noise_std": 0.02,
|
| 34 |
+
"mask_prob": 0.1,
|
| 35 |
+
"learning_rate": 0.001,
|
| 36 |
+
"weight_decay": 0.0001,
|
| 37 |
+
"seed": 2026,
|
| 38 |
+
"device": "auto",
|
| 39 |
+
"no_progress": false,
|
| 40 |
+
"resume": false,
|
| 41 |
+
"max_train_samples": null,
|
| 42 |
+
"max_eval_samples": null
|
| 43 |
+
},
|
| 44 |
+
"ensemble": {
|
| 45 |
+
"classifier_weight": 0.9,
|
| 46 |
+
"reconstruction_weight": 0.09999999999999998,
|
| 47 |
+
"reconstruction_center": -2.4396317107642924e-17,
|
| 48 |
+
"reconstruction_scale": 0.9999999999999994,
|
| 49 |
+
"classifier_center": -4.182426768029708,
|
| 50 |
+
"classifier_scale": 2.764643149539139,
|
| 51 |
+
"threshold": 1.2869621288438537,
|
| 52 |
+
"validation_auc": 0.9585107712821368,
|
| 53 |
+
"validation_f1": 0.847723704866562,
|
| 54 |
+
"reconstruction_model": {
|
| 55 |
+
"component_names": [
|
| 56 |
+
"mse",
|
| 57 |
+
"mae",
|
| 58 |
+
"ssim",
|
| 59 |
+
"gradient"
|
| 60 |
+
],
|
| 61 |
+
"center": [
|
| 62 |
+
0.005860817135019875,
|
| 63 |
+
0.04767355534523853,
|
| 64 |
+
0.3397925037682824,
|
| 65 |
+
0.024900084672407785
|
| 66 |
+
],
|
| 67 |
+
"scale": [
|
| 68 |
+
0.002498879624278239,
|
| 69 |
+
0.012349472025245112,
|
| 70 |
+
0.05600078434992182,
|
| 71 |
+
0.0061834939655143325
|
| 72 |
+
],
|
| 73 |
+
"weights": [
|
| 74 |
+
1.0,
|
| 75 |
+
0.0,
|
| 76 |
+
0.0,
|
| 77 |
+
0.0
|
| 78 |
+
],
|
| 79 |
+
"threshold": -0.5639049616176401,
|
| 80 |
+
"validation_auc": 0.6708807311415753,
|
| 81 |
+
"validation_f1": 0.5643363728470111
|
| 82 |
+
}
|
| 83 |
+
},
|
| 84 |
+
"validation_metrics": {
|
| 85 |
+
"roc_auc": 0.9585107712821368,
|
| 86 |
+
"average_precision": 0.9363763181699387,
|
| 87 |
+
"threshold": 1.2869621288438537,
|
| 88 |
+
"accuracy": 0.8911946158160404,
|
| 89 |
+
"precision": 0.823170731707317,
|
| 90 |
+
"recall": 0.8737864077669902,
|
| 91 |
+
"specificity": 0.9004291845493563,
|
| 92 |
+
"f1": 0.8477237048665619,
|
| 93 |
+
"tp": 540,
|
| 94 |
+
"tn": 1049,
|
| 95 |
+
"fp": 116,
|
| 96 |
+
"fn": 78
|
| 97 |
+
},
|
| 98 |
+
"test_metrics": {
|
| 99 |
+
"roc_auc": 0.9753556650246306,
|
| 100 |
+
"average_precision": 0.9630265423503459,
|
| 101 |
+
"threshold": 1.2869621288438537,
|
| 102 |
+
"accuracy": 0.9131850244167119,
|
| 103 |
+
"precision": 0.8374455732946299,
|
| 104 |
+
"recall": 0.9232,
|
| 105 |
+
"specificity": 0.9080459770114943,
|
| 106 |
+
"f1": 0.878234398782344,
|
| 107 |
+
"tp": 577,
|
| 108 |
+
"tn": 1106,
|
| 109 |
+
"fp": 112,
|
| 110 |
+
"fn": 48
|
| 111 |
+
},
|
| 112 |
+
"test_per_class": {
|
| 113 |
+
"Fetal abdomen": {
|
| 114 |
+
"count": 106,
|
| 115 |
+
"mean_anomaly_score": 0.8289849242845742,
|
| 116 |
+
"predicted_other_rate": 0.2169811320754717
|
| 117 |
+
},
|
| 118 |
+
"Fetal brain": {
|
| 119 |
+
"count": 471,
|
| 120 |
+
"mean_anomaly_score": -0.39380829337040435,
|
| 121 |
+
"predicted_other_rate": 0.01910828025477707
|
| 122 |
+
},
|
| 123 |
+
"Fetal femur": {
|
| 124 |
+
"count": 159,
|
| 125 |
+
"mean_anomaly_score": 0.8886497961974562,
|
| 126 |
+
"predicted_other_rate": 0.2641509433962264
|
| 127 |
+
},
|
| 128 |
+
"Fetal thorax": {
|
| 129 |
+
"count": 262,
|
| 130 |
+
"mean_anomaly_score": 0.40608574766650485,
|
| 131 |
+
"predicted_other_rate": 0.12213740458015267
|
| 132 |
+
},
|
| 133 |
+
"Maternal cervix": {
|
| 134 |
+
"count": 220,
|
| 135 |
+
"mean_anomaly_score": -0.56403287603023,
|
| 136 |
+
"predicted_other_rate": 0.02727272727272727
|
| 137 |
+
},
|
| 138 |
+
"Other": {
|
| 139 |
+
"count": 625,
|
| 140 |
+
"mean_anomaly_score": 3.6597532778300024,
|
| 141 |
+
"predicted_other_rate": 0.9232
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
"task_limitation": "Other is a proxy for non-standard/OOD views, not fetal pathology."
|
| 145 |
+
}
|
models/seed2026/training_history.png
ADDED
|
models/seed42/best_model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bbad934b5d174570fd77c5d9b7a5f2b9709cd448775bcf912a3b625bcf8148da
|
| 3 |
+
size 3131957
|
models/seed42/summary.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_name": "multitask_latent32",
|
| 3 |
+
"device": "mps",
|
| 4 |
+
"parameter_count": 777986,
|
| 5 |
+
"best_epoch": 16,
|
| 6 |
+
"epochs_completed": 18,
|
| 7 |
+
"training_seconds": 1112.1197183751501,
|
| 8 |
+
"data": {
|
| 9 |
+
"train_images": 8290,
|
| 10 |
+
"train_standard": 5522,
|
| 11 |
+
"train_other": 2768,
|
| 12 |
+
"validation_images": 1783,
|
| 13 |
+
"test_images": 1843,
|
| 14 |
+
"image_size": [
|
| 15 |
+
128,
|
| 16 |
+
192
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
"configuration": {
|
| 20 |
+
"manifest_dir": "data/fetal_planes",
|
| 21 |
+
"output_root": "results/fetal_hybrid",
|
| 22 |
+
"run_name": "multitask_latent32",
|
| 23 |
+
"epochs": 18,
|
| 24 |
+
"patience": 5,
|
| 25 |
+
"batch_size": 64,
|
| 26 |
+
"num_workers": 0,
|
| 27 |
+
"image_height": 128,
|
| 28 |
+
"image_width": 192,
|
| 29 |
+
"base_channels": 32,
|
| 30 |
+
"latent_channels": 32,
|
| 31 |
+
"reconstruction_loss": "hybrid",
|
| 32 |
+
"classification_weight": 0.5,
|
| 33 |
+
"noise_std": 0.02,
|
| 34 |
+
"mask_prob": 0.1,
|
| 35 |
+
"learning_rate": 0.001,
|
| 36 |
+
"weight_decay": 0.0001,
|
| 37 |
+
"seed": 42,
|
| 38 |
+
"device": "auto",
|
| 39 |
+
"max_train_samples": null,
|
| 40 |
+
"max_eval_samples": null
|
| 41 |
+
},
|
| 42 |
+
"ensemble": {
|
| 43 |
+
"classifier_weight": 0.9,
|
| 44 |
+
"reconstruction_weight": 0.09999999999999998,
|
| 45 |
+
"reconstruction_center": 2.0126961613805414e-16,
|
| 46 |
+
"reconstruction_scale": 1.0,
|
| 47 |
+
"classifier_center": -5.662346615594344,
|
| 48 |
+
"classifier_scale": 4.1553970784992575,
|
| 49 |
+
"threshold": 1.1421258880475764,
|
| 50 |
+
"validation_auc": 0.9512326902509827,
|
| 51 |
+
"validation_f1": 0.8403100775193798,
|
| 52 |
+
"reconstruction_model": {
|
| 53 |
+
"component_names": [
|
| 54 |
+
"mse",
|
| 55 |
+
"mae",
|
| 56 |
+
"ssim",
|
| 57 |
+
"gradient"
|
| 58 |
+
],
|
| 59 |
+
"center": [
|
| 60 |
+
0.004555416000255507,
|
| 61 |
+
0.04290066549930194,
|
| 62 |
+
0.30361355169648263,
|
| 63 |
+
0.024029070083771396
|
| 64 |
+
],
|
| 65 |
+
"scale": [
|
| 66 |
+
0.0020560742402685656,
|
| 67 |
+
0.011212009145435244,
|
| 68 |
+
0.0526615634960164,
|
| 69 |
+
0.006134039633209833
|
| 70 |
+
],
|
| 71 |
+
"weights": [
|
| 72 |
+
1.0,
|
| 73 |
+
0.0,
|
| 74 |
+
0.0,
|
| 75 |
+
0.0
|
| 76 |
+
],
|
| 77 |
+
"threshold": -0.49046945466388703,
|
| 78 |
+
"validation_auc": 0.6264136005666903,
|
| 79 |
+
"validation_f1": 0.525067385444744
|
| 80 |
+
}
|
| 81 |
+
},
|
| 82 |
+
"validation_metrics": {
|
| 83 |
+
"roc_auc": 0.9512326902509827,
|
| 84 |
+
"average_precision": 0.9231059731189711,
|
| 85 |
+
"threshold": 1.1421258880475764,
|
| 86 |
+
"accuracy": 0.8844643858665171,
|
| 87 |
+
"precision": 0.8065476190476191,
|
| 88 |
+
"recall": 0.8770226537216829,
|
| 89 |
+
"specificity": 0.8884120171673819,
|
| 90 |
+
"f1": 0.8403100775193799,
|
| 91 |
+
"tp": 542,
|
| 92 |
+
"tn": 1035,
|
| 93 |
+
"fp": 130,
|
| 94 |
+
"fn": 76
|
| 95 |
+
},
|
| 96 |
+
"test_metrics": {
|
| 97 |
+
"roc_auc": 0.9699619047619048,
|
| 98 |
+
"average_precision": 0.9525875374458892,
|
| 99 |
+
"threshold": 1.1421258880475764,
|
| 100 |
+
"accuracy": 0.9028757460661965,
|
| 101 |
+
"precision": 0.8140845070422535,
|
| 102 |
+
"recall": 0.9248,
|
| 103 |
+
"specificity": 0.8916256157635468,
|
| 104 |
+
"f1": 0.8659176029962546,
|
| 105 |
+
"tp": 578,
|
| 106 |
+
"tn": 1086,
|
| 107 |
+
"fp": 132,
|
| 108 |
+
"fn": 47
|
| 109 |
+
},
|
| 110 |
+
"test_per_class": {
|
| 111 |
+
"Fetal abdomen": {
|
| 112 |
+
"count": 106,
|
| 113 |
+
"mean_anomaly_score": 0.8079648503537046,
|
| 114 |
+
"predicted_other_rate": 0.2641509433962264
|
| 115 |
+
},
|
| 116 |
+
"Fetal brain": {
|
| 117 |
+
"count": 471,
|
| 118 |
+
"mean_anomaly_score": -0.45864318004349613,
|
| 119 |
+
"predicted_other_rate": 0.021231422505307854
|
| 120 |
+
},
|
| 121 |
+
"Fetal femur": {
|
| 122 |
+
"count": 159,
|
| 123 |
+
"mean_anomaly_score": 0.8756956074685064,
|
| 124 |
+
"predicted_other_rate": 0.3333333333333333
|
| 125 |
+
},
|
| 126 |
+
"Fetal thorax": {
|
| 127 |
+
"count": 262,
|
| 128 |
+
"mean_anomaly_score": 0.3491010159813523,
|
| 129 |
+
"predicted_other_rate": 0.13740458015267176
|
| 130 |
+
},
|
| 131 |
+
"Maternal cervix": {
|
| 132 |
+
"count": 220,
|
| 133 |
+
"mean_anomaly_score": -0.6068094958164075,
|
| 134 |
+
"predicted_other_rate": 0.022727272727272728
|
| 135 |
+
},
|
| 136 |
+
"Other": {
|
| 137 |
+
"count": 625,
|
| 138 |
+
"mean_anomaly_score": 2.927662350913958,
|
| 139 |
+
"predicted_other_rate": 0.9248
|
| 140 |
+
}
|
| 141 |
+
},
|
| 142 |
+
"task_limitation": "Other is a proxy for non-standard/OOD views, not fetal pathology."
|
| 143 |
+
}
|