Digital signal and image-based ECG classification and its performance by modern residual convolutional networks

Peter Bugata1, Peter Bugata Jr.1, Dávid Hudák1, Vladimíra Kmečová1, Monika Staňková1, Ľubomír Antoni2, Erik Bruoth2, Dávid Gajdoš1, Gabriela Vozáriková2, Ivan Žežula2
1VSL Software, 2UPJŠ Košice


Abstract

In The George B. Moody PhysioNet Challenge 2024, we developed a method for classifying electrocardiograms (ECGs) captured from images or paper printouts. Our prediction model consists of two neural networks. The first network predicts the rotation angle of the image for its reverse rotation. The second network then processes the modified image and classifies the ECG as Normal or Abnormal. In both cases, we applied the modern residual convolutional network ConvNeXt, inspired by visual transformers. As a training set, we utilized the PTB-XL dataset supplemented with selected records from two other freely available digital ECG datasets – the Hefei Cup and Shandong Provincial Hospital databases. We omitted "collision" records labeled as Normal that were also assigned a serious diagnosis tag in the original dataset. In the case of the PTB-XL database, we omitted "indefinite" records that had a NORM tag with a probability of at most 50%. For each digital ECG, we generated 10 images using the supplied generator of synthetic ECG images with random parameters. We compared the performance of the image-based prediction model with that of a model for digital signal classification. As a reference model, we used the 1-dimensional convolutional network ResNet-50. It processed a digital signal in the original frequency of 500 Hz with three variants: all 12 leads with a duration of 10 seconds, lead II only with a duration of 10 seconds, and all 12 leads with a duration of 2.5 seconds (inspired by the standard way of printing ECG in four columns). During the internal evaluation of our training set using 5-fold cross-validation, we attained an F1-score of 0.91 for the image-based binary Normal/Abnormal classification. In the unofficial round of the competition, our CeZIS team scored 0.74 on the hidden validation set.