A modular framework for the interpretation of paper ECGs

Sara Summerton1, Tuija Leinonen2, George Searle3, Matti Kaisti2, David C Wong4
1University of Manchester, 2University of Turku, 3UCL, 4University of Leeds


Abstract

Paper ECGs are still commonly used in clinical care. Although there is an extensive history in the standalone problems of paper ECG digitisation and digital ECG interpretation, there are few examples of interpretation directly from paper ECGs. We tackle this end-to-end problem by combining and extending existing standalone approaches.

Our team "The Easy Geese" used a modular, three stage process that takes an RGB image of an ECG as input and outputs the ECG interpretation. We assumed that the ECG image was a standard paper strip with red gridlines corresponding to 200 ms and 0.5 mV.

In stage one, image enhancement, we remove shadows by morphologically closing the blue channel and enhancing contrast via a sigmoid function. Using a hough transform on the red channel, we determine the orientation of the gridlines and rotate the image. Finally, we perform morphological opening to reconnect gaps in the signal.

In stage two, digitisation, we adapt the open-source ecg-miner repository which uses dynamic programming to determine a minimum cost path of black pixels in every column of the image. The resulting signal is rescaled using the reference pulse. We extended this method to use gridline parameters to account for missing reference pulses.

In stage three, classification, we employ a model pre-trained on 2020 CinC/Physionet challenge datasets for interpretation of digital ECGs.

Our validation set (local cross-validation) metrics were: SNR: 0.00 (0.00), F-measure: 0.47 (0.67). In internal experiments, outputs from digitisation appear locally accurate for many examples, but provide spurious results when the ECG traces after image enhancement are not contiguous. This explains the poor SNR and has downstream impact on classification performance.

Further work in the official challenge phase will include: generalisable grayscale gridline detection, reference pulse detection and methods for fixing non-contiguous ECG traces.