Downloads · 30 days
4.7K
85% of all-time downloads
raedinkhaled/swin-tiny-patch4-window7-224-finetuned-mri
swin-tiny-patch4-window7-224-finetuned-mri is a image classification model from raedinkhaled. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
Swin-Tiny fine-tuned to classify cardiac MRI images as cad (coronary artery disease) or healthy.
Downloads · 30 days
4.7K
85% of all-time downloads
All-time downloads
5.6K
Public
Repo size
442 MB
Likes
1
Public
Click a slice to open those files.
.bin110 MB · 100%
From the Hugging Face model README
Swin-Tiny fine-tuned to classify cardiac MRI images as cad (coronary artery disease) or healthy.
Research artifact from a 2022 master's thesis. Not a medical device and not for clinical use.
This checkpoint comes from the co-authored M.Sc. thesis Novel Deep Learning Architecture for Predicting Heart Diseases based on Transformers and Attention Mechanism with Explainability Model by Raedin Khaled Sakhri and Loutfi Boufeligha, supervised by Prof. Abdelouaheb Moussaoui (Ferhat Abbas University, Algeria, July 2022). The thesis compared eight models on the same task. This one is the fine-tuned Swin-Tiny, pretrained on ImageNet-1k.
| Epoch | Training loss | Validation loss | Accuracy |
|---|---|---|---|
| 1 | 0.0592 | 0.0823 | 0.9695 |
| 2 | 0.0196 | 0.0761 | 0.9739 |
| 3 | 0.0058 | 0.0608 | 0.9807 |
The Trainer logged about 6.1 hours of training for the 3 epochs; the thesis rounds this to about 7 hours. For comparison, in the thesis: ViT-Base 98.27%, DeiT 99.01% (overfitting noted), a Vision Transformer trained from scratch 75.73%, and a CNN 88%.
from transformers import pipeline
classifier = pipeline("image-classification", model="raedinkhaled/swin-tiny-patch4-window7-224-finetuned-mri")
print(classifier("cardiac_mri_slice.png"))