This repository contains a TensorFlow-based image classification model designed for identifying different stages of Alzheimer's disease:
The model is built using TensorFlow and Keras, with a Sequential Model containing convolutional layers, max pooling, dropout, and dense layers. The final layer uses a softmax activation function for multi-class classification.
BinaryCrossentropy was chosen over CategoricalCrossentropy to improve the accuracy and efficiency of the model. Additionally, BinaryCrossEntropy takes classes independently and trains them, allowing it to go beyond classifying a Detected/Non-detected scenario.
- Data augmentation for training diversity
- Sequential model with Conv2D, MaxPooling2D, and Dense layers
- Softmax activation for multi-class classification
- SGD optimizer with learning-rate scheduler
- Training and validation accuracy and loss over 10 epochs.
These graphs represent the training and validation accuracy and loss over 10 epochs.
- Training and validation accuracy and loss over 2 epochs.
This section showcases the model's predictions on 8 random images from the testing data
Follow these steps to set up and run the detection model:
- Clone the Repository
git clone https://github.com/AdityaRao127/Alzheimers-ML-Detection.git cd Alzheimers-ML-Detection
- Download the Datasets
kaggle datasets download -d yasserhessein/dataset-alzheimer unzip dataset-alzheimer.zip -d path/to/dataset # replace the path with where you want to store your dataset. Example: "C:\Users\bob\Downloads\Alzheimers_Proj"
OR
Download manually from: https://www.kaggle.com/datasets/yasserhessein/dataset-alzheimer
- Import the required libraries
pip install tensorflow pip install matplotlib pip install numpy import tensorflow as tf from tensorflow import keras from tensorflow.keras.preprocessing.image import ImageDataGenerator import matplotlib.pyplot as plt from tensorflow.keras.models import Sequential from tensorflow.keras import layers from tensorflow.keras.optimizers import SGD from tensorflow.keras import models import numpy as np import matplotlib.pyplot as plt
- Change paths
# Change the testing and training directories appropriately, then run the cells in order. train_dir = "path/to/training/data" test_dir = "path/to/testing/data"
This project is developed as part of the research program at the Aspiring Scholars and Directed Research Program (May 2022 - Dec 2022)
This project is licensed under the MIT License - see the MIT LICENSE file for details.