Alzheimer's disease is a progressive neurological disorder that leads to memory loss and cognitive decline. It is one of the most common causes of dementia, affecting millions of people worldwide. Early detection through MRI imaging can assist in diagnosis and treatment.
This dataset contains MRI images categorized into four classes:
- Mild Demented: 8,960 images
- Moderate Demented: 6,464 images
- Very Mild Demented: 8,960 images
- Non Demented: 9,600 images
📌 Dataset Link: Alzheimer Dataset
This project classifies Alzheimer’s disease using CNN. Below is the structured workflow:
The dataset is divided into:
- 70% Training
- 20% Validation
- 10% Testing
- Resize Images to 224x224 pixels for uniform input size.
- Normalize Pixel Values to improve model stability.
- Shuffle Data to prevent order bias during training.
- Batching & Prefetching to optimize training speed.
The CNN model consists of:
- Feature Extraction
Conv2D
+BatchNormalization
+ReLU
Activation (Extracts features from MRI images)MaxPooling2D
(Reduces feature dimension and prevents overfitting)- 5 Convolution Layers to capture complex patterns
- Classification Layers
Dense(128) + BatchNormalization + ReLU
(Fully connected layer for feature representation)Dropout(0.5)
(Reduces overfitting)Dense(4, activation='softmax')
(Outputs probability for 4 classes)
- Training Setup
Adam Optimizer
(Adaptive learning for stable convergence)Sparse Categorical Crossentropy
(Handles integer class labels efficiently)- Callbacks:
EarlyStopping
: Stops training if no improvement after 5 epoch.ReduceLROnPlateau
: Reduces learning rate if validation loss stagnates.- Custom Callback: Stops training when validation accuracy hits 95%.
After training, the model achieves:
- Test Accuracy: 96.59%
- Test Loss: 0.0991
📈 Accuracy Trends:
- Sharp accuracy increase at the beginning, stabilizing around 95% for validation accuracy.
- Training accuracy almost reaches 100%, with validation accuracy around 95%.
- Minimal gap between training and validation accuracy, indicating good generalization.
📉 Loss Trends:
- Training loss consistently decreases, showing the model learns well.
- Validation loss also decreases but fluctuates slightly mid-training.
- The small gap between training and validation loss confirms no significant overfitting.
This CNN-based Alzheimer image classification model demonstrates high accuracy and stability in detecting different stages of Alzheimer's disease using MRI images. The balanced preprocessing, proper augmentations, and deep network architecture contribute to its efficiency and generalization.
🚀 Next Steps:
- Improve model robustness with more data augmentation.
- Experiment with transfer learning (e.g., ResNet, EfficientNet).
- Optimize hyperparameters for further accuracy gains.
📌 Developed with TensorFlow & Keras.