-
Notifications
You must be signed in to change notification settings - Fork 10
Home
This code is based on Pytorch and so you will need to have a linux distribution installed for this to work. However, on newer windows systems you can install WSL 2.0, along with the necessary nvidia driver as a work around.
The following repo contains the code for a neural network that can classify between two tasks. Alzheimer's Disease vs Normal Cohort (AD vs NC) and static mild cognitive impairment vs progressive mild cognitive impairment (sMCI vs pMCI).
The model must be first trained on the AD vs CN task by running the train_model.py. After this is done weights will be generated and you will be able to classify subjects with having Alzheimer's or not having Alzheimer's.
In order to classify between sMCI vs pMCI you must perform transfer learning by uncommenting the lines underneath in the main() function.
This codebase is built upon other open source machine learning and data science libraries. You have to install these in order for the code to work. It is recommended that you install anaconda to simplify dependency management.
Once you have anaconda install all you need to do is run:
$ conda env create -f environment.yml
This will install all the relevant libraries for you.
The neural network doesn't train on nothing. It needs data samples for subjects in each class. A data sample in this code is a 3D MRI scan in the form of a nifti file (.nii) and a 1D array of clinical values stored in a seperate csv file. Clinical values are basically the cognitive assessment scores, demographic and genetic information. All of these things are not included in the code but instructions for obtaining them have been added to a separate page in the wiki.