Alzheimer MRI ConvNeXt Classifier

This repository contains a GPU-accelerated deep learning model for classifying Alzheimer’s disease stages from brain MRI images using a ConvNeXt-based architecture.

The model is designed for research, educational use, and technical demonstrations, and is deployed as a Hugging Face Inference Endpoint for fast GPU inference.


🧠 Model Overview

  • Task: MRI image classification
  • Modality: Brain MRI (2D slices)
  • Architecture: ConvNeXt
  • Framework: PyTorch
  • Deployment: Hugging Face GPU Inference Endpoint

The model predicts probabilities over predefined Alzheimer-related classes provided in class_names.json.


πŸ“¦ Repository Structure

β”œβ”€β”€ inference.py # Hugging Face inference entrypoint β”œβ”€β”€ requirements.txt # Minimal runtime dependencies β”œβ”€β”€ models/ β”‚ β”œβ”€β”€ best_model.pth # Trained ConvNeXt weights β”‚ └── class_names.json # Class index β†’ label mapping └── README.md


⚑ Inference

The model is exposed via a Hugging Face Inference Endpoint and accepts an image file as input.

Example API Call

import requests

API_URL = "https://<your-endpoint>.endpoints.huggingface.cloud"
HEADERS = {
    "Authorization": "Bearer YOUR_HF_TOKEN"
}

with open("sample_mri.png", "rb") as f:
    response = requests.post(
        API_URL,
        headers=HEADERS,
        files={"file": f}
    )

print(response.json())
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support