Inspiration

Alzheimer's disease remains a critical global health challenge. Our research was driven by the need to understand how advanced computer vision techniques can discern subtle patterns in brain structure. We were inspired to investigate whether a sophisticated deep learning approach could replicate or verify the staging classifications made by medical experts, thereby contributing to the broader field of automated medical image analysis.

What it does

This project performs a comprehensive analysis of MRI brain scans to categorize them into four distinct stages of cognitive decline: Non-Dementia, Very Mild, Mild, and Moderate. Rather than just being a standalone tool, it serves as a study on the efficacy of Transfer Learning and class-balancing techniques in medical diagnostics.

How we built it

Our research methodology relied on a robust technical stack (Python, PyTorch) to train and compare two distinct configurations of the EfficientNetV2-S architecture:

  1. Model 1:

    • Strategy: Used a "Warmup + Fine-tuning" approach (initially freezing the backbone).
    • Loss Function: Implemented Focal Loss (gamma=2.0) to mathematically down-weight easy negatives and focus strictly on hard-to-classify examples.
    • Result: Achieved 99.70% accuracy
  2. Model 2:

    • Strategy: Used differential learning rates with a OneCycleLR scheduler.
    • Loss Function: Utilized Weighted Cross-Entropy Loss combined with Label Smoothing (0.1) to prevent model overconfidence.
    • Architecture: We engineered a custom classifier head (Linear -> BatchNorm -> SiLU -> Dropout -> Linear) to better manage feature transitions and prevent Internal Covariate Shift.
    • Result: Achieved 99.53% accuracy

Challenges we ran into

  • Extreme Class Imbalance: The "Non-Dementia" class comprised 61.35% of the data, while "Moderate" was only 8.04%. Standard training yielded biased results. We dealt with this in two ways: Model 1 used Focal Loss to penalize difficult examples, while Model 2 used Weighted Cross-Entropy to strictly prioritize minority classes. Comparing these solutions was a core part of our research.
  • Data Preprocessing: Images varied wildly in size (from 176x208 to 496x248). We implemented a custom resizing algorithm that scales by the max dimension and pads the rest, ensuring the 384x384 input required by EfficientNetV2 preserved aspect ratios without distortion.

Accomplishments

We successfully demonstrated that a fine-tuned EfficientNetV2 model could achieve high classification accuracy, even on the minority classes. Our analysis validates the effectiveness of Focal Loss in this domain. We are also proud of the modular experimental framework we established, allowing for rapid iteration and comparison of different hyperparameters.

What it does

This project performs a comprehensive analysis of MRI brain scans to categorize them into four distinct stages of cognitive decline: Non-Dementia, Very Mild, Mild, and Moderate. Rather than just being a standalone tool, it serves as a study on the efficacy of Transfer Learning and class-balancing techniques in medical diagnostics.

Built With

Share this project:

Updates