Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Advertisement

npj Digital Medicine
  • View all journals
  • Search
  • My Account Login
  • Content Explore content
  • About the journal
  • Publish with us
  • Sign up for alerts
  • RSS feed
  1. nature
  2. npj digital medicine
  3. articles
  4. article
Digitizing paper ECGs at scale: an open-source algorithm for clinical research
Download PDF
Download PDF
  • Article
  • Open access
  • Published: 14 January 2026

Digitizing paper ECGs at scale: an open-source algorithm for clinical research

  • Elias Stenhede1,2,
  • Agnar Martin Bjørnstad1,2 &
  • Arian Ranjbar1 

npj Digital Medicine , Article number:  (2026) Cite this article

  • 1520 Accesses

  • Metrics details

We are providing an unedited version of this manuscript to give early access to its findings. Before final publication, the manuscript will undergo further editing. Please note there may be errors present which affect the content, and all legal disclaimers apply.

Subjects

  • Cardiology
  • Computational biology and bioinformatics
  • Engineering
  • Health care
  • Mathematics and computing
  • Medical research

Abstract

Billions of clinical ECGs exist only as paper scans, making them unusable for modern automated diagnostics. We introduce a fully automated, modular framework that converts scanned or photographed ECGs into digital signals, suitable for both clinical and research applications. The framework is validated on 37,191 ECG images with 1596 collected at Akershus University Hospital, where the algorithm obtains a mean signal-to-noise ratio of 19.65 dB on scanned papers with common artifacts. It is further evaluated on the Emory Paper Digitization ECG Dataset, comprising 35,595 images, including images with perspective distortion, wrinkles, and stains. The model improves on the state-of-the-art in all subcategories. The full software is released as open-source, promoting reproducibility and further development. We hope the software will contribute to unlocking retrospective ECG archives and democratize access to AI-driven diagnostics.

Similar content being viewed by others

A fully-automated paper ECG digitisation algorithm using deep learning

Article Open access 05 December 2022

Automated multilabel diagnosis on electrocardiographic images and signals

Article Open access 24 March 2022

Clinically meaningful interpretability of an AI model for ECG classification

Article Open access 17 February 2025

Data availability

Both the Ahus and Emory Paper Digitization ECG Datasets will be released jointly as part of the ECG-Image-Database. The Ahus Paper Digitization ECG Dataset will be made available upon reasonable request to the corresponding author.

Code availability

The full software, including instructions, can be found on: github.com/Ahus-AIM/Open-ECG-Digitizer.

