Spaces:
Sleeping
Sleeping
| title: Alzheimer Classification | |
| emoji: π | |
| colorFrom: indigo | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 4.36.1 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| # 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](#introduction) | |
| - [Model Details](#model-details) | |
| - [Setup](#setup) | |
| - [Usage](#usage) | |
| - [Contributing](#contributing) | |
| ## 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. Clone the repository: | |
| ```bash | |
| git clone https://github.com/your_username/alzheimer_mri_classification.git | |
| cd alzheimer_mri_classification | |
| ``` | |
| 2. Install the required dependencies: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. 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](https://huggingface.co/your_username/alzheimer_model_resnet50). | |
| 4. Run the application: | |
| ```bash | |
| python app.py | |
| ``` | |
| 5. 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. Open the application in your browser. | |
| 2. Click on "Upload an MRI Image" to upload an image. | |
| 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 | |