3D U-Net brain tumor segmentation using BraTS-Africa MRI data
# Lightweight Brain Tumor Segmentation on Low-Resource Systems
## Project Overview
This project implements a lightweight 3D U-Net-based approach for brain tumor (glioma) segmentation from multimodal MRI scans.
The project follows the **Lightweight Brain Tumor Segmentation on Low-Resource Systems** tutorial and covers the workflow from data preprocessing and dataset preparation through model development, training, evaluation, and deployment.
A major focus of the project is examining the feasibility of performing 3D brain tumor segmentation in a resource-constrained computing environment.
---
## Objectives
The main objectives of this project are to:
* Preprocess multimodal brain MRI data for glioma segmentation.
* Organize the dataset into training, validation, and testing subsets.
* Implement a 3D U-Net architecture for volumetric brain tumor segmentation.
* Train and monitor the segmentation model.
* Evaluate the model using segmentation metrics.
* Develop an inference pipeline for new NIfTI MRI scans.
* Deploy the segmentation application using Streamlit.
---
## Dataset
The project uses the **BraTS-Africa** dataset for glioma segmentation.
The MRI data consist of four modalities:
* **T1n** — native T1-weighted MRI
* **T1c** — contrast-enhanced T1-weighted MRI
* **T2f** — T2-FLAIR MRI
* **T2w** — T2-weighted MRI
The dataset was processed and organized into separate training, validation, and test subsets.
The original dataset is not included in this repository because of its size. The processed dataset used during development was maintained locally.
---
## Data Preprocessing
The preprocessing workflow prepared the MRI data for input into the 3D segmentation model.
The processed dataset was organized locally as:
```text
glioma split data/
├── train/
│ ├── images/
│ └── masks/
├── val/
│ ├── images/
│ └── masks/
└── test/
├── images/
└── masks/
```
The model uses 3D image patches with dimensions:
```text
96 × 96 × 96
```
The preprocessing …