Deep Learning-Based Digitization of Overlapping ECG Images with Open-Source Python Code

📅 2025-06-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Digital conversion of paper-based single-lead electrocardiogram (ECG) images suffers from degraded accuracy due to signal overlap—a long-standing, under-addressed challenge. Method: We propose an end-to-end robust digitization framework: (1) a customized data-augmented U-Net for precise segmentation of the primary ECG waveform; and (2) an adaptive grid detection module that faithfully maps the binary segmentation mask into a time-series signal. Contribution/Results: To our knowledge, this is the first method explicitly designed for overlapping ECG traces, achieving superior generalization across diverse formats and multi-scale images. Quantitatively, on overlapping samples, mean squared error (MSE) drops to 0.0029 (84% reduction over baseline) and Pearson’s correlation coefficient ρ reaches 0.9641; on non-overlapping samples, MSE = 0.0010 and ρ = 0.9644; segmentation achieves an IoU of 0.87. The implementation is publicly available.

Technology Category

Application Category

📝 Abstract
This paper addresses the persistent challenge of accurately digitizing paper-based electrocardiogram (ECG) recordings, with a particular focus on robustly handling single leads compromised by signal overlaps-a common yet under-addressed issue in existing methodologies. We propose a two-stage pipeline designed to overcome this limitation. The first stage employs a U-Net based segmentation network, trained on a dataset enriched with overlapping signals and fortified with custom data augmentations, to accurately isolate the primary ECG trace. The subsequent stage converts this refined binary mask into a time-series signal using established digitization techniques, enhanced by an adaptive grid detection module for improved versatility across different ECG formats and scales. Our experimental results demonstrate the efficacy of our approach. The U-Net architecture achieves an IoU of 0.87 for the fine-grained segmentation task. Crucially, our proposed digitization method yields superior performance compared to a well-established baseline technique across both non-overlapping and challenging overlapping ECG samples. For non-overlapping signals, our method achieved a Mean Squared Error (MSE) of 0.0010 and a Pearson Correlation Coefficient (rho) of 0.9644, compared to 0.0015 and 0.9366, respectively, for the baseline. On samples with signal overlap, our method achieved an MSE of 0.0029 and a rho of 0.9641, significantly improving upon the baseline's 0.0178 and 0.8676. This work demonstrates an effective strategy to significantly enhance digitization accuracy, especially in the presence of signal overlaps, thereby laying a strong foundation for the reliable conversion of analog ECG records into analyzable digital data for contemporary research and clinical applications. The implementation is publicly available at this GitHub repository: https://github.com/masoudrahimi39/ECG-code.
Problem

Research questions and friction points this paper is trying to address.

Digitizing overlapping ECG images accurately
Handling single leads with signal overlaps
Converting analog ECG records to digital data
Innovation

Methods, ideas, or system contributions that make the work stand out.

U-Net segmentation for overlapping ECG traces
Adaptive grid detection for varied ECG formats
Two-stage pipeline enhances digitization accuracy
🔎 Similar Papers
No similar papers found.
R
Reza Karbasi
School of Electrical and Computer Engineering, University of Tehran, Tehran, Iran
M
Masoud Rahimi
School of Electrical and Computer Engineering, University of Tehran, Tehran, Iran
A
A. Vahabie
School of Electrical and Computer Engineering, University of Tehran, Tehran, Iran
Hadi Moradi
Hadi Moradi
School of ECE, University of Tehran
RoboticsArtificial Intelligence