Skip to content

chrisandrews7/brain-tumour-analysis-segmentation

Repository files navigation

Brain Tumour Analysis and Segmentation

Creation and evaluation of Convolutional neural networks to segment Brain Tumours in MRI scans.
Using a U-Net architecture and ResNet encoder pre trained on ImageNet.

It is trained on 3,064 patients records and uses PyTorch.

Example Prediction

Installation

  • Install uv package manager.

  • Install required dependencies

uv sync

Alternatively requirements.txt has also been generated if uv cannot be used.

Evaluation

Evaluation of the models are available here in notebook format.

Evaluation of the preprocessing is available here in notebook format.

Running

This preprocesses, loads and trains the model based on the provided configuration.
It uses whatever accelerator is available - GPU, CPU.
The weights can be saved to a file for evaluation or further processing.

uv run pipeline.py 

With optional arguments documented in pipeline.py:

uv run pipeline -subsetsize=1000 -batchsize=32 -epochs=50 -modelpath=resnet18.pth

About

Convolutional Neural Network to detect brain tumours in MRI scans

Resources

Stars

Watchers

Forks