Brain-tumor segmentation with U-Net

A patient-level evaluation of U-Net-family architectures on multimodal MRI, under a TÜBİTAK 2209-A grant. The split was frozen before the test set was opened, every figure regenerates from tracked artifacts, and the limits of the result are stated with it.


Overview

Funded by a TÜBİTAK 2209-A undergraduate research grant, this project asks one narrow question: under a fixed, matched training protocol, do specific U-Net variants segment brain tumors better than a standard U-Net baseline — and does that hold on a test set nobody touched until the analysis plan was frozen?

Semantic segmentation on medical images is easy to get impressive-looking numbers from and hard to get trustworthy ones. Most of the engineering effort went into the second half of that sentence.

TensorFlowKerasU-NetMRIPython
Problem

Multimodal brain MRI (T1, T1ce, T2, FLAIR) plus tumor sub-region labels — the BraTS-style setup — is a well-studied benchmark, which also means it is easy to overfit to its own quirks. Three failure modes are common in student and research projects alike:

  • Split leakage. Splitting by slice or patch instead of by patient lets the model memorise a patient's anatomy across train and validation, inflating scores.
  • Undocumented preprocessing. Skull-stripping tool, intensity normalisation and scanner field strength all shift results, but rarely get reported precisely enough to reproduce.
  • Mean-only reporting. A single averaged Dice score hides a heavy-tailed distribution — most patients segment well, and a long tail segments badly, which is exactly the tail a clinician would notice.

The pipeline (public as bratsarticle) is designed around closing those three gaps before comparing any architectures.

Pipeline
Input
Multimodal MRI volumes — T1, T1ce, T2, FLAIR.
Preprocess
Per-volume z-score normalisation over non-zero voxels only — ignoring the air around the brain rather than scaling against it. In practice this mattered more than any single architectural change.
Split
258 / 37 / 74 patients. The unit of the split is the patient, never the slice or the patch. Frozen before test access.
Train
Standard U-Net, BU-Net and U-Net+RES under a bounded, matched 2D protocol, multiple seeds per architecture. Patch sampling biased toward tumor regions, soft-Dice-plus-cross-entropy loss.
Evaluate
One logged held-out opening, under an analysis plan written before the test set was touched.
Metrics

Primary metrics are the Dice similarity coefficient and Intersection-over-Union, per tumor sub-region:

Dice(A, B) = 2·|A ∩ B| / (|A| + |B|)

Rather than a single mean, results are reported as median and interquartile range across patients, plus an explicit count of patients falling below a threshold. A distribution is much harder to be wrong about than an averaged headline number.

Findings

The pipeline has run end to end: an audited 369-subject cohort, a patient-level split, tested implementations, matched development runs, multi-seed confirmation, an analysis plan frozen before any test access, one logged held-out evaluation, and every figure and table generated from tracked artifacts. A clean clone with no local data or checkpoints verified 230 tracked artifacts, passed 108 tests, and regenerated every output byte-for-byte.

On the 74-patient held-out subset, seed-aggregated mean regional Dice was 0.736 for standard U-Net, 0.752 for BU-Net and 0.756 for residual U-Net. Against the baseline both differences held up under Holm-corrected paired bootstrap tests (+0.017, CI 0.005–0.030; +0.020, CI 0.008–0.034). Between the two finalists the gap was −0.004 with a Holm-corrected p of 0.05 — small, and borderline. Residual U-Net got there with fewer parameters, fewer per-slice MACs and lower peak VRAM.
Forest plot of three paired comparisons in patient mean regional Dice on the held-out set. BU-Net minus standard U-Net, and U-Net+RES minus standard U-Net, both sit clearly above zero; BU-Net minus U-Net+RES sits just below zero with its interval close to it.
Primary endpoints on the held-out set — paired differences in patient mean regional Dice, 95 % bootstrap intervals, Holm-corrected. Generated from tracked artifacts in the research repository.

A manuscript and a response-to-reviewer document live in the repository from an internal review round; the work has not been submitted to a journal or conference, and nothing here has been peer reviewed. The scope is narrow on purpose — one internal held-out subset of a single dataset, evaluated once, with 2D slice models. It says nothing about clinical utility or external generalisation.

Next
  • Better skull-strip QA before training, potentially a learned skull-stripping step.
  • Histogram matching across scanners, rather than per-volume normalisation alone.
  • Per-patient temperature scaling so uncertainty estimates are properly calibrated.
  • An out-of-distribution test set from a different scanner or institution, evaluated once, at the very end.

Longer field notes on the day-to-day decisions — normalisation, patch sampling, the validation-split bug that cost two weeks — are in Notes.

Links
bratsarticle repository
Pipeline, tests, tracked artifacts and manuscript package.
Field notes
What training a segmentation network changed about how I read a scan.
← Home Istanbul · GMT+3