π§ BraTS MRI Tumor Segmentation (UNet-based)
π Overview
This model performs brain tumor segmentation on MRI scans using a deep learning architecture (UNet-based). It is trained on the BraTS dataset for segmenting tumor regions such as:
- Enhancing Tumor (ET)
- Tumor Core (TC)
- Whole Tumor (WT)
π§ͺ Model Details
- Architecture: UNet / UNet-like
- Framework: PyTorch
- Input: MRI slices (multi-modal or single modality)
- Output: Segmentation mask
- Task: Medical Image Segmentation
π Dataset
Dataset: BraTS (Brain Tumor Segmentation Challenge)
Modalities: T1, T1c, T2, FLAIR
Preprocessing:
- Normalization
- Resizing
- Skull stripping (if applied)
βοΈ Usage
πΉ Install dependencies
pip install torch torchvision nibabel numpy
πΉ Load model
import torch
model = torch.load("model.pth", map_location="cpu")
model.eval()
πΉ Run inference
import numpy as np
# Example input (replace with actual preprocessing)
input_tensor = torch.randn(1, 4, 240, 240)
with torch.no_grad():
output = model(input_tensor)
mask = output.argmax(dim=1)
π Performance
| Metric | Score |
|---|---|
| Dice Score (WT) | ~0.85 |
| Dice Score (TC) | ~0.80 |
| Dice Score (ET) | ~0.75 |
Note: Values may vary based on training setup
π Applications
- Clinical decision support
- Tumor monitoring
- Radiology AI systems
- Medical research
β οΈ Limitations
- Not for direct clinical use
- Performance depends on preprocessing
- Requires GPU for fast inference
π License
Specify your license here (MIT / Apache 2.0 / etc.)
π¨βπ» Author
Swanand Wakadmane AI/ML Developer | Medical AI Enthusiast
π€ Acknowledgements
- BraTS Challenge
- Medical imaging research community