An implementation of the Cambridge parameter efficient 3D convolutional network for the classification of Alzheimer's disease (AD) in pytorch. The architecture is described in detail in this link. More specifically the architecture can classify between static and progressive Mild cognitive impairement (sMCI vs pMCI) which is a disease that precludes Alzheimers. For this latter task the predictions are for the subsequent 3 years after the subject has been analysed. The area under the curve achieved for this harder second task is: 0.88.
The code was developed as part of my dissertation at the university of Hull. You can read more about it, including the data required, in this medium link.
The following requirements are contained within the requirements.yml file. To install them just run:
$ conda env create -f environment.yml
Library | Version | Purpose |
---|---|---|
Pytorch | 1.11.0 | Deep learning library for tensor transformations |
Torchvision | 0.12.0 | library required by pytorch |
Numpy | 1.18.1 | Datascience library for creating and manipulating arrays in python |
sklearn | 0.23 | Machine learning library used to output area under the curve and other stats. |
matplotlib | 3.1.2 | A visualization library required by sklearn to generate the 2D graphs. |
Pandas | 0.25.3 | Datascience library for working with tabular data |
Nibabel | 3.0.0 | Library for loading in MRI scans into python |
Tqdm | 4.42.1 | library for outputting progress to the console. |
You must place the data folder in a directory above the project folder. The data folder must contain a csv file with the clinical data and a folder containing the MRI images for each class. The data can be obtained from the ADNI website. The data requirements are described in more detail in the wiki but to sumarize the clinical vector must be of length 21 and the mri scans have to be of dimension 110x110x110. Alternatively you can download a zip from this link of my preprocessed dataset.
Once the model has been trained and you are happy with its perfomance after reviewing the graphs and logs you can use it for predictions. The camull_cli script allows you to use load the trained model for predictions.
To read an explanation on this checkout this medium article. https://medium.com/@hextra_19712/deep-learning-for-alzheimers-classification-57611161e442?sk=ebc8035cead352f51f7d0e105a69a6c7