Install all required libraries using pip:
pip install numpy nibabel tensorflow matplotlib scikit-learn torch medpy monai segmentation-models-pytorch tqdmMake sure you're using a Python environment with access to GPU (recommended) and Python 3.8+.
Download the Brain Tumor Segmentation dataset (BraTS subset) from the link below:
📁 Download Task01_BrainTumour (Google Drive)
After downloading:
- Place the folder
Task01_BrainTumourdirectly into your project root (or wherever your notebook expects them).
Download the pretrained model weights here:
💾 Download model_weights.pth (Google Drive)
After downloading:
- Place
model_weights.pthin the same directory as your notebook or in aweights/folder if your code expects that.
Open the Jupyter notebook and run all the cells sequentially.
If you want to train from scratch, simply run all cells in order.
If you want to use the pretrained model directly:
Run all cells up to the one marked "1st stage training".
Then skip to the "Data Visualization" cell and run from there to visualize the segmentation results.