Enhancing ECG Digitization and Diagnostic Accuracy through Operational Generative Adversarial Networks

Muhammad Uzair Zahid1, Zarmeen Shahid2, Khuzaima Shahid3, Serkan Kiranyaz4, Moncef Gabbouj5
1Department of Computing Sciences, Tampere University, 2Nottingham University Hospital NHS Trust, Nottingham, UK, 3Information Technology Lahore Pakistan, 4Department of Electrical Engineering, Qatar University, Doha, Qata, 5Faculty of Information Technology and Communication Sciences, Tampere University, Tampere, Finland


Abstract

This study introduces a pioneering method for digitizing and classifying 12-lead ECGs using Operational Generative Adversarial Networks (Op-GANs) with a generative neuron model. We started by generating paired data where the input image is a synthetic representation created from an actual ECG waveform. These images often have various distortions, such as creases, shadows, and blurred or faded ink, reducing the visual clarity of ECG waveform. The corresponding output for each distorted image is a clean version without gridlines and distortions, which provides a transparent background for segmenting the waveform. We used an adversarial process involving a generator and a discriminator to train the Op-GANs. This process helped correct misalignments and diminish noise from typical artifacts. It also removed gridlines, which standardized the inputs for subsequent analysis. Then, edge detection algorithms delineate the ECG waveform boundaries within the binary image format. After that we map these visual representations to digital signals by scanning the processed images horizontally and vertically, thereby capturing the waveform's amplitude and temporal data based on the standard grid scale of the denoised ECG. The extracted time-series data is then smoothed and interpolated using techniques such as the Savitzky-Golay filter, ensuring the digitized waveform accurately reflects the original ECG waveform. To classify digitized waveforms into normal and abnormal, we use a 1D Self-Organized Operational Neural Network (1D-Self ONN). This neural network incorporates residual blocks that capture and leverage complex ECG dynamics. Our team "Heartsmiths" achieved promising results in the unofficial phase of the challenge, with an SNR value of -18.11 for waveform digitization and an F1-score of 0.49 for classification. To improve classification accuracy further, we plan to refine our digitization techniques using Op-GANs in the official phase of the challenge, demonstrating how advanced neural network models are crucial for improving medical image analysis and diagnostic accuracy.