Inspiration

Alzheimer's disease affects millions of families worldwide—including mine. With a family history of the disease, I wanted to combine personal motivation with my rusty background in medical imaging AI to explore whether modern deep learning can accurately detect Alzheimer's severity from brain MRI scans.

What it does

Our AI classifies brain MRI scans into four Alzheimer's severity stages: NonDemented, VeryMildDemented, MildDemented, and ModerateDemented. The system achieves 99.8% accuracy and uses Grad-CAM explainability to highlight which brain regions drive each diagnosis—focusing on clinically relevant areas like enlarged ventricles, a known biomarker of Alzheimer's-related atrophy.

How we built it

  • Data: 40,384 MRI images from Kaggle's Augmented Alzheimer dataset
  • Models: Compared three architectures—Baseline CNN, CBAM attention CNN, and Swin Transformer (transfer learning from ImageNet)
  • Stack: PyTorch, HuggingFace Hub, Grad-CAM for explainability
  • Demo: Gradio web app supporting DICOM medical imaging format with automatic best-slice selection

Challenges we ran into

  • Adapting the Swin Transformer (designed for RGB images) to work with grayscale MRI scans—solved by summing pretrained weights across channels
  • The CBAM attention model underperformed the simpler baseline CNN, teaching us that architectural complexity doesn't guarantee better results
  • Handling multi-slice DICOM volumes required building intelligent slice selection to find the most diagnostically useful image

Accomplishments that we're proud of

  • 99.83% accuracy with near-perfect precision/recall across all classes
  • Grad-CAM visualizations that align with established radiology markers (ventricular enlargement, periventricular white matter)
  • A working demo that accepts real DICOM files—the actual format used in clinical settings
  • All models published to HuggingFace Hub for reproducibility

What we learned

  • Transfer learning from natural images (ImageNet) works remarkably well for medical imaging
  • Simpler architectures can outperform complex attention mechanisms on well-structured datasets
  • Model explainability isn't just a nice-to-have—seeing the model focus on clinically relevant regions builds trust in the predictions

What's next for Alzheimer's Detection from MRI Scans

  • Validate on external datasets from different scanners and populations
  • Add 3D volumetric analysis instead of single-slice classification
  • Integrate longitudinal tracking to monitor disease progression over time

Built With

Share this project:

Updates