Lightweight AI Framework Turns Smartphone Photos of Paper ECGs Into Heart Attack Screenings
A new compute-light framework called ECGLight can digitize paper ECG printouts from a smartphone photo and screen for myocardial infarction in under 30 seconds on CPU-only hardware, with 95.51% accuracy on a standard benchmark.


A team of researchers has released ECGLight, an end-to-end compute-light framework that converts a smartphone photo or scan of a paper ECG into a calibrated 12-lead signal and screens for myocardial infarction (MI) pathologies, all without requiring a GPU or internet connection. The system runs in under 30 seconds per ECG on standard CPU hardware and achieves 95.51% accuracy for MI detection on the PTB-XL benchmark dataset.
The work addresses a persistent gap in global cardiovascular care: many remote clinics still rely on paper ECG printouts because they lack the connectivity or computational resources to use modern AI-based decision support tools. According to the authors, this means that a large volume of physical ECGs obtained in underserved areas remain inaccessible to AI-driven analysis, contributing to missed cases of acute coronary occlusion and delays in reperfusion therapy.
Key facts
| Metric | Value |
|---|---|
| MI detection accuracy on PTB-XL | 51% (F1 = 0.9519) |
| OMI detection accuracy on ECG-Matrix | 89% (F1 = 0.8862) |
| Processing time per ECG | <30 seconds on CPU only |
| Training dataset size | 21,799 ECGs from PTB-XL |
How ECGLight works
The framework combines digitization and diagnosis into a single lightweight pipeline. It first reconstructs a calibrated 12-lead signal from a smartphone image of a paper ECG, then screens for myocardial infarction using a model trained on the PTB-XL dataset, which contains 21,799 ECGs. The system was further validated on a hospital-acquired ECG-Matrix dataset. To support interpretability, the framework includes SHAP (SHapley Additive exPlanations) values, which highlight which parts of the ECG signal contributed most to the model’s decision.
The entire pipeline runs on CPU-only hardware, making it viable for use in clinics with limited computing infrastructure. The code is available on GitHub under the project name ECGLight.
Why this matters for remote diagnostics
The practical impact is most direct for clinics in low-connectivity settings that still use paper ECGs as their primary diagnostic tool. Previous work has addressed digitization and diagnosis separately, often relying on advanced AI models that require GPU compute or high-speed internet. ECGLight is designed to work on a smartphone and a standard laptop, removing both barriers.
For developers and health-tech teams working on AI tools for underserved regions, the framework offers a ready-to-use pipeline that does not require cloud access or specialized hardware. The GitHub repository provides the model weights and inference code, which can be integrated into local diagnostic workflows.
Limitations and next checks
The study reports high accuracy on the PTB-XL benchmark, but real-world performance may vary depending on the quality of the smartphone photo, the condition of the paper ECG, and the diversity of the patient population. The ECG-Matrix validation set is smaller and yields a lower F1 score (0.8862 for OMI detection), indicating that the model’s performance on hospital-acquired data is not yet at the same level as the benchmark.
The framework currently screens for myocardial infarction pathologies, but the authors note that it does not cover all clinically relevant ECG endpoints. Further validation on larger, more diverse datasets and in prospective clinical settings would be needed before deployment as a standalone diagnostic tool.
Source: arXiv cs.LG – ECGLight: Compute-Light Framework For Paper ECG Digitization and Myocardial Infarction Screening (https://arxiv.org/abs/2607.07683)
Source
arXiv cs.LG Publicacion original: 2026-10-08T04:00:00+00:00
Maya Turner
Colaborador editorial.
