Robust U-Nets for Fetal R-Peak Identification in Electrocardiography
Abstract
1. Introduction
2. Methods
2.1. Data Pre-Processing
2.2. Model Training
2.3. Fetal R-Peak Detection
3. Experimental Setup
3.1. Database for Training and Evaluation
3.1.1. A&D FECGDB
3.1.2. FECGSYN DB
- Baseline: Abdominal mixture (no noise or events).
- Case 0: Baseline (no events) + noise.
- Case 1: Fetal movement + noise.
- Case 2: MHR/FHR acceleration/decelerations + noise.
- Case 3: Uterine contraction + noise.
- Case 4: Ectopic beats (for both fetus and mother) + noise.
- Case 5: Additional NI-FECG (twin pregnancy) + noise.
- SYN_origin: Pure baseline signals (no noise).
- SYN_6/SYN_9/SYN_12: Case 0 signals at SNR of 6 dB, 9 dB, and 12 dB, respectively.
3.2. Evaluation Metrics
3.3. Existing Detection Approaches
4. Evaluation Results of Proposed Method
4.1. Effect of Threshold on Performance
4.2. Robustness
4.2.1. Evaluation on Real Recordings
4.2.2. Evaluation on Synthetic Recordings
4.3. Runtime
5. Comparative Assessment of Existing R-Peak Detection Methods
5.1. Performance Relative to Robustness
5.2. Performance Relative to Match Window Tolerance
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Parer, J.T.; King, T.; Flanders, S.; Fox, M.; Kilpatrick, S. Fetal acidemia and electronic fetal heart rate patterns: Is there evidence of an association? J. Matern.-Fetal Neonatal Med. 2006, 19, 289–294. [Google Scholar] [CrossRef]
- Ugwumadu, A. Are we (mis) guided by current guidelines on intrapartum fetal heart rate monitoring? Case for a more physiological approach to interpretation. BJOG Int. J. Obstet. Gynaecol. 2014, 121, 1063–1070. [Google Scholar] [CrossRef]
- Clifford, G.D.; Silva, I.; Behar, J.; Moody, G.B. Non-invasive fetal ECG analysis. Physiol. Meas. 2014, 35, 1521–1536. [Google Scholar] [CrossRef]
- Agostinelli, A.; Grillo, M.; Biagini, A.; Giuliani, C.; Burattini, L.; Fioretti, S.; Di Nardo, F.; Giannubilo, S.R.; Ciavattini, A.; Burattini, L. Noninvasive fetal electrocardiography: An overview of the signal electrophysiological meaning, recording procedures, and processing techniques. Ann. Noninvasive Electrocardiol. 2015, 20, 303–313. [Google Scholar] [CrossRef] [PubMed]
- Fariha, M.; Ikeura, R.; Hayakawa, S.; Tsutsumi, S. Analysis of Pan-Tompkins algorithm performance with noisy ECG signals. J. Phys. Conf. Ser. 2020, 1532, 012022. [Google Scholar] [CrossRef]
- Matonia, A.; Jezewski, J.; Horoba, K.; Gacek, A.; Labaj, P. The maternal ECG suppression algorithm for efficient extraction of the fetal ECG from abdominal signal. In Proceedings of the 2006 International Conference of the IEEE Engineering in Medicine and Biology Society, New York, NY, USA, 30 August–3 September 2006; IEEE: Piscataway, NJ, USA, 2006; pp. 3106–3109. [Google Scholar] [CrossRef]
- Mirza, S.; Bhole, K.; Singh, P. Fetal ECG Extraction and QRS Detection using Independent Component Analysis. In Proceedings of the 2020 16th IEEE International Colloquium on Signal Processing & Its Applications (CSPA), Langkawi, Malaysia, 28–29 February 2020; pp. 157–161. [Google Scholar] [CrossRef]
- Sarafan, S.; Le, T.; Naderi, A.M.; Nguyen, Q.D.; Kuo, B.T.Y.; Ghirmai, T.; Han, H.D.; Lau, M.P.H.; Cao, H. Investigation of Methods to Extract Fetal Electrocardiogram from the Mother’s Abdominal Signal in Practical Scenarios. Technologies 2020, 8, 33. [Google Scholar] [CrossRef]
- Agostinelli, A.; Marcantoni, I.; Moretti, E.; Sbrollini, A.; Fioretti, S.; Di Nardo, F.; Burattini, L. Noninvasive fetal electrocardiography Part I: Pan-tompkins’ algorithm adaptation to fetal R-peak identification. Open Biomed. Eng. J. 2017, 11, 17–24. [Google Scholar] [CrossRef]
- Huang, X.; Li, C.; Liu, A.; Qian, R.; Chen, X. EEGDfus: A Conditional Diffusion Model for Fine-Grained EEG Denoising. IEEE J. Biomed. Health Inform. 2025, 29, 2557–2569. [Google Scholar] [CrossRef]
- Zhang, Y.; Jiang, L. Suppressing White-Noise Interference for Orbital Angular Momentum Waves via the Forward–Backward Dynamic Mode Decomposition. IEEE Trans. Antennas Propag. 2023, 71, 2879–2884. [Google Scholar] [CrossRef]
- Wang, B.; Deng, F.; Jiang, P. EEGDiR: Electroencephalogram denoising network for temporal information storage and global modeling through Retentive Network. Comput. Biol. Med. 2024, 177, 108626. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015, Proceedings of the 18th International Conference, Munich, Germany, 5–9 October 2015; Proceedings, Part III 18; Springer: Berlin/Heidelberg, Germany, 2015; pp. 234–241. [Google Scholar] [CrossRef]
- Yahyatabar, M.; Jouvet, P.; Cheriet, F. Dense-Unet: A light model for lung fields segmentation in Chest X-Ray images. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1242–1245. [Google Scholar] [CrossRef]
- Li, X.; Chen, H.; Qi, X.; Dou, Q.; Fu, C.W.; Heng, P.A. H-DenseUNet: Hybrid densely connected UNet for liver and tumor segmentation from CT volumes. IEEE Trans. Med. Imaging 2018, 37, 2663–2674. [Google Scholar] [CrossRef]
- Dolz, J.; Desrosiers, C.; Ben Ayed, I. IVD-Net: Intervertebral disc localization and segmentation in MRI with a multi-modal UNet. In Proceedings of the International Workshop and Challenge on Computational Methods and Clinical Applications for Spine Imaging, Granada, Spain, 16 September 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 130–143. [Google Scholar] [CrossRef]
- Vijayarangan, S.; R., V.; Murugesan, B.; S.P., P.; Joseph, J.; Sivaprakasam, M. RPnet: A Deep Learning approach for robust R Peak detection in noisy ECG. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July; 2020; pp. 345–348. [Google Scholar] [CrossRef]
- Mai, Y.; Chen, Z.; Yu, B.; Li, Y.; Pang, Z.; Han, Z. Non-Contact Heartbeat Detection Based on Ballistocardiogram Using UNet and Bidirectional Long Short-Term Memory. IEEE J. Biomed. Health Inform. 2022, 26, 3720–3730. [Google Scholar] [CrossRef]
- Zahid, M.U.; Kiranyaz, S.; Ince, T.; Devecioglu, O.C.; Chowdhury, M.E.H.; Khandakar, A.; Tahir, A.; Gabbouj, M. Robust R-Peak Detection in Low-Quality Holter ECGs Using 1D Convolutional Neural Network. IEEE Trans. Biomed. Eng. 2022, 69, 119–128. [Google Scholar] [CrossRef]
- Xu, P.; Zhu, X.; Clifton, D.A. Multimodal learning with transformers: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 12113–12132. [Google Scholar] [CrossRef]
- Zhang, H.; Qiu, D.; Feng, Y.; Liu, J. Improved U-Net models and its applications in medical image segmentation: A review. Laser Optoelectron. Prog. 2022, 59, 0200005. [Google Scholar] [CrossRef]
- Mohebbian, M.R.; Vedaei, S.S.; Wahid, K.A.; Dinh, A.; Marateb, H.R.; Tavakolian, K. Fetal ECG Extraction From Maternal ECG Using Attention-Based CycleGAN. IEEE J. Biomed. Health Inform. 2022, 26, 515–526. [Google Scholar] [CrossRef] [PubMed]
- Chivers, S.; Vasavan, T.; Nandi, M.; Hayes-Gill, B.; Jayawardane, I.; Simpson, J.; Williamson, C.; Fifer, W.; Lucchini, M. Measurement of the cardiac time intervals of the fetal ECG utilising a computerised algorithm: A retrospective observational study. JRSM Cardiovasc. Dis. 2022, 11, 20480040221096209. [Google Scholar] [CrossRef]
- Sameni, R.; Clifford, G.D. A Review of Fetal ECG Signal Processing; Issues and Promising Directions. Open Pacing Electrophysiol. Ther. J. 2010, 3, 4–20. [Google Scholar] [CrossRef] [PubMed]
- Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, 215–220. [Google Scholar] [CrossRef] [PubMed]
- Jezewski, J.; Matonia, A.; Kupka, T.; Roj, D.; Czabanski, R. Determination of fetal heart rate from abdominal signals: Evaluation of beat-to-beat accuracy in relation to the direct fetal electrocardiogram. Biomed. Tech. Eng. 2012, 57, 383–394. [Google Scholar] [CrossRef]
- Andreotti, F.; Behar, J.; Zaunseder, S.; Oster, J.; Clifford, G.D. An open-source framework for stress-testing non-invasive foetal ECG extraction algorithms. Physiol. Meas. 2016, 37, 627. [Google Scholar] [CrossRef]
- Kotas, M.; Jezewski, J.; Matonia, A.; Kupka, T. Towards noise immune detection of fetal QRS complexes. Comput. Methods Programs Biomed. 2009, 97, 241–256. [Google Scholar] [CrossRef]
- American National Standards Institute (ANSI) and Association for the Advancement of Medical Instrumentation (AAMI). Testing and reporting performance results of cardiac rhythm and ST segment measurement algorithms. In ANSI/AAMI EC38:1998 (Cardiac Monitors, Heart Rate Meters, and Alarms); Association for the Advancement of Medical Instrumentation: Arlington, VA, USA, 1998. [Google Scholar]
- Peters, C.; Vullings, R.; Rooijakkers, M.; Bergmans, J.; Oei, S.; Wijn, P. A continuous wavelet transform-based method for time-frequency analysis of artefact-corrected heart rate variability data. Physiol. Meas. 2011, 32, 1517. [Google Scholar] [CrossRef]
- Behar, J.; Andreotti, F.; Zaunseder, S.; Oster, J.; Clifford, G.D. A practical guide to non-invasive foetal electrocardiogram extraction and analysis. Physiol. Meas. 2016, 37, R1. [Google Scholar] [CrossRef]
- Jagannath, D.; Selvakumar, A.I. Issues and research on foetal electrocardiogram signal elicitation. Biomed. Signal Process. Control 2014, 10, 224–244. [Google Scholar] [CrossRef]
- Makowski, D.; Pham, T.; Lau, Z.J.; Brammer, J.C.; Lespinasse, F.; Pham, H.; Schölzel, C.; Chen, S.A. NeuroKit2: A Python toolbox for neurophysiological signal processing. Behav. Res. Methods 2021, 53, 1689–1696. [Google Scholar] [CrossRef] [PubMed]
- Pan, J.; Tompkins, W.J. A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. 1985, 3, 230–236. [Google Scholar] [CrossRef] [PubMed]
- Hamilton, P. Open source ECG analysis. In Computers in Cardiology; IEEE: Piscataway, NJ, USA, 2002; pp. 101–104. [Google Scholar] [CrossRef]
- Christov, I.I. Real time electrocardiogram QRS detection using combined adaptive threshold. Biomed. Eng. Online 2004, 3, 1–9. [Google Scholar] [CrossRef]
- Lourenço, A.; Silva, H.; Leite, P.; Lourenço, R.; Fred, A. Real time electrocardiogram segmentation for finger based ECG biometrics. In Proceedings of the International Conference on Bio-inspired Systems and Signal Processing, Algarve, Portugal, 1–4 February 2012; SciTePress: Setúbal, Portugal, 2012; Volume 2, pp. 49–54. [Google Scholar] [CrossRef]
- Kalidas, V.; Tamil, L. Real-time QRS detector using stationary wavelet transform for automated ECG analysis. In Proceedings of the 2017 IEEE 17th International Conference on Bioinformatics and Bioengineering (BIBE), Washington, DC, USA, 23–25 October 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 457–461. [Google Scholar] [CrossRef]
- Nabian, M.; Yin, Y.; Wormwood, J.; Quigley, K.S.; Barrett, L.F.; Ostadabbas, S. An open-source feature extraction tool for the analysis of peripheral physiological data. IEEE J. Transl. Eng. Health Med. 2018, 6, 2800711. [Google Scholar] [CrossRef]
- Elgendi, M.; Jonkman, M.; De Boer, F. Frequency Bands Effects on QRS Detection. Biosignals 2010, 2003, 2002. [Google Scholar] [CrossRef]
- Rodrigues, T.; Samoutphonh, S.; Silva, H.; Fred, A. A low-complexity r-peak detection algorithm with adaptive thresholding for wearable devices. In Proceedings of the 2020 25th International Conference on Pattern Recognition (ICPR), Milan, Italy, 10–15 January 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1–8. [Google Scholar] [CrossRef]
- David, R.; Duke, J.; Jain, A.; Janapa Reddi, V.; Jeffries, N.; Li, J.; Kreeger, N.; Nappier, I.; Natraj, M.; Wang, T.; et al. Tensorflow lite micro: Embedded machine learning for tinyml systems. Proc. Mach. Learn. Syst. 2021, 3, 800–811. [Google Scholar]
- Lampros, T.; Kalafatakis, K.; Giannakeas, N.; Tsipouras, M.G.; Glavas, E.; Tzallas, A.T. An optimized hybrid methodology for non-invasive fetal electrocardiogram signal extraction and monitoring. Array 2023, 19, 100302. [Google Scholar] [CrossRef]
- Qiao, L.; Hu, S.; Xiao, B.; Bi, X.; Li, W.; Gao, X. A Dual Self-Calibrating Framework for Noninvasive Fetal ECG R-Peak Detection. IEEE Internet Things J. 2023, 10, 16579–16593. [Google Scholar] [CrossRef]
- Zhou, P.; So, S.; Schwerin, B. Using U-Nets for Accurate R-Peak Detection in Fetal ECG Recordings. In Proceedings of the Computer Science & Information Technology Conference Proceedings, Dubai, United Arab Emirates, 28–29 December 2024; Volume 14. [Google Scholar] [CrossRef]
Source | Method | Filtering Approach | Feature Enhancement | Detection Mechanism |
---|---|---|---|---|
Neurokit | Neurokit2, 2021 [33] | 0.5 Hz HPF and 50 Hz notch | Gradient analysis to obtain QRS complexes | R-peaks are detected as local maxima in the QRS complexes |
Pan–Tompkins, 1985 [34] | 5–15 Hz BPF | Derivative and Squaring and Integration | Multi-stage thresholding | |
Hamilton, 2002 [35] | 8–16 Hz BPF | Rectification | Modified Pan–Tompkins (smaller integration window) | |
Christov, 2004 [36] | Multi-moving averaging filters | Multi-head analysis and Proposed Threshold System | Dual algorithm collaboration and adaptive threshold | |
EngZee, 2012 [37] | 48–52 Hz notch and Multiple LPF | Differentiation | Adaptive threshold (Christov-inspired) | |
Kalidas, 2017 [38] | Resampling (80 Hz) and SWT (db3) | Squaring and Moving Window Average | Thresholding | |
Nabian, 2018 [39] | – | Sliding window for liberal initial R-peak list detection (To obtain more potential r-peaks and reduce missed detection) | Modified Pan–Tompkins | |
Elgendi, 2010 [40] | 8–20 Hz BPF | Moving Window Integration | Thresholding | |
Rodrigues, 2021 [41] | Double derivative and Squaring and Moving window integration | FSM refinement | Exponential decaying and threshold-based | |
ECGPUWAVE | ECGPUWAVE, 2000 [25] | 0.5–40 Hz BPF and Notch (50/60 Hz) | WT and Slope analysis | Multi-lead correlation and Adaptive search window |
Our Methods | Proposed U-Nets | None | Pulse-Train map to enhance R-peak regain for model training | Thresholding for false-prediction removal |
Dataset | PPV (%) | SEN (%) | F1-Score (%) |
---|---|---|---|
AD_0 | 88.53 | 86.31 | 87.38 |
AD_5 | 98.77 | 97.95 | 98.35 |
AD_10 | 99.84 | 99.62 | 99.73 |
AD_Origin | 100.00 | 99.84 | 99.92 |
Test Record | Dataset | TP | FP | FN | PPV (%) | SEN (%) | F1-Score (%) |
---|---|---|---|---|---|---|---|
r01 | AD_0 | 627 | 10 | 17 | 98.43 | 97.36 | 97.89 |
AD_5 | 643 | 1 | 1 | 99.84 | 99.84 | 99.84 | |
AD_10 | 644 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
AD_Origin | 644 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
r04 | AD_0 | 469 | 132 | 163 | 78.04 | 74.21 | 76.07 |
AD_5 | 600 | 4 | 32 | 99.34 | 94.94 | 97.09 | |
AD_10 | 629 | 0 | 3 | 100.00 | 99.53 | 99.76 | |
AD_Origin | 632 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
r07 | AD_0 | 624 | 1 | 3 | 99.84 | 99.52 | 99.68 |
AD_5 | 627 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
AD_10 | 627 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
AD_Origin | 627 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
r08 | AD_0 | 643 | 7 | 8 | 98.92 | 98.77 | 98.85 |
AD_5 | 650 | 1 | 1 | 99.85 | 99.85 | 99.85 | |
AD_10 | 649 | 1 | 2 | 99.85 | 99.69 | 99.77 | |
AD_Origin | 651 | 0 | 0 | 100.00 | 100.00 | 100.00 | |
r10 | AD_0 | 393 | 190 | 244 | 67.41 | 61.70 | 64.43 |
AD_5 | 606 | 33 | 31 | 94.84 | 95.13 | 94.98 | |
AD_10 | 630 | 4 | 7 | 99.37 | 98.90 | 99.13 | |
AD_Origin | 632 | 0 | 5 | 100.00 | 99.22 | 99.61 |
Dataset | PPV (%) | SEN (%) | F1-Score (%) |
---|---|---|---|
SYN_6 | 63.77 | 54.61 | 58.12 |
SYN_9 | 87.16 | 83.67 | 85.05 |
SYN_12 | 89.87 | 87.30 | 88.44 |
SYN_Origin | 99.96 | 99.93 | 99.94 |
Method | Preprocessing Requirement | Dataset | F1 (%) (Performance on Origin Database) | F1 (%) (Performance on Low-SNR (0–12 dB)) | Robustness to Low-SNR |
---|---|---|---|---|---|
Agostinelli et al., 2017 [4] * Derivative and Squaring and Integration and Multi-stage thresholding | 9–27 Hz BPF | ADFECG DB | 99.4 | Not reported | - |
Neurokit2 et al., 2021 [33] (Toolbox Method) (Gradient Analysis: R-peaks are detected as local maxima in the QRS complexes) | Double derivative and Squaring and Moving window integration | ADFECG DB | 98.93 | 73.80 (AD_0) | Medium |
FECGSYN | 77.87 | 42.42 (SYN_12) | Low | ||
Rodrigues et al., 2021 [41] (Toolbox Method) (Modified Pan–Tompkins) | 8–16 Hz BPF | ADFECG DB | 99.47 | 36.18 (AD_0) | Low |
FECGSYN | 81.6 | 66.09 (SYN_12) | Medium | ||
Lampros et al., 2023 [43] * (Pan–Tompkins’ algorithm) | Decomposed by EMD and Denoised by Wavelet soft thresholding and An algorithm based on correlation analysis produces the optimal IMF subset | ADFECG DB | 93.24 | Not reported | - |
Qiao et al., 2023 [44] * (Variance-based fetal R-peak seed selection, time-varying coarse prediction, and adaptive probability mask calibration) | None | ADFECG DB | 97.6 | Not reported | - |
Proposed U-Nets | None | ADFECG DB | 99.92 | 87.38 (AD_0) | High |
FECGSYN | 99.94 | 88.44 (SYN_12) | High |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhou, P.; So, S.; Schwerin, B. Robust U-Nets for Fetal R-Peak Identification in Electrocardiography. Algorithms 2025, 18, 487. https://doi.org/10.3390/a18080487
Zhou P, So S, Schwerin B. Robust U-Nets for Fetal R-Peak Identification in Electrocardiography. Algorithms. 2025; 18(8):487. https://doi.org/10.3390/a18080487
Chicago/Turabian StyleZhou, Peishan, Stephen So, and Belinda Schwerin. 2025. "Robust U-Nets for Fetal R-Peak Identification in Electrocardiography" Algorithms 18, no. 8: 487. https://doi.org/10.3390/a18080487
APA StyleZhou, P., So, S., & Schwerin, B. (2025). Robust U-Nets for Fetal R-Peak Identification in Electrocardiography. Algorithms, 18(8), 487. https://doi.org/10.3390/a18080487