The following description is provided by the couse coordinatiors for students developing the project. Please refer to the project report "Project_Report_Explainability" provided in the respository for further information about methodology and experiment results.
To use this template you can generate a Conda environment using environment.yml
by running
conda env create -f environment.yml --name <custom_name>
This dataset contains a mix of samples from the Kaggle datasets Brain MRI Images for Brain Tumor Detection and Brain Tumor Classification (MRI) datasets.
To retrieve train, validation and test set for the pyradiomics features we provide the function get_radiomics_dataset()
in data.py
. The function returns both datasets as numpy arrays.
from data import get_radiomics_dataset
train_data, train_labels, val_data, val_labels, test_data, test_labels = get_radiomics_dataset()
The image train, validation and test sets are provided as pytorch ImageFolders through get_img_dataset(transform=None)
in data.py
. Note that, in order to incorporate data augmentation, you are able to pass a list of transforms to this function.
from data import get_img_dataset
from torchvision import transforms
transform = [transforms.RandomRotation(90), transforms.RandomHorizontalFlip()]
train_dataset, val_dataset, test_dataset = get_img_dataset(transform)
We provide a simple Baseline CNN based on pytorch in data.py
through BaselineClf()
. To use it, simply do
from model import BaselineClf
model = BaselineClf()