Skip to content

brain-mri-segmentation

brain-mri-segmentation - SegFormer-B2 brain tumor MRI segmentation

Production-grade binary semantic segmentation of brain tumors from MRI scans - pixel-level mask prediction for low-grade glioma (LGG) regions.

Input / Ground truth / Prediction · SegFormer-B2 · Dice 65.5% · IoU 66.2%

Overview

Task Binary semantic segmentation (tumor vs. background)
Dataset Mateusz Buda LGG MRI (TCGA) - 110 patients, 3 929 paired slices
Main model SegFormer-B2 (nvidia/segformer-b2-finetuned-ade-512-512, ~25 M params)
Baseline Small U-Net (4 levels, 32→256 ch, ~1.9 M params, hand-rolled)
Stack PyTorch Lightning · Hydra · MLflow · DVC · FastAPI · Docker · GitHub Actions · MkDocs
License MIT

Visualizations

Qualitative results on held-out test slices - input FLAIR, ground-truth mask, and SegFormer-B2 prediction side by side:

Qualitative segmentation panel - input MRI, ground truth, and SegFormer-B2 prediction

Test-set metric comparison between the SegFormer-B2 main model and the U-Net baseline (Dice, IoU, pixel accuracy):

Bar chart comparing SegFormer-B2 and U-Net baseline on Dice, IoU, and pixel accuracy

Sections

Disclaimer

Research/educational artifact only - not intended for clinical use.