Inspiration

Alzheimer’s disease often goes undetected until symptoms are severe, by which time treatment options are limited. We wanted to explore how AI could support earlier screening using non-invasive data that already exists in hospitals: brain MRI scans. Our goal was to build something that could help clinicians and families get an earlier signal, not to replace doctors but to augment their decision-making.

What it does

AI-4-Alzheimer takes a brain MRI image as input and classifies it into one of four categories: Non Demented, Very Mild Demented, Mild Demented, or Moderate Demented. The web app (built with Streamlit) lets users upload an MRI image and get: A predicted class A confidence score A probability distribution over all four stages It wraps a trained CNN model into an easy-to-use, visually polished interface that runs locally.

How we built it

Collected and preprocessed MRI scans, converting them to 224×224 grayscale images and normalizing pixel values. Designed and trained a custom CNN in TensorFlow/Keras with stacked Conv2D, MaxPooling, and Dense layers to classify four Alzheimer’s stages. Tuned hyperparameters (learning rate, batch size, epochs) and applied techniques like normalization and data augmentation to improve generalization. Saved the trained model as an .h5 file and integrated it into a Streamlit app for real-time inference. Built a clean UI with custom CSS, clear result cards, probability visualization, and informative sidebars to make the outputs understandable to non-ML users.

Challenges we ran into

Handling medical imaging data: different image formats, resolutions, and contrast levels required careful preprocessing to feed consistent inputs to the model. Avoiding overfitting on a relatively limited dataset while still achieving high accuracy across all four classes. Balancing model complexity and performance so that inference stayed fast enough for an interactive web app. Designing the interface and explanations so that predictions feel transparent and responsible rather than a “black-box verdict.”

Accomplishments that we're proud of

Achieved around 96% test accuracy on four-way Alzheimer’s stage classification using a relatively compact CNN. Delivered an end-to-end pipeline: from raw MRI images through training in the notebook to an accessible, production-like web interface. Built a UI that clearly shows confidence scores and class probabilities, helping users understand uncertainty instead of just seeing a single label. Wrapped advanced deep learning into a tool that can be run on a typical machine with a single command.

What we learned

How to design and train CNNs tailored for medical imaging tasks, and why good preprocessing matters as much as model architecture. The importance of evaluation beyond accuracy—thinking about class balance, potential biases, and clinical relevance. How to deploy deep learning models in a lightweight, user-friendly way using Streamlit, and how UX impacts trust in AI systems. The ethical and practical constraints of AI in healthcare: the need for disclaimers, human-in-the-loop workflows, and proper validation before real-world use.

What's next for AI 4 Alzheimer

Integrate explainability methods (e.g., Grad-CAM heatmaps) so clinicians can see which brain regions influenced the prediction. Train and validate the model on larger, more diverse datasets to improve robustness and reduce bias. Collaborate with medical experts to refine labels, thresholds, and user flows, and to evaluate the tool in realistic clinical scenarios. Explore multi-modal extensions that combine MRI data with basic clinical or cognitive test information for richer assessments. Package the app for easier deployment (Docker/Cloud) and add user management and logging for research or pilot studies.

Built With

  • cnn
  • streamlit
  • tensorflow
Share this project:

Updates