BRAIN TUMOR SEGMENTATION
MODEL DynamicUNet INPUT 512×512×1 DATASET Cheng et al., 3064 studies MEAN DICE 0.74

Method

About this project

This project uses a U-Net architecture to generate segmentation masks for brain tumors in MRI scans.

Dataset

Trained on 3,064 T1-weighted, contrast-enhanced MRI images spanning three kinds of brain tumor, provided by Jun Cheng (figshare, version 5). Each image is 512×512, single-channel grayscale.

Example MRI scan
Original image
Example ground-truth mask
Ground-truth mask

Data augmentation

Training data is augmented with horizontal flip, vertical flip, and rotation (15°–75°) from Torchvision's transforms, each applied with 0.5 probability, in random order.

Data augmentation code

Model architecture

A 4-block-deep U-Net variant (reduced from the original paper's depth for computational reasons), with configurable filter sizes. Input and output are both 512×512×1.

Model architecture diagram

Training

Trained for 100 epochs on an Nvidia GTX 1050Ti (4GB), starting at a learning rate of 1e-3, reduced by 85% on plateau, ending at 2.7249e-4. Achieved a mean Dice score of ~0.74 on a 600-image held-out test set.

Learning rate graph
Learning rate over training
Loss graph
Loss over training