QRS Detection in Single-Lead, Telehealth Electrocardiogram Signals: Benchmarking Open-Source Algorithms
Florian Kristof, Maximilian Kapsecker, Leon Nissen, James Brimicombe, Martin R. Cowie, Zixuan Ding, Andrew Dymond, Stephan M. Jonas, Hannah Clair Lindén, Gregory Y. H. Lip, Kate Williams, Jonathan Mant, Peter H. Charlton
Abstract
A key step in electrocardiogram (ECG) analysis is the detection of QRS complexes, particularly for arrhythmia detection. Telehealth ECGs present a new challenge for automated analysis as they are noisier than traditional clinical ECGs. The aim of this study was to identify the best-performing open-source QRS detector for use with telehealth ECGs.
Introduction
The electrocardiogram (ECG) is one of the most widely used physiological measurement techniques, providing detailed information on heart function. Traditionally ECG measurements have been confined to clinical settings. However, recently it has become possible to measure the ECG in telehealth settings using handheld devices or smartwatches [1, 2]. This presents the opportunity to conduct health assessment beyond the clinical setting, with potential applications including remote health monitoring, personalized diagnosis, rehabilitation, and screening for atrial fibrillation (AF). Indeed, the recent COVID-19 pandemic has acted as a strong catalyst for innovation in this area [3]. However, the increasing use of wearable and telehealth technologies also presents new challenges.
Methods
QRS detection algorithms
The 18 QRS detectors assessed in this study are summarised in Table 1 (with source links provided in Table A in S1 Text). The QRS detectors were identified through a search for open-source algorithms. The majority of algorithms were found in either in the ‘NeuroKit’ [8] or ‘ecgdetector’ [9] Python packages. Some algorithms were available in both packages with slightly different implementations, in which case the faster implementation was used. Python implementations were used where available to provide a fair comparison of algorithm execution times.
Results
Algorithm performance
The performance of the algorithms is presented in Fig 3 using the F1 score. When using a F1 score of ≥ 0.96 to identify good performance, a total of 12 out of 18 algorithms performed well on ECGs collected under clinical supervision (ARR, HIGH and LOW, and SIN). The exceptions were engz, gamb, jqrs, mart, nab and rpeak. Fewer algorithms performed well on telehealth ECGs: five algorithms performed well on the TELE dataset (gqrs, nk, rdeco, two-avg, and unsw); six algorithms performed well on high-quality SAFER data (fnvg, fwhvg, nk, rdeco, two-avg, and unsw); and performance was considerably poorer on low-quality SAFER data, with only three algorithms scoring ≥ 0.78 (fnvg, nk, and unsw), and none scored higher than 0.84.
Discussion
Summary of findings
This study assessed the performance of open-source QRS detectors on single-lead, telehealth ECGs. The neurokit (nk)and UNSW (unsw)QRS detectors were identified as the best-performing out of 18 QRS detectors. They performed well on telehealth ECGs recorded without clinical supervision, and also on ECGs recorded in clinical settings. They achieved F1 scores of ≥0.98 on high-quality telehealth ECGs and ≥0.97 on ECGs recorded in clinical settings. Performance was lower at ≥0.78 when analysing low-quality telehealth ECGs. Performance was not substantially affected by heart rhythm or gender. nk had one of the fastest execution times (at 0.009% of the signal duration), whereas unsw was over ten times slower (0.124%).
Conclusion
This study identified two leading QRS detectors for use with single-lead, telehealth ECGs: the nk and unsw algorithms. These algorithms provided accurate QRS detection with fast execution times. Whilst most other algorithms performed well on data collected under clinical supervision, many did not perform as well on telehealth data, demonstrating the importance of selecting a high-performance algorithm for use in clinical analysis. The performance of even the leading algorithms was substantially lower on low-quality telehealth ECGs, highlighting the need to handle low-quality ECGs appropriately in an analysis pipeline. All the QRS detection algorithms used in this study are openly available, ensuring that they can be quickly used in future research.
Citation: Kristof F, Kapsecker M, Nissen L, Brimicombe J, Cowie MR, Ding Z, et al. (2024) QRS detection in single-lead, telehealth electrocardiogram signals: Benchmarking open-source algorithms. PLOS Digit Health 3(8): e0000538. https://doi.org/10.1371/journal.pdig.0000538
Editor: Calvin Or, The University of Hong Kong, HONG KONG
Received: January 16, 2024; Accepted: May 27, 2024; Published: August 13, 2024
Copyright: © 2024 Kristof et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The following datasets are publicly available at the links provided in Table C in S1 Text: (i) MIT-BIH Arrhythmia Database (https://www.physionet.org/physiobank/database/mitdb/); (ii) PhysioNet/Computing in Cardiology Challenge 2014 training dataset and augmented training dataset (https://physionet.org/content/challenge-2014/1.0.0/); (iii) MIT-BIH Normal Sinus Rhythm Database (https://physionet.org/physiobank/database/nsrdb/); and (iv) TELE ECG Database (https://doi.org/10.7910/DVN/QTG0EP). The SAFER dataset cannot be shared due to ethical restrictions. Requests for access to the SAFER dataset should be directed to the SAFER study coordinator (SAFER@medschl.cam.ac.uk) and will be considered by the investigators, in accordance with participant consent.
Funding: This study is funded by the British Heart Foundation (FS/20/20/34626 awarded to PHC), and the National Institute for Health and Care Research (NIHR) Programme Grants for Applied Research Programme (RP-PG0217-20007 awarded to JM), and the NIHR School for Primary Care Research (SPCR-2014-10043, project 410 awarded to JM). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: MRC is employed by Astrazeneca PLC. HCL is employed by Zenicor Medical Systems AB.