Table of Contents
Fetching ...

ECG-Image-Kit: A Synthetic Image Generation Toolbox to Facilitate Deep Learning-Based Electrocardiogram Digitization

Kshama Kodthalu Shivashankara, Deepanshi, Afagh Mehri Shervedani, Gari D. Clifford, Matthew A. Reyna, Reza Sameni

TL;DR

ECG-Image-Kit addresses the challenge of leveraging vast paper ECG archives by generating synthetic paper-like ECG images from real time-series data, enabling privacy-preserving training of digitization models. The authors integrate a multi-stage pipeline that adds realistic artifacts (textual annotations, wrinkles, perspective distortions, and imaging noise) to standard 12-lead ECG backgrounds, and they validate the approach with a DL-based digitization pipeline that recovers time-series data and preserves clinical parameters. The work demonstrates that synthetic data can train robust digitization models, achieving favorable SNR metrics and strong concordance of RR, QRS, and QT intervals with ground truth, while highlighting limitations and avenues for future enhancement. This toolbox thus provides a practical, extensible platform for augmenting ECG digitization research, with immediate applicability to privacy-sensitive contexts and large-scale archive utilization.

Abstract

Cardiovascular diseases are a major cause of mortality globally, and electrocardiograms (ECGs) are crucial for diagnosing them. Traditionally, ECGs are printed on paper. However, these printouts, even when scanned, are incompatible with advanced ECG diagnosis software that require time-series data. Digitizing ECG images is vital for training machine learning models in ECG diagnosis and to leverage the extensive global archives collected over decades. Deep learning models for image processing are promising in this regard, although the lack of clinical ECG archives with reference time-series data is challenging. Data augmentation techniques using realistic generative data models provide a solution. We introduce ECG-Image-Kit, an open-source toolbox for generating synthetic multi-lead ECG images with realistic artifacts from time-series data. The tool synthesizes ECG images from real time-series data, applying distortions like text artifacts, wrinkles, and creases on a standard ECG paper background. As a case study, we used ECG-Image-Kit to create a dataset of 21,801 ECG images from the PhysioNet QT database. We developed and trained a combination of a traditional computer vision and deep neural network model on this dataset to convert synthetic images into time-series data for evaluation. We assessed digitization quality by calculating the signal-to-noise ratio (SNR) and compared clinical parameters like QRS width, RR, and QT intervals recovered from this pipeline, with the ground truth extracted from ECG time-series. The results show that this deep learning pipeline accurately digitizes paper ECGs, maintaining clinical parameters, and highlights a generative approach to digitization. This toolbox currently supports data augmentation for the 2024 PhysioNet Challenge, focusing on digitizing and classifying paper ECG images.

ECG-Image-Kit: A Synthetic Image Generation Toolbox to Facilitate Deep Learning-Based Electrocardiogram Digitization

TL;DR

ECG-Image-Kit addresses the challenge of leveraging vast paper ECG archives by generating synthetic paper-like ECG images from real time-series data, enabling privacy-preserving training of digitization models. The authors integrate a multi-stage pipeline that adds realistic artifacts (textual annotations, wrinkles, perspective distortions, and imaging noise) to standard 12-lead ECG backgrounds, and they validate the approach with a DL-based digitization pipeline that recovers time-series data and preserves clinical parameters. The work demonstrates that synthetic data can train robust digitization models, achieving favorable SNR metrics and strong concordance of RR, QRS, and QT intervals with ground truth, while highlighting limitations and avenues for future enhancement. This toolbox thus provides a practical, extensible platform for augmenting ECG digitization research, with immediate applicability to privacy-sensitive contexts and large-scale archive utilization.

Abstract

Cardiovascular diseases are a major cause of mortality globally, and electrocardiograms (ECGs) are crucial for diagnosing them. Traditionally, ECGs are printed on paper. However, these printouts, even when scanned, are incompatible with advanced ECG diagnosis software that require time-series data. Digitizing ECG images is vital for training machine learning models in ECG diagnosis and to leverage the extensive global archives collected over decades. Deep learning models for image processing are promising in this regard, although the lack of clinical ECG archives with reference time-series data is challenging. Data augmentation techniques using realistic generative data models provide a solution. We introduce ECG-Image-Kit, an open-source toolbox for generating synthetic multi-lead ECG images with realistic artifacts from time-series data. The tool synthesizes ECG images from real time-series data, applying distortions like text artifacts, wrinkles, and creases on a standard ECG paper background. As a case study, we used ECG-Image-Kit to create a dataset of 21,801 ECG images from the PhysioNet QT database. We developed and trained a combination of a traditional computer vision and deep neural network model on this dataset to convert synthetic images into time-series data for evaluation. We assessed digitization quality by calculating the signal-to-noise ratio (SNR) and compared clinical parameters like QRS width, RR, and QT intervals recovered from this pipeline, with the ground truth extracted from ECG time-series. The results show that this deep learning pipeline accurately digitizes paper ECGs, maintaining clinical parameters, and highlights a generative approach to digitization. This toolbox currently supports data augmentation for the 2024 PhysioNet Challenge, focusing on digitizing and classifying paper ECG images.
Paper Structure (27 sections, 16 equations, 14 figures, 1 table)

This paper contains 27 sections, 16 equations, 14 figures, 1 table.

Figures (14)

  • Figure 1: Proposed pipeline for generating synthetic ECG images
  • Figure 2: The standard grid on printed ECG papers/images
  • Figure 3: Distortion-less synthetic ECG images with lead names (left) and printed text (right)
  • Figure 4: Handwritten and printed text artifacts on synthetic paper ECG
  • Figure 5: Wrinkle and crease artifacts on synthetic ECG images
  • ...and 9 more figures