brain-mri-segmentation

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

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 |
Sections
- Architecture — data flow, model choices, metrics rationale
- Training — running experiments, logging, overrides
- Serving — FastAPI endpoints, Docker deployment
- Benchmarks — vs literature, trade-offs
- Reproducibility — pinned environment, one-command re-run
- Limitations — failure modes, dataset bias
- Model card — HF Hub card template
Links
- Code: GitHub
- Model: Hugging Face
Disclaimer
Research/educational artifact only — not intended for clinical use.