ecg-image-kit

ecg-image-gen

Generating realistic ECG images from time-series data

This folder contains tools for generating realistic ECG images from time-series data, creating synthetic ECGs on standard paper-like backgrounds with genuine printing and scanning artifacts. Our approach adds distortions such as handwritten notes, wrinkles, creases, and perspective transforms. These images are ideal for producing large sets of ECG images for the development and evaluation of machine and deep learning models in ECG analysis.

The process of scanning and digitizing ECG images is governed by some fundamental limitations and requiements rooting in signal and image processing theory. A short overview of these concepts is available in a brief document found here.

Release History

Installation

Running the pipeline

Generating distortionless ECG

The basic mode of the tool creates ECG images without distortions. The mode of operation and generated outputs can be configured using these command-line flags:

Adding distortions to the synethic images

Generating image from a single ECG record

Troubleshooting

Run-time benchmarks

Average computational time for generating an ECG image of size 2200 X 1700 pixels and 200 DPI on a MAC OS 13.4.1 (c) and Apple M2 chip

Steps Time taken by each step per image (in seconds)  
Distortion less ECG 0.72 m
Distortion less ECG with printed text 0.87  
ECG with Hand written text distortion 6.25  
ECG with Creases and Wrinkles distortions 0.92  
ECG with Augmentations (Noise and rotation) 2.65  
ECG with all distoritons (Hand-written text, creases, wrinkles, rotation, noise) 7.75  

Citation

Please include references to the following articles in any publications:

  1. Kshama Kodthalu Shivashankara, Deepanshi, Afagh Mehri Shervedani, Matthew A. Reyna, Gari D. Clifford, Reza Sameni (2024). ECG-image-kit: a synthetic image generation toolbox to facilitate deep learning-based electrocardiogram digitization. In Physiological Measurement. IOP Publishing. doi: 10.1088/1361-6579/ad4954

  2. ECG-Image-Kit: A Toolkit for Synthesis, Analysis, and Digitization of Electrocardiogram Images, (2024). URL: https://github.com/alphanumericslab/ecg-image-kit

Contributors

Contact

Please direct any inquiries, bug reports or requests for joining the team to: ecg-image-kit@dbmi.emory.edu.

Static Badge