Brain tumor segmentation is a critical step in neuro-oncology for diagnosis, treatment planning, and longitudinal assessment. Manual delineation of tumor subregions in 3D MRI is time-consuming and subject to inter-observer variability. Automated segmentation using deep learning addresses this challenge by providing fast, reproducible, and high-accuracy results.
This study explores 2D deep convolutional segmentation using a U-Net architecture on the BraTS2020 dataset, focusing on multi-class segmentation of tumor subregions.
- To develop an end-to-end segmentation pipeline using only the FLAIR and T1ce modalities to reduce memory and computational overhead.
- To train and evaluate a 2D U-Net model for segmenting enhancing, edema, and necrotic core tumor regions.
- To analyze performance using per-class Dice scores and advanced visualization.
- To optimize a deep learning pipeline suitable for real-time or embedded deployment in clinical setups.
- How well can a 2D U-Net segment tumor subregions using only two modalities?
- Can we achieve strong generalization using lightweight data generators and reduced input dimensions?
- Which tumor regions remain the most challenging to segment, and why?
-
Dataset: BraTS2020 from the MICCAI Brain Tumor Segmentation Challenge
-
Modality Channels: T1, T1ce, T2, FLAIR (3D NIfTI volumes)
-
Classes:
- 0: Background
- 1: Necrotic and non-enhancing tumor core
- 2: Edema
- 4: Enhancing tumor
Class 4 was relabeled as 3 for computational ease. All images were rescaled using MinMax normalization to [0,1]. Slice ranges between 22 and 122 were retained based on visual information content.
- Extract T1ce and FLAIR from 3D NIfTI volumes
- Normalize each modality using MinMaxScaler
- Resize each 2D slice to (128×128)
- Select axial slices 22 to 122 per sample
- One-hot encode the mask with 4 classes (0-3)
- Data split: 68% training, 20% validation, 12% test
Efficient on-the-fly loading and preprocessing using a custom Keras Sequence-based generator. Avoids memory overload and preserves patient-level consistency.
The U-Net consists of:
- Encoder: 4 downsampling blocks with
Conv2D → ReLU → Conv2D → MaxPool - Bottleneck: Dropout layer with 512 filters
- Decoder: 4 upsampling blocks with
UpSampling2D → Conv2D → Concatenate → Conv2D - Output:
Conv2Dwithsoftmaxactivation for 4-class prediction
Input shape: (128, 128, 2)
Output shape: (128, 128, 4)
- Kernel initializer:
he_normal - Dropout rate:
0.2 - Optimizer:
Adamwith learning rate1e-3 - Loss:
Categorical Crossentropy
-
Overall: Accuracy, Mean IoU, Dice Coefficient
-
Per Class Dice:
- Dice (Core)
- Dice (Edema)
- Dice (Enhancing)
-
Additional: Precision, Sensitivity, Specificity
- Epochs: 35
- Batch Size: 1 (volume-wise slicing)
- Callbacks:
ReduceLROnPlateau,ModelCheckpoint,CSVLogger
Training/Validation:
- Accuracy: Converged > 99.3%
- Dice Coefficient: Reached 0.64 macro average
- Mean IoU: Stabilized around 0.84
| Metric | Value |
|---|---|
| Accuracy | 0.9931 |
| Mean IoU | 0.8426 |
| Dice Coefficient | 0.6480 |
| Dice - Necrotic Core | 0.5916 |
| Dice - Edema | 0.7667 |
| Dice - Enhancing | 0.7395 |
| Precision | 0.9935 |
| Sensitivity | 0.9916 |
| Specificity | 0.9978 |
- Overlay of ground truth and predicted segmentation
- Per-class heatmaps
- Failure analysis on edge slices
This work demonstrates a robust pipeline for brain tumor segmentation using 2D U-Net trained on BraTS2020. It provides:
- High Dice and IoU values with low false positives
- Efficient learning with limited input channels (T1ce + FLAIR)
- Clear interpretability through modular architecture and visualizations
- Integration of 3D U-Net for spatial continuity
- Transfer learning from pre-trained medical backbones
- Post-processing using CRFs or edge refinement techniques
- Real-time implementation on portable devices









