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)对于诊断此类疾病至关重要。传统上,心电图通常打印在纸质上。然而,即使经过扫描,这些纸质输出也无法兼容需要时序数据的先进心电图诊断软件。数字化心电图图像对于训练面向心电图诊断的机器学习模型,以及利用数十年来积累的全球档案至关重要。用于图像处理的深度学习模型在此方面前景广阔,但缺乏含有参考时序数据的临床心电图档案仍构成挑战。使用逼真的生成数据模型进行数据增强技术提供了一种解决方案。我们提出ECG-Image-Kit——一个开源工具箱,用于从时序数据生成带有真实伪影的合成多导联心电图图像。该工具可从真实时序数据合成心电图图像,并在标准心电图纸背景下应用诸如文本伪影、褶皱和折痕等变形。作为案例研究,我们使用ECG-Image-Kit从PhysioNet QT数据库创建了包含21,801张心电图图像的数据集。我们开发并训练了一个结合传统计算机视觉与深度神经网络的模型,基于该数据集将合成图像转换为时序数据以进行评估。我们通过计算信噪比(SNR)评估数字化质量,并将从该流程恢复的临床参数(如QRS宽度、RR间期和QT间期)与从心电图时序中提取的金标准进行比较。结果表明,该深度学习流程能准确数字化纸质心电图并保持临床参数,同时突显了一种生成式数字化方法。该工具箱目前支持2024年PhysioNet挑战赛的数据增强,重点聚焦于纸质心电图图像的数字化与分类。