BraTS-Africa 3D glioma segmentation pipeline with MONAI, nnU-Net/SwinUNETR, Dice/NSD/HD95 tracking.
# NeuroAfrica-3D: BraTS-Africa Glioma Segmentation
This project packages a BraTS-style 3D MRI segmentation pipeline for tumor
sub-regions: whole tumor (WT), tumor core (TC), and enhancing tumor (ET).
## Highlights
- Converts BraTS case folders into nnU-Net v2 raw dataset format.
- Preserves the official label convention: `1=NCR`, `2=ED`, `3=ET`.
- Uses region-mode labels for WT, TC, and ET.
- Supports nnU-Net full-resolution training and SwinUNETR trainer variants.
- Applies connected-component cleanup for small false-positive regions.
- Includes weighted probability ensembling across model variants.
## Artifacts
- `neuroafrica_brats_task5_nnunet_pipeline.ipynb`
- `scripts/prepare_nnunet_dataset.py`
- `scripts/postprocess_predictions.py`
- `scripts/weighted_probability_ensemble.py`
- `trainers/nnUNetTrainer_SwinUNETR_Compat.py`
- `trainers/nnUNetTrainerBN_BS5_RBT_DS_BD_PS_Compat.py`
## Metrics To Fill After Validation
- Dice for WT / TC / ET
- Normalized Surface Distance for WT / TC / ET
- HD95 for boundary robustness
- Sensitivity, precision, specificity
- Inference time per case
## AWS / SageMaker Deployment Path
- Store NIfTI manifests, fold splits, and predictions in S3.
- Package preprocessing and inference as ECR containers.
- Run fold training through SageMaker training jobs.
- Run validation-mask generation through SageMaker Batch Transform.
- Track Dice, NSD, HD95, sensitivity, precision, specificity, and latency in
SageMaker Experiments / CloudWatch logs.