Leveraging Binarized Generated Images for Enhanced Denoising and Digitization of Scanned ECGs

Rafael Silva1, Yingyu Yang2, Maëlis Morier3, Safaa Al-Ali4, Maxime Sermesant2
1Epione Research Team, Inria, Universit� C�te d'Azur, France, 2Inria, 3Université Côte d'Azur, 4Inria, Sophia antipolis


Abstract

Introduction: The widespread use of ECG papers by cardiologists has increased the interest in converting them into a machine-readable format, especially when designing clinical retrospective studies that involve this data. This conversion process, known as digitization, involves extracting ECG lead data points from scanned images and representing them as one-dimensional signals. However, this task can be challenging due to the diverse paper characteristics (such as layout, annotations, and grid) and image quality aspects (including noise, artifacts, and resolution). Therefore, effective image denoising becomes a necessary step to ensure accurate lead extraction. By leveraging the use of generated realistic images, it is possible to enhance the quality of denoising algorithms and facilitate the use of image processing tools meant for digitization. Methods: Our approach involves a three-step process. Firstly, using digital ECG data, an image generator produces random ECG-paper-like images with different kinds of noise, artifacts, and image resolutions, while also producing their binarized counterparts. Secondly, a convolutional-based auto-encoder is trained to both denoise and binarize the generated random images. After binarization, image processing tools retrieve individual leads by using connected component analysis and text recognition. Results: A total of 21,799 12-lead recordings from the PTB-XL dataset were used to generate ECG paper images presenting a wide range of characteristics. After the training stage, preliminary results demonstrate the feasibility of our approach and, despite the presence of pronounced noise and artifacts in the generated images, our denoising model achieves promising capability. By focusing on first binarizing the images, we increased the success of the image processing tools. To assess the generalization ability of our model with real-life images and generated ones, we compute the signal-to-noise ratio (SNR) between the digitized signal and the original one.