Aims: This study aims to provide a new methodology for the detection and delineation of the electrocardiogram (ECG), by adapting a deep learning architecture for image segmentation. ECG detection consists in predicting the existence of P, QRS and T waves, whereas ECG delineation consists in the localization of their onsets and offsets. This process is usually a key step for further clinical marker extraction. For this purpose, deep learning methodologies can learn automatic, data-based filters for the analysis of the ECG, improving upon state-of-the-art, rule-based methodologies.
Methods: The QT database was employed for training and evaluation. A U-Net network was proposed. This network, composed of a convolutional encoder path for obtaining more abstract representations of the data, and a decoder path for recovering sharp delineation borders, was adapted for one-dimensional data. The objective of the training procedure is to learn a set of weights for every convolutional layer. These layers, analogous to filters, attain the final wave delineation. A five-fold cross-validation procedure, using strict subject-wise splitting, was employed for testing the generalizability of the network.
Results: The detection performance shows a precision of 89.27%, 98.18% and 93.60% for the detection of the P, QRS and T waves, respectively; as well as a recall of 89.07%, 99.47% and 95.21%. The delineation performance shows a mean and standard deviation of -3.3±15.8, -3.2±22.4 and 8.3±52.6 ms on the P, QRS and T wave onsets, respectively; and of 6.8±15.2, 7.9±21.9 and 7.4±59.8 ms on the offsets. Figure shows a detection example.
Conclusions: This work frames the task as a segmentation problem for using the U-Net architecture, a mature segmentation architecture designed for image analysis. This network allows for obtaining generalizable, nearly state-of-the-art results on the ECG detection and delineation.