References

  1. Global, regional, and national burden of cardiovascular diseases and risk factors in 204 countries and territories, 1990-2023. JACC S0735109725074285, https://linkinghub.elsevier.com/retrieve/pii/S0735109725074285 (2025).

  2. Liu, X., Wang, H., Li, Z. & Qin, L. Deep learning in ECG diagnosis: a review. Knowl. Based Syst. 227, 107187 (2021).

    Google Scholar 

  3. Wu, Z. & Guo, C. Deep learning and electrocardiography: systematic review of current techniques in cardiovascular disease diagnosis and management. Biomed. Eng. OnLine 24, 23 (2025).

    Google Scholar 

  4. Jiang, R. et al. Deep learning-augmented ECG analysis for screening and genotype prediction of congenital long QT syndrome. JAMA Cardiol. 9, 377–384 (2024).

    Google Scholar 

  5. Zhu, H. et al. Automatic multilabel electrocardiogram diagnosis of heart rhythm or conduction abnormalities with deep learning: a cohort study. Lancet Digital Health 2, e348–e357 (2020).

    Google Scholar 

  6. Ribeiro, A. H. et al. Automatic diagnosis of the 12-lead ECG using a deep neural network. Nat. Commun. 11, 1760 (2020).

    Google Scholar 

  7. Al-Zaiti, S. S. et al. Machine learning for ECG diagnosis and risk stratification of occlusion myocardial infarction. Nat. Med. 29, 1804–1813 (2023).

    Google Scholar 

  8. Kwon, J. -m et al. A deep learning algorithm to detect anaemia with ECGs: a retrospective, multicentre study. Lancet Digital Health 2, e358–e367 (2020).

    Google Scholar 

  9. Ouyang, D. et al. Electrocardiographic deep learning for predicting post-procedural mortality: a model development and validation study. Lancet Digital Health 6, e70–e78 (2024).

    Google Scholar 

  10. Badilini, F., Erdem, T., Zareba, W. & Moss, A. J. ECGScan: a method for conversion of paper electrocardiographic printouts to digital electrocardiographic files. J. Electrocardiol. 38, 310–318 (2005).

    Google Scholar 

  11. Ravichandran, L. et al. Novel tool for complete digitization of paper electrocardiography data. IEEE J. Transl. Eng. Health Med. 1, 1800107 (2013).

    Google Scholar 

  12. High precision digitization of paper-based ECG records: a step toward machine learning. IEEE J. Transl. Eng. Health Med. 7, 1900808 (2019).

  13. Mishra, S. et al. ECG paper record digitization and diagnosis using deep learning. J. Med. Biol. Eng. 41, 422–432 (2021).

    Google Scholar 

  14. Fortune, J. D., Coppa, N. E., Haq, K. T., Patel, H. & Tereshchenko, L. G. Digitizing ECG image: a new method and open-source software code. Comput. Methods Prog. Biomed. 221, 106890 (2022).

    Google Scholar 

  15. Wu, H. et al. A fully-automated paper ECG digitisation algorithm using deep learning. Sci. Rep. 12, 20963 (2022).

    Google Scholar 

  16. A. Reyna, M. et al. Digitization and classification of ECG images: the George B. Moody PhysioNet Challenge 2024. In Computing in Cardiology, https://www.cinc.org/archives/2024/pdf/CinC2024-011.pdf (2024).

  17. H. Krones, F., J. Lyons, T., Mahdi, A. & Walker, B. Combining hough transform and deep learning approaches to reconstruct ECG signals from printouts. In Computing in Cardiology, https://www.cinc.org/archives/2024/pdf/CinC2024-097.pdf (2024).

  18. Yoon, H.-C. et al. Segmentation-based extraction of key components from ECG images: a framework for precise classification and digitization. In Computing in Cardiology, http://www.cinc.org/archives/2024/pdf/CinC2024-227.pdf (2024).

  19. Stenhede, E., Singstad, B.-J. & Ranjbar, A. ECG-DUaL: pose-invariant Digitization of printed electrocardiograms via U-net and Local edge detection. In Computing in Cardiology, https://www.cinc.org/archives/2024/pdf/CinC2024-262.pdf (2024).

  20. Demolder, A. et al. High precision ECG digitization using artificial intelligence. J. Electrocardiol. 90, 153900 (2025).

    Google Scholar 

  21. Reyna, M. A. et al. ECG-image-database: a dataset of ECG images with real-world imaging and scanning artifacts; a foundation for computerized ECG image digitization and analysis. Preprint at https://arxiv.org/abs/2409.16612 (2024).

  22. Ranjbar, A. & Ravn, J. Data quality in healthcare for the purpose of artificial intelligence: a case study on ECG digitalization. Stud. Health Technol. Inform. 305, 471–474 (2023).

    Google Scholar 

  23. Ranjbar, A., Ravn, J., Ronningen, E. & Hanseth, O. Enabling clinical trials of artificial intelligence: infrastructure for heart failure predictions. Stud. Health Technol. Inform. 302, 177–181 (2023).

    Google Scholar 

  24. Himmelreich, J. C. L. & Harskamp, R. E. Diagnostic accuracy of the PMcardio smartphone application for artificial intelligence-based interpretation of electrocardiograms in primary care (AMSTELHEART-1). Cardiovasc. Digital Health J. 4, 80–90 (2023).

    Google Scholar 

  25. Ronneberger, O., Fischer, P. & Brox, T. U-Net: convolutional networks for biomedical image segmentation. MICCAI. 234-241 (2015).

  26. Azad, R. et al. Medical image segmentation review: the success of U-Net. IEEE Trans. Pattern Anal. Mach. Intell. 46, 10076–10095 (2024).

    Google Scholar 

  27. Duda, R. O. & Hart, P. E. Use of the Hough transformation to detect lines and curves in pictures. Commun. ACM 15, 11–15 (1972).

    Google Scholar 

  28. Crouse, D. F. On implementing 2D rectangular assignment algorithms. IEEE Trans. Aerosp. Electron. Syst. 52, 1679–1696 (2016).

    Google Scholar 

  29. Ribeiro, A. H. et al. CODE-15%: a large scale annotated dataset of 12-lead ECGs. https://zenodo.org/records/4916206 (2021).

  30. Shivashankara, K. K. et al. ECG-Image-Kit: a synthetic image generation toolbox to facilitate deep learning-based electrocardiogram digitization. Physiological Meas. 45, 055019 (2024).

    Google Scholar 

  31. Ma, J. et al. Loss odyssey in medical image segmentation. Med Image Anal. 71, 102035 (2021).

  32. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. ICLR (2015).

  33. Loshchilov, I. & Hutter, F. Decoupled weight decay regularization. ICLR (2019).

  34. Jammoul, S., Hassan, A., Zhang, E., Warrick, P. & Afilalo, J. Layout-invariant U-Net segmentation for time-series reconstruction from noisy ECG images. https://www.cinc.org/archives/2024/pdf/CinC2024-481.pdf (2024).

