Model Card for Alzheimer MRI Image Classification using Swin Base Transformer

Developed by: Fadhil Elrizanda (github:fadhilelrizanda)

Model Details

The model is finetuned from https://github.com/microsoft/Swin-Transformer, which using configuration microsoft/swin-base-patch4-window7-224. The model is already finetuned for the Falah/Alzheimer_MRI dataset

Direct Use

-- Exploration model especially for swin transformer in medical domain

-- Visualization of swin transformer using gradcam

Performance and Visualization

Grad Cam

Grad Cam Visualization

Confusion Matrix

Confusion Matrix

Classification Report

Class Precision Recall F1-Score Support
Mild_Demented 0.981 0.895 0.936 172
Moderate_Demented 1.000 0.800 0.889 15
Non_Demented 0.958 0.983 0.970 634
Very_Mild_Demented 0.959 0.963 0.961 459
Accuracy 0.962 1280
Macro Avg 0.975 0.910 0.939 1280
Weighted Avg 0.962 0.962 0.961 1280

How to use

git clone https://huggingface.co/fadhilelrizanda/swin_base_alzheimer_mri
cd swin_base_alzheimer_mri

import torch
from model import SwinCustomClassification  

# Initialize the model
model = SwinCustomClassification()
model.load_state_dict(torch.load("swin_base_best.pt"))
model.eval()

Full code for exploration and reproduction : https://github.com/fadhilelrizanda/image_classification_alzheimer_mri

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

Dataset used to train fadhilelrizanda/swin_base_alzheimer_mri