Skip to content

Model for Identification of Alzheimer's Disease by Brain MRI.

License

Notifications You must be signed in to change notification settings

antonioscardace/Tina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tina • Alzheimer's Detection via Brain MRI

Project for "Machine Learning" course
Grade: 30 with honors / 30
Antonio Scardace @ Dept of Math and Computer Science, University of Catania

CodeFactor License credits

Introduction

This project was developed as part of the Machine Learning course examination. It focuses on medical imaging, specifically analysing a large number of brain MRIs aimed at proficiently classifying and identifying abnormalities indicative of or ruling out the presence of Alzheimer's disease (AD).

Using the ADNI dataset sourced from the University of South Carolina, I selected 2074 MRIs for analysis. The goal is to classify brain MRIs into 2 different diagnostic categories:

  • Cognitively Normal CN (65.05%)
  • Alzheimer's Disease AD (34.95%)

The dataset was partitioned into a Training Set (60%), a Validation Set (20%) and a Test Set (20%). Using a specialized 3D DenseNet model, the project focused on binary classification of brain MRI scans. As a result, the model achieved a final F1-Score of 86.09%, a Precision of 85.52%, a Recall of 86.66%, an AUC of the ROC curve of 89.97%, and an Accuracy of 89.87% on the Test Set.

Data Preparation

After obtaining the dataset access, a CSV file of T1-weighted brain MRIs for AD and CN diagnoses was downloaded to /data/raw/collection.csv. The dataset-prep notebook was used to filter and clean this dataset, ensuring no more than two MRIs per patient were selected. The resultant image IDs were used to create a new collection on USC IDA, and the corresponding .zip files were downloaded to the /data/images/ directory.
Once the images were downloaded, custom bash scripts were used to extract and organize the MRI scans before preprocessing. More info is available in the project report.

Each MRI undergoes preprocessing, resulting in a normalized, skull-stripped, and corrected brain MRI. After the scans were extracted and organised, a preprocessing script was used to complete the following steps for each image, taking approximately 2 minutes per image:

Step Script Software (Algorithm)
Bias-Field Correction N4BiasFieldCorrection ANTs (N4)
Affine Registration antsRegistrationSyNQuick.sh ANTs (SyN)
Skull Stripping hd-bet HD-BET (HD-BET)
Intensity Normalization ws-normalize intensity-normalization (WhiteStrip)

Inference Demo

How to Use

Before you begin, ensure that you meet the following prerequisites:

  • Sufficient GPU, CPU, and RAM for computational tasks.
  • At least 80GB of free disk space.
  • Unix-based operating system.
  • Install these three toolkits: ANTs, HD-BET, and Intensity Normalization.

If you meet these requirements, run the following commands:

   $ git clone https://github.com/antonioscardace/Tina.git
   $ cd Tina/
   $ pip install -r requirements.txt

Once you’ve followed the instructions above and obtained the zip files, run these commands:

   $ bash data/images/00-extract.sh
   $ bash data/images/01-organise.sh
   $ bash data/images/02-transform.sh
   $ bash data/images/03-preproc.sh

You're all set! I recommend conducting manual quality control on preprocessed images.
Following this, you can work on the project using any available notebook.