| ---
|
| license: apache-2.0
|
| library_name: monai
|
| pipeline_tag: image-segmentation
|
| datasets:
|
| - AIOmarRehan/medtrace-rhuh-gbm-derived
|
| tags:
|
| - medical-imaging
|
| - mri
|
| - brain-tumour
|
| - segmentation
|
| - segresnet
|
| - monai
|
| - brats
|
| - 3d
|
| ---
|
|
|
| # MEDTRACE brain tumour segmentation (SegResNet)
|
|
|
| 3D tumour compartment segmentation from four co-registered MRI sequences. Trained on BraTS 2023 GLI and published as part of the [MEDTRACE](https://huggingface.co/spaces/AIOmarRehan/medtrace) longitudinal workstation, which deliberately **does not** measure with it. [Why](#a-note-on-how-medtrace-uses-this).
|
|
|
| > [!WARNING]
|
| > **Research prototype. Not a medical device.** Not for diagnosis, treatment planning, or any clinical decision. Not clinically validated. It has been measured against one annotation protocol on one dataset, which is agreement, not clinical accuracy.
|
|
|
| ## Results on the held-out test split
|
|
|
| 186 cases from 169 subjects, split by subject so no subject appears in two splits.
|
|
|
| | Region | Dice mean | Dice median | HD95 median | Sensitivity | Precision |
|
| |---|---|---|---|---|---|
|
| | Tumour core | 0.908 | 0.956 | 2.00 | 0.917 | 0.917 |
|
| | Whole tumour | 0.922 | 0.949 | 2.45 | 0.925 | 0.924 |
|
| | Enhancing tumour | 0.852 | 0.898 | 1.41 | 0.883 | 0.849 |
|
|
|
| Empty regions follow the BraTS convention: with empty ground truth, Dice is 1 if the prediction is also empty and 0 otherwise, rather than being averaged away as NaN.
|
|
|
| **Use the test figures, not the validation ones.** Epoch selection and post-processing thresholds were both tuned on the validation split, so validation numbers are optimistic by construction.
|
|
|
| ## Files
|
|
|
| | File | Size | Contents |
|
| |---|---|---|
|
| | `medtrace_seg_best.pt` | 72 MB | Selected weights, epoch 32 |
|
| | `medtrace_seg.torchscript.pt` | 72 MB | TorchScript export, no MONAI needed to run |
|
| | `model_card.json` | 6 KB | Full machine-readable card: architecture, contracts, metrics, environment |
|
|
|
| ## Input contract
|
|
|
| **Channel order is not recoverable from the weights. The wrong order gives wrong output and no error.**
|
|
|
| ```
|
| channels: [t1c, t1n, t2f, t2w]
|
| normalisation: per case, per channel, zero mean unit variance over NON-ZERO voxels only
|
| spacing: 1.0 x 1.0 x 1.0 mm
|
| preprocessing: skull-stripped and co-registered, as BraTS 2023 distributes it
|
| cropping: non-zero bounding box of the summed channels, 4 voxel margin
|
| patch size: 128 x 128 x 128
|
| inference: sliding window, overlap 0.5, gaussian blend
|
| ```
|
|
|
| ## Output contract
|
|
|
| Three **overlapping** channels with independent sigmoid activation, not a softmax over classes.
|
|
|
| | Channel | Meaning |
|
| |---|---|
|
| | `TC` | Tumour core: necrotic core + enhancing |
|
| | `WT` | Whole tumour: necrotic core + oedema + enhancing |
|
| | `ET` | Enhancing tumour |
|
|
|
| Thresholded at 0.5, with enhancing tumour suppressed below 200 voxels. To convert to BraTS integer labels, write `WT` as 2, then `TC` as 1, then `ET` as 3, **in that order**: the regions overlap, so the write order is what produces the correct nesting.
|
|
|
| ## Architecture and training
|
|
|
| `monai.networks.nets.SegResNet`, 18.8M parameters, 4 input channels, 3 output channels, `init_filters=32`, `blocks_down=[1,2,2,4]`, `blocks_up=[1,1,1]`, `dropout_prob=0.2`.
|
|
|
| DiceFocalLoss with AdamW at lr 2e-4, cosine annealing, AMP float16, on a Tesla T4. 37 epochs completed of 60 planned; epoch 32 selected on mean validation Dice. Patch sampling was 80% centred on whole tumour, 20% uniform. Augmentation was random axis flips and intensity scale and shift within 10%. Seed 20260813.
|
|
|
| MONAI 1.6.0, PyTorch 2.10.0+cu128.
|
|
|
| ## Limitations
|
|
|
| - Trained on **pre-operative adult glioma only**. Post-treatment appearances, including resection cavities and radiation change, are not represented.
|
| - Requires **all four sequences**. Behaviour with one missing is untested.
|
| - Assumes BraTS preprocessing: skull-stripped, co-registered, 1 mm isotropic.
|
| - Agreement with one annotation protocol on one dataset is not a measure of clinical accuracy.
|
|
|
| ## A note on how MEDTRACE uses this
|
|
|
| MEDTRACE does **not** measure with this model, hosted or local. The [hosted demo](https://huggingface.co/spaces/AIOmarRehan/medtrace) reads the expert-corrected segmentations that ship with [RHUH-GBM](https://huggingface.co/datasets/AIOmarRehan/medtrace-rhuh-gbm-derived); the local build reads DeepBraTumIA's masks on LUMIERE.
|
|
|
| The reason is measured rather than cautious. Run against DeepBraTumIA on 12 randomly chosen LUMIERE studies, this model reaches 0.923 median Dice on whole tumour but **0.486 on enhancing tumour, below 0.5 in 6 of the 12** — and enhancing tumour is the single compartment MEDTRACE reports change on. Split by how much enhancement is present, the weakness is specific rather than uniform: 0.861 median Dice where enhancement is bulky (>= 5 cm3, n=5) against 0.193 where it is small (< 5 cm3, n=7), overestimating volume roughly fourfold in the small group. Post-operative brains are outside this model's training distribution, and on small lesions a few tenths of a cm3 is what decides whether progression is reported.
|
|
|
| Publishing the model and measuring with it are separate decisions. Only the first is justified by the numbers above.
|
|
|
| ## Training data and required citations
|
|
|
| Trained on the **BraTS 2023 GLI** challenge training split, the only labelled split. The BraTS data use agreement grants use and requires citation; it does **not** grant redistribution, so no BraTS imaging appears in this repository or in any MEDTRACE artefact.
|
|
|
| > Menze, B. H., et al. (2015). The Multimodal Brain Tumor Image Segmentation Benchmark (BRATS). IEEE Transactions on Medical Imaging, 34(10), 1993-2024. https://doi.org/10.1109/TMI.2014.2377694
|
|
|
| > Bakas, S., et al. (2017). Advancing The Cancer Genome Atlas glioma MRI collections with expert segmentation labels and radiomic features. Scientific Data, 4, 170117. https://doi.org/10.1038/sdata.2017.117
|
|
|
| > Baid, U., et al. (2021). The RSNA-ASNR-MICCAI BraTS 2021 Benchmark on Brain Tumor Segmentation and Radiogenomic Classification. arXiv:2107.02314. https://doi.org/10.48550/arXiv.2107.02314
|
|
|
| ## Related
|
|
|
| - Space: [AIOmarRehan/medtrace](https://huggingface.co/spaces/AIOmarRehan/medtrace)
|
| - Dataset: [AIOmarRehan/medtrace-rhuh-gbm-derived](https://huggingface.co/datasets/AIOmarRehan/medtrace-rhuh-gbm-derived)
|
| - Code: [github.com/AIOmarRehan/medtrace](https://github.com/AIOmarRehan/medtrace)
|
|
|