This repository contains the code for the papers
N. Shehata, W. Bain, B. Glocker. A Comparative Study of Graph Neural Networks for Shape Classification in Neuroimaging. Proceedings of Machine Learning Research. GeoMedIA Workshop. 2022
N. Shehata, C. Picarra, A. Kazi, B. Glocker. The Importance of Model Inspection for Better Understanding Performance Characteristics of Graph Neural Networks. Under review. 2023
The brain imaging datasets used in the paper are all publicly available but cannot be shared directly by us. Please see the following websites for accessing the original data.
- UK Biobank data: https://www.ukbiobank.ac.uk/
- CAM-CAN data: https://www.cam-can.org/
- IXI dataset: https://brain-development.org/ixi-dataset/
- OASIS3 dataset: https://www.oasis-brains.org/
UK Biobank provides pre-processed data including the meshes of the subcortical structures. All other datasets were processed by us using FSL-FIRST to segment the 15 different brain structures.
We can only provide the meshes for the IXI dataset, allowing for the code to be run for an example of sex classification when trained and tested on IXI subsets. Please download the IXI meshes and unzip in the data/brain
subfolder.
For running the code, we recommend setting up a dedicated Python environment.
Create and activate a Python 3 conda environment:
conda create -n pymesh python=3.8
conda activate pymesh
Create and activate a Python 3 virtual environment:
virtualenv -p python3.8 <path_to_envs>/pymesh
source <path_to_envs>/pymesh/bin/activate
Check out instructions for how to install PyTorch using conda or pip.
Check out instructions for how to install PyTorch Geometric using conda or pip. Make sure to also install the package torch-spline-conv
.
pip install matplotlib jupyter pandas seaborn scikit-learn tensorboard pytorch-lightning cmake vtk pyvista open3d
pip install openmesh
For conda users, openmesh may have to be installed via
conda install -c conda-forge openmesh-python
In order to train and test an example sex classification model with the IXI dataset:
- Download the IXI meshes, unzip in the
data/brain
subfolder. - Run the the script
brain_shape_classification.py
.
This project is licensed under the Apache License 2.0.