Download references

Acknowledgements

We thank the staff at the Department of Cardiology at Akershus University Hospital for helping us in data collection, and James Weigle and Matthew Reyna for kindly evaluating our framework on the Emory Paper Digitization ECG Dataset.

Author information

Authors and Affiliations

  1. Medical Technology & E-health, Akershus University Hospital, Lørenskog, Norway

    Elias Stenhede, Agnar Martin Bjørnstad & Arian Ranjbar

  2. Faculty of Medicine, University of Oslo, Oslo, Norway

    Elias Stenhede & Agnar Martin Bjørnstad

Authors
  1. Elias Stenhede
    View author publications

    Search author on:PubMed Google Scholar

  2. Agnar Martin Bjørnstad
    View author publications

    Search author on:PubMed Google Scholar

  3. Arian Ranjbar
    View author publications

    Search author on:PubMed Google Scholar

Contributions

E.S. and A.B. designed the software as well as designed and performed experiments for evaluation, with supervision from A.R. E.S. and A.B. wrote the article with input from A.R.

Corresponding author

Correspondence to Elias Stenhede.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Stenhede, E., Bjørnstad, A.M. & Ranjbar, A. Digitizing paper ECGs at scale: an open-source algorithm for clinical research. npj Digit. Med. (2026). https://doi.org/10.1038/s41746-025-02327-1

Download citation

  • Received: 04 August 2025

  • Accepted: 26 December 2025

  • Published: 14 January 2026

  • DOI: https://doi.org/10.1038/s41746-025-02327-1

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Download PDF

Advertisement

Explore content

  • Research articles
  • Reviews & Analysis
  • News & Comment
  • Collections
  • Follow us on Twitter
  • Sign up for alerts
  • RSS feed

About the journal

  • Aims and scope
  • Content types
  • Journal Information
  • About the Editors
  • Contact
  • Editorial policies
  • Calls for Papers
  • Journal Metrics
  • About the Partner
  • Open Access
  • Early Career Researcher Editorial Fellowship
  • Editorial Team Vacancies
  • News and Views Student Editor
  • Communication Fellowship

Publish with us

  • For Authors and Referees
  • Language editing services
  • Open access funding
  • Submit manuscript

Search

Advanced search

Quick links

  • Explore articles by subject
  • Find a job
  • Guide to authors
  • Editorial policies

npj Digital Medicine (npj Digit. Med.)

ISSN 2398-6352 (online)

nature.com sitemap

About Nature Portfolio

  • About us
  • Press releases
  • Press office
  • Contact us

Discover content

  • Journals A-Z
  • Articles by subject
  • protocols.io
  • Nature Index

Publishing policies

  • Nature portfolio policies
  • Open access

Author & Researcher services

  • Reprints & permissions
  • Research data
  • Language editing
  • Scientific editing
  • Nature Masterclasses
  • Research Solutions

Libraries & institutions

  • Librarian service & tools
  • Librarian portal
  • Open research
  • Recommend to library

Advertising & partnerships

  • Advertising
  • Partnerships & Services
  • Media kits
  • Branded content

Professional development

  • Nature Awards
  • Nature Careers
  • Nature Conferences

Regional websites

  • Nature Africa
  • Nature China
  • Nature India
  • Nature Japan
  • Nature Middle East
  • Privacy Policy
  • Use of cookies
  • Legal notice
  • Accessibility statement
  • Terms & Conditions
  • Your US state privacy rights
Springer Nature

© 2026 Springer Nature Limited

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: AI and Robotics