This project uses Convolutional Neural Networks (CNN) to diagnose Alzheimer's disease from brain MRI images. The model is trained to classify different stages of Alzheimer's disease, including:
- Mild Impairment: Mild cognitive impairment
- Moderate Impairment: Moderate cognitive impairment
- Very Mild Impairment: Very mild cognitive impairment
- No Impairment: No signs of cognitive impairment
├── images/ # Image for README description
├── cnn_custom_model_v3.ipynb # Custom CNN model training notebook
├── transfer_learning_models.ipynb # Transfer learning experiments notebook
├── test_saved_model.ipynb # Saved model testing notebook
├── Alzheimer_diagnosis_cnn_custom_model(99.33%).h5 # Trained model (99.33% accuracy)
└── README.md # Project description file
- Python 3.7+
- TensorFlow 2.x
- Keras
- NumPy
- Pandas
- Matplotlib
- Seaborn
- OpenCV
- Scikit-learn
pip install tensorflow keras numpy pandas matplotlib seaborn opencv-python scikit-learnOpen and run the cnn_custom_model_v3.ipynb notebook to train the custom CNN model.
Use the test_saved_model.ipynb notebook to test the saved model.
Experiment with pre-trained models through the transfer_learning_models.ipynb notebook.
The custom CNN model includes:
- Convolutional Layers: Extract features from MRI images
- Pooling Layers: Reduce size and increase invariance
- Dropout Layers: Prevent overfitting
- Dense Layers: Final classification
- Activation Functions: ReLU for hidden layers, Softmax for output layer
The custom CNN model achieved 99.33% accuracy on the test set.
Plot showing the changes in loss and accuracy during training
Confusion matrix showing the model's classification performance for each class
Detailed report on precision, recall, and f1-score for each class
- Accuracy: ~99.33%
- Precision: ~99% (average)
- Recall: ~99% (average)
- F1-Score: ~99% (average)
- Total images: 16,650 MRI images
- Split:
- Training: 60% (10,204 images)
- Validation: 25% (4166 images)
- Test: 15% (2244 images)
- Image size: 128x128 pixels
- Format: Grayscale
This project is distributed under the MIT License. See the LICENSE file for more details.
Note: This model is for research and educational purposes only. Do not use for actual medical diagnosis without supervision from medical specialists.



