Brain tumor segmentation: SegResNet on BraTS 2021 MRI

Research and education only. Not a medical device and not for clinical use.

Segments brain tumors in multi-sequence MRI into necrotic core (NCR), peritumoral edema (ED) and enhancing tumor (ET), and is used to compute their volumes. Code: https://github.com/RoshanKarthik/brain-tumor-seg.

Model

  • Architecture: MONAI SegResNet (init_filters=16, blocks_down=[1, 2, 2, 4], blocks_up=[1, 1, 1], dropout_prob=0.2), 4,702,227 parameters
  • Input: 4 co-registered MRI sequences in the order [FLAIR, T1, T1ce, T2], reoriented to RAS, resampled to (1.0, 1.0, 1.0) mm, z-scored per channel over brain voxels
  • Output: 3 sigmoid channels [TC, WT, ET] (tumor core, whole tumor, enhancing tumor), thresholded per region (TC 0.5, WT 0.3, ET 0.5; chosen on the validation split) and converted to BraTS labels 1 = NCR, 2 = ED, 4 = ET
  • Inference: sliding window, ROI (128, 128, 128), overlap 0.5, gaussian blending; optional 8-flip TTA

Training

  • Data: BraTS 2021 Task 1 training set (adult glioma, pre-operative, skull-stripped, 1 mm), 1001 train / 125 validation / 125 test cases (patient-level, seed 42)
  • Loss: dice (sigmoid), optimizer AdamW (lr 0.0001, weight decay 1e-05), 3 warmup epochs then cosine decay, 60 epochs, mixed precision
  • Batches: 1 case(s) x 2 random (128, 128, 128) crop(s) per step; random flips and intensity scale/shift
  • Best checkpoint: epoch 55, mean validation Dice 0.884 (TC 0.903, WT 0.890, ET 0.858)

Results

Evaluated on the held-out test split (125 cases), TTA on, post-processing {'threshold': 0.5, 'region_thresholds': [0.5, 0.3, 0.5], 'min_component_voxels': 0, 'et_min_voxels': 0}. Empty masks follow BraTS: Dice 1 / HD95 0 mm if prediction and ground truth are both empty, Dice 0 / HD95 373.13 mm if exactly one is empty. HD95 is MONAI's symmetric 95th-percentile Hausdorff distance in mm.

Region Dice mean ± std Dice median HD95 mean (mm) HD95 median (mm)
WT 0.930 ± 0.071 0.951 6.56 2.00
TC 0.911 ± 0.154 0.964 3.82 1.73
ET 0.887 ± 0.134 0.930 3.40 1.41

Volume agreement (predicted vs. ground truth, cm³):

Region MAE (cm³) Mean abs. % error Pearson r Bias (cm³)
NCR 4.93 185.6 (n = 122) 0.807 -3.01
ED 6.24 22.5 (n = 125) 0.959 2.81
ET 2.63 103.7 (n = 122) 0.919 0.72
TC 4.22 164.2 (n = 125) 0.917 -2.28
WT 5.63 7.4 (n = 125) 0.981 0.52

Mean absolute % error is computed over cases with a nonzero ground-truth volume. It is dominated by small regions (a 1 cm³ miss on a 0.5 cm³ region is 200 %), so for NCR, ET and TC the MAE and Pearson r are the more informative measures.

Per-case results and figures are in results/.

ONNX

model.onnx: opset 18, fixed [128, 128, 128] patch, dynamic batch; max |ONNX − PyTorch| = 9.4e-04 on a random input. Use with sliding-window inference (see btseg.export).

Usage

from btseg.infer import Predictor  # pip install git+https://github.com/RoshanKarthik/brain-tumor-seg

predictor = Predictor.from_checkpoint("roshan160705/brats-segresnet")
result = predictor.predict("flair.nii.gz", "t1.nii.gz", "t1ce.nii.gz", "t2.nii.gz")
print(result.volumes)  # NCR, ED, ET, TC, WT in cm³

Intended use and limitations

  • Intended for research and teaching on brain tumor segmentation and volumetry.
  • Not for diagnosis, treatment planning or any clinical decision.
  • MRI only: trained on FLAIR, T1, T1ce and T2. CT is not supported.
  • Adult gliomas, pre-operative scans, BraTS preprocessing (co-registered, skull-stripped). Other tumor types, post-operative scans or unprocessed images may fail silently.
  • No external validation: all numbers come from a held-out part of BraTS 2021.

Data license and citation

Trained on the BraTS 2021 Task 1 data, which is subject to the BraTS / Synapse data terms; no scans are redistributed here. If you use this model, cite:

  • U. Baid et al., The RSNA-ASNR-MICCAI BraTS 2021 Benchmark on Brain Tumor Segmentation and Radiogenomic Classification, arXiv:2107.02314, 2021.
  • B. H. Menze et al., The Multimodal Brain Tumor Image Segmentation Benchmark (BRATS), IEEE TMI 34(10), 2015.
  • S. Bakas et al., Advancing The Cancer Genome Atlas glioma MRI collections with expert segmentation labels and radiomic features, Scientific Data 4, 2017.
  • A. Myronenko, 3D MRI brain tumor segmentation using autoencoder regularization, BrainLes 2018 (SegResNet); MONAI Consortium, MONAI, 2020.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using roshan160705/brats-segresnet 1

Paper for roshan160705/brats-segresnet