CoolFace
Apppublic

Fawazzx/Alzheimer_Classification

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
2likes
App README

Alzheimer MRI Classification

This repository contains a Gradio application for classifying Alzheimer's disease stages from MRI images using a fine-tuned ResNet50 model. The application is deployed on Hugging Face Spaces.

Table of Contents

Introduction

This application uses a convolutional neural network (ResNet50) to classify MRI images into one of four stages of Alzheimer's disease:

  • —Mild Demented
  • —Moderate Demented
  • —Non-Demented
  • —Very Mild Demented

The model is fine-tuned on a custom dataset and can be accessed through a user-friendly web interface powered by Gradio.

Model Details

The model architecture is based on ResNet50, with the final fully connected layer adjusted to output predictions for 4 classes. The model is trained using PyTorch and fine-tuned on a dataset of MRI images.

Setup

To run the application locally, follow these steps:

  1. 1.Clone the repository:
bash
    git clone https://github.com/your_username/alzheimer_mri_classification.git
    cd alzheimer_mri_classification
  1. 1.Install the required dependencies:
bash
    pip install -r requirements.txt
  1. 1.Ensure you have the model file (alzheimer_model_resnet50.pth) in the root directory of the project. You can download it from Hugging Face Hub.
  1. 1.Run the application:
bash
    python app.py
  1. 1.The Gradio interface will launch and can be accessed in your web browser at http://127.0.0.1:7860.

Usage

Once the application is running, you can upload an MRI image through the web interface and get the predicted classification.

Example Usage

  1. 1.Open the application in your browser.
  2. 2.Click on "Upload an MRI Image" to upload an image.
  3. 3.The application will display the predicted classification for the uploaded image.

Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference