Efficient Vision Transformer Architectures for Multiclass Cardiac Condition Classification from 12-Lead Electrocardiogram Images: A Comparative Study
Open Access
- 17 March 2026
- journal article
- Published by ADBA Information Technology and Publishing Limited Company in Artificial Intelligence in Applied Sciences
- Vol. 2 (1) , 49-55
Abstract
Rapid and reproducible interpretation of electrocardiograms (ECGs) is essential for distinguishing acute myocardial infarction from chronic infarction patterns, rhythm abnormalities, and normal recordings. This study presents a controlled comparison of three transfer-learned Vision Transformer architectures—DeiT-Small, Swin-Tiny, and ViT-Tiny—for four-class classification of 12-lead ECG report images. A total of 3,951 images were stratified into training (n = 3, 159), validation (n = 393), and independent test (n = 399) subsets representing abnormal heartbeat, history of myocardial infarction, myocardial infarction, and normal ECG. All models were initialized with ImageNet-pretrained weights and fine-tuned under the same input resolution, augmentation policy, optimizer, and stopping criterion. Performance was assessed using accuracy, macro-precision, macro-recall, macro-F1 score, parameter count, floating-point operations, and inference latency. DeiT-Small achieved the highest macro-F1 score (0.9971) with an accuracy of 0.9975, while ViT-Tiny reached the same accuracy and a macro-F1 score of 0.9969 using only 5.53 million parameters, 2.1493 GFLOPs, and 0.1275 ms per image. Swin-Tiny remained accurate (0.9825) but required the greatest computational cost. The DeiT-Small confusion matrix contained a single error, in which one normal ECG was assigned to the history-of-myocardial-infarction class. These findings indicate that compact global-attention models can retain near-perfect internal discrimination while substantially reducing computational demand. Nevertheless, patient-independent and multi-center external validation is required before clinical use.Keywords
This publication has 30 references indexed in Scilit:
- A deep learning ECG model for identification and localization of occlusion myocardial infarctionNature Communications, 2026
- Fully Automated Diagnosis of Acute Myocardial Infarction Using Electrocardiograms and Multimodal Deep LearningJACC: Advances, 2025
- An ensemble based lightweight deep learning model for the prediction of cardiovascular diseases from electrocardiogram imagesEngineering Applications of Artificial Intelligence, 2024
- Universal representations in cardiovascular ECG assessment: A self-supervised learning approachInternational Journal of Medical Informatics, 2024
- A hybrid deep learning network for automatic diagnosis of cardiac arrhythmia based on 12-lead ECGScientific Reports, 2024
- Enhancing heart disease diagnosis through ECG image vectorization-based classificationHeliyon, 2024
- Clinical usability of deep learning-based saliency maps for occlusion myocardial infarction identification from the prehospital 12-Lead electrocardiogramJournal of Electrocardiology, 2024
- Detection and classification of electrocardiography using hybrid deep learning modelsHellenic Journal of Cardiology, 2024
- Deep learning for ECG classification: A comparative study of 1D and 2D representations and multimodal fusion approachesBiomedical Signal Processing and Control, 2024
- Automatic detection and localisation of myocardial infarction using multi-channel dense attention neural networkBiomedical Signal Processing and Control, 2023