nnU-Net (3d_fullres) breast mask for bMRIPrep
Bilateral breast segmentation network used as the seg='nnunet' option of the
bMRIPrep pipeline. It is a standard
nnU-Net v2 3d_fullres model (trainer nnUNetTrainer_250epochs, single channel,
labels: 0 background, 1 breast) trained on all 25 manually segmented sessions
(23 subjects) of the bMRIPrep segmentation set. Input is the pre-contrast
T1-weighted volume on its native grid.
This repository holds a single model, fold_all, trained on every session. It is
not a cross-validation ensemble.
Use
pip install nnunetv2 huggingface_hub
from huggingface_hub import snapshot_download
model = snapshot_download("doggywastaken/nnunet-3d-fullres-bmri-prep")
then either pass model to seg_nnunet(..., model=model, folds=("all",)) in
bMRIPrep, or call nnU-Net directly:
nnUNetv2_predict_from_modelfolder -i <in> -o <out> -m <model> -f all -chk checkpoint_final.pth
Input files must be named <case>_0000.nii.gz. The output is a binary breast mask
on the input grid; bMRIPrep splits it into left and right breasts.
Performance
Reported from five-fold cross-validation of the same configuration (the same 25
sessions, subject-wise folds, checkpoint_final.pth, no ensembling), not from this
final model, which has no held-out data: Dice 0.945 +/- 0.019 and HD95 9.7 +/- 6.0 voxels
(input grid, n = 25 volumes). Numbers computed on the
sessions the model was trained on are not a measure of generalisation.
Limitations
Trained on a small set (25 sessions) from a few sources and scanners. Expect degraded results on protocols, field strengths or contrast phases unlike the training data, and check the masks visually. Research use only; not a medical device and not for clinical decisions.