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

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tina • Alzheimer's Detection via Brain MRI

Project for "Machine Learning" course
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% and an Accuracy-Score of 89.87% on the Test Set.

Data Preparation

After obtaining the dataset access, a collection of T1-weighted brain MRIs for AD and CN diagnoses was created, and the corresponding CSV file was downloaded and placed in /data/raw/collection.csv. The dataset-prep notebook was used to structure the data and limit two MRIs per patient at most. The resultant image IDs were used to create a new collection on USC IDA, and .zip files were downloaded to the /data/images/ directory. Custom bash scripts were then used to extract and organise the MRIs.

Each MRI undergoes preprocessing, resulting in a normalized, skull-stripped, and corrected brain MRI. After the images 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.
  • A Unix-based operating system.
  • Installation of 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

To prepare the images for training as described above, run the following 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 with the project using any available notebook.