Back to Projects02

Dementia MRI Classifier

A deep learning pipeline for classifying dementia (CN/AD) from 3D MRI volumes, with explainability built in.

PythonPyTorchNiBabelCaptumView on GitHubRead the Paper
Why I Built This

I didn't want a model that just spits out "AD" or "CN" and calls it a day. I wanted to know it was looking at the right thing before I trusted it. A classifier that's right for the wrong reasons isn't actually useful in a clinical-adjacent setting, even a coursework one.

So this became less about squeezing out another percentage point of accuracy and more about building explainability in from the start. I used Integrated Gradients to trace every prediction back to the pixels that drove it, and checked those attribution maps against where atrophy is actually expected to show up.

The small custom CNN was a deliberate choice too: a lighter model is easier to reason about, and it kept the explainability step tractable instead of turning into its own research project.

Process
How It Works

Every prediction traces back to the exact pixels that drove it.

01

3D MRI volumes get sliced into 2D, then filtered, normalized, and augmented before training.

02

A lightweight, ~100K-parameter CNN classifies each slice as CN or AD.

03

Integrated Gradients attributes every prediction back to the voxels that actually drove it.

How It Works
Gallery01 / 04
By the Numbers
About 100,000

Model Parameters

25

Training Epochs

CN vs AD

Classification Task

Highlights
  1. 01

    Developed a pipeline to convert 3D MRI volumes into 2D slices, performing filtering, normalization, and augmentation for CN/AD classification.

  2. 02

    Built a custom lightweight CNN (~100K parameters) with batch normalization, dropout, and He initialization for robust binary classification on imbalanced datasets.

  3. 03

    Integrated Explainable AI (Integrated Gradients) to visualize predictions, compute deletion/insertion metrics, and interpret key brain regions influencing model decisions.

  4. 04

    Designed a reproducible end-to-end training workflow with early stopping, learning rate scheduling, gradient clipping, and result visualization for model evaluation and improvement.