Subject-Independent per Beat PPG to Single-Lead ECG Mapping
Abstract
:1. Introduction
- Noisy training dataset: There is a great impact of noisy training samples on the overall model learning accuracy;
- Long signal reconstruction: The problems arising from complete signal reconstruction are represented in (1) the impact of noise interval on the overall reconstruction where the signal quality may vary due to sensor movement/user activity. (2) Moreover, long signal reconstruction results in a deep learning model with higher computational complexity;
- Beat segmentation errors: The problem arising from per-beat reconstruction resides in a high chance of errors in PPG onset detection\segmentation in both sensed signals and training datasets;
- Low reconstruction quality/Subject dependency: There are many claims for excellent performance over subject-dependent models where the model is trained for specific subject signals only. However, the achieved performance of single-lead ECG reconstruction is poor in subject-independent models where the model is trained over the whole dataset signals.
2. Related Work
- Subject-Dependent: Signals/beats from the same subject are divided into training and testing datasets. The model is trained on some beats and tested on other beats related to the same subject;
- Partial Subject-Independent: The training is performed on 80% of beats from multiple subjects and tested on the last 20% of beats from the same subjects. A part of all subjects’ records is involved in training, whereas the other part is used for testing. It provides more generalization than subject-dependent models;
- Completely Subject-Independent: The training is performed on subjects and tested on completely different subjects. This represents the most interesting scenario addressed in this paper.
3. Proposed System
3.1. Dataset
Pre-Preprocessing
- Filtering
- Peak detection
- Alignment failure
- Segmentation and normalization
- Outlier beat removal
3.2. Proposed Deep Learning Model
3.2.1. Model Choice
3.2.2. Model Details
- A.
- The encoder part consists of four blocks and a bottleneck. Each block consists of a 1D CNN layer for feature extraction, a batch normalization layer that helps in making training more stable and faster (allowing every layer of the network to do learning more independently), and a max pooling layer for feature reduction to dispose of unnecessary features. The kernel size of beginning layers was chosen to be of small dimensions to extract small features. Kernel dimensions increase with advancing layers to extract and combine features from small features. The activation function used in almost all model layers is Leaky ReLU, which has proved its efficiency in generative networks with fast training compared to other activation functions. The bottleneck consists of a flattening layer that flattens the output of the previous convolution layer to feed it to a dense layer. Another benefit of flattening layers is to allow a combination of features that come from different places of the previous convolution layer.
- B.
- The decoder part consists of four blocks followed by a convolution transpose layer and only one BiLSTM layer at the end. Each block of the decoder blocks consists of a convolution transpose layer and batch normalization followed by the Leaky ReLU activation function. The last layer is a BiLSTM layer that was chosen to make samples of reconstructed ECG beats related to each other. Other than normal LSTM, which can detect the dependency of the next sample on previous samples, the chosen BiLSTM can detect the dependency of the next samples on previous samples and vice versa.
4. Model Training and Results
4.1. Model Training
- MIMIC II dataset
- 2.
- BIDMC dataset
- 3.
- Completely subject-independent training
- Pearson’s correlation coefficient (r)
- Relative root mean square error (rRMSE)
- Mean square error (MSE)
- Complexity criteria
4.2. Results
4.2.1. MIMIC II Subject-Independent Training
4.2.2. BIDMC Subject-Independent Training
4.2.3. Completely Subject-Independent Training Scheme Results
4.3. Discussion
- The data preprocessing step: It is as important as the model architecture design. Cleaned data support good training and evaluation by excluding disturbing data. For example, the choice of segmentation to be peak-to-peak and the outlier removal step help to increase the Pearson’s correlation coefficient between the model output and actual single-lead ECG beats.
- Data augmentation step: For resolving data shortage, proper data augmentation is applied. The augmentation procedure adds a Gaussian shape randomly that resembles the encountered signal variations. For example, in the case of the completely subject-independent scheme, data augmentation helps in boosting the Pearson’s correlation coefficient by 4%.
- Model architecture: The optimal architecture (including a good choice of the number of model layers, the size of the filters of each layer, and the number of filters for convolution layers and optimizer) is more important than the complexity of the architecture of the model. Moreover, adding the BiLSTM layer at the end of the decoder enables detecting the dependency of the next samples on previous samples and vice versa. Furthermore, this layer makes beat samples related to each other, which leads to a smoothing of model output, which leads to boosting the Pearson’s correlation coefficient by 1%. It is worth mentioning that the output of the model without the BiLSTM layer was noisy.
- Complexity adaptation: The number of layers is adapted for properly describing underlying features without being highly complicated. So, this provides a lightweight model with low complexity order. Hence, it is proper to integrate it into wearable devices satisfying the computation power limitation of mobile devices. It only has about 57 K parameters with a size of 850 KB. Another measure of complexity is the FLOPs of our model: 2.28 M for the input beat of 128 samples. Moreover, it can be used to provide input for another model to detect heart diseases that cannot be detected very well using only PPG.
- The frequency band of the band-pass filter is one of the data and model’s limitations. The frequency band is from 0.5 to 30 Hz, which will affect signals with a frequency band more than 30 HZ, which happens in some arrhythmias. This limitation will be addressed in future work. The reason behind this choice is that ECG with frequency bands more than 30 HZ is not popular, and this range helps in disposing of noisy signals. It is worth mentioning that some research uses smaller bands, for example, the authors in [28] chose the band to be from 0.5 to 20 HZ.
- The second limitation of this paper is inaccurate peak detection. Inaccurate peak detection will have an effect in the training stage and testing stage. In the training stage, inaccurate peak detection will result in wrong beats which will be removed in the outlier removal step during data cleaning. If the number of inaccurate beats increases, the number of outliers will increase, so it will lessen the number of training beats. In the testing stage, the performance of almost any beat-based deep learning model will be negatively affected if it is fed inaccurate beats. For our model, it will be dependent on the amount of bias between the correct peaks and the detected peaks. A small amount of bias will not have a significant effect on model output. The effect of bad segmentation (inaccurate peak detection) varies; sometimes it appears in the T wave, P wave, or both of them, as shown in Figure 15. This problem can be solved by ensuring that the algorithm used to detect peaks is accurate and removes inaccurate peaks before feeding them to model. This problem will be addressed in future work.
- As known ECG signals (lead II) have a large variation from one to another, so in a completely subject-independent training scheme, we have some limitations and conditions to obtain good results. Training and testing datasets should come from people with the same gender and same health status; their ages should also be near to each other. The previous condition ensures that the variation between testing and training can be captured by the deep learning model. This limitation will be addressed in future work by using deep learning generalization techniques and searching for a large dataset that meets the previous conditions.
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Ethical Approval
Competing Interests
Abbreviations
µ | mean |
ABP | arterial blood pressure |
BiLSTM | bidirectional long short-term memory |
CNN | convolutional neural network |
CVD | cardiovascular disease |
DBSCAN | density-based spatial clustering of applications with noise |
DCT | discrete cosine transform |
ECG | electrocardiogram |
FLOPs | floating point operations |
GAN | generative adversarial network |
HDBSCAN | density-based clustering based on hierarchical density estimates |
MIMIC | Multiparameter Intelligent Monitoring in Intensive Care |
MSE | mean square error |
PPG | photoplethysmography |
r | Pearson’s correlation coefficient |
RNN | recurrent neural network |
rRMSE | relative root mean square error |
SA | sinoatrial |
WHO | World Health Organization |
σ | standard deviation |
References
- Organization World Health. World Health Statistics 2022; Organization World Health: Geneva, Switzerland, 2022. [Google Scholar]
- Rosiek, A.; Leksowski, K. The risk factors and prevention of cardiovascular disease: The importance of electrocardiogram in the diagnosis and treatment of acute coronary syndrome. Ther. Clin. Risk Manag. 2016, 12, 1223. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Vicar, T.; Novotna, P.; Hejc, J.; Janousek, O.; Ronzhina, M. (Eds.) Cardiac abnormalities recognition in ECG using a convolutional network with attention and input with an adaptable number of leads. In 2021 Computing in Cardiology (CinC); IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
- Aublin, P.; Ben Ammar, M.; Achache, N.; Benahmed, M.; El Hichami, A.; Barret, M.; Fix, J.; Oster, J. (Eds.) Cardiac abnormality detection based on an ensemble voting of single-lead classifier predictions. In 2021 Computing in Cardiology (CinC); IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
- Dawber, T.; Kannel, W.; Love, D.E.; Streepe, R.B. The electrocardiogram in heart disease detection; a comparison of the multiple and single lead procedures. Circulation 1952, 5, 559–566. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Afkhami, R.G.; Azarnia, G.; Tinati, M.A. Cardiac arrhythmia classification using statistical and mixture modeling features of ECG signals. Pattern Recognit. Lett. 2016, 70, 45–51. [Google Scholar] [CrossRef]
- Dilmac, S.; Korurek, M. ECG heart beat classification method based on modified ABC algorithm. Appl. Soft Comput. 2015, 36, 641–655. [Google Scholar] [CrossRef]
- Acharya, U.R.; Hagiwara, Y.; Koh, J.E.W.; Oh, S.L.; Tan, J.H.; Adam, M.; Tan, R.S. Entropies for automated detection of coronary artery disease using ECG signals: A review. Biocybern. Biomed. Eng. 2018, 38, 373–384. [Google Scholar] [CrossRef]
- Oresko, J.J.; Jin, Z.; Cheng, J.; Huang, S.; Sun, Y.; Duschl, H.; Cheng, A.C. A wearable smartphone-based platform for real-time cardiovascular disease detection via electrocardiogram processing. IEEE Trans. Inf. Technol. Biomed. 2010, 14, 734–740. [Google Scholar] [CrossRef]
- Nasimov, R.; Muminov, B.; Mirzahalilov, S.; Nasimova, N. (Eds.) Algorithm of Automatic Differentiation of Myocardial Infarction from Cardiomyopathy based on Electrocardiogram. In Proceedings of the 2020 IEEE 14th International Conference on Application of Information and Communication Technologies (AICT), Tashkent, Uzbekistan, 7–9 October 2020; IEEE: Piscataway, NJ, USA, 2020. [Google Scholar]
- Steinberg, C.; Philippon, F.; Sanchez, M.; Fortier-Poisson, P.; O’hara, G.; Molin, F.; Sarrazin, J.-F.; Nault, I.; Blier, L.; Roy, K.; et al. A novel wearable device for continuous ambulatory ECG recording: Proof of concept and assessment of signal quality. Biosensors 2019, 9, 17. [Google Scholar] [CrossRef] [Green Version]
- Kamga, P.; Mostafa, R.; Zafar, S. The Use of Wearable ECG Devices in the Clinical Setting: A Review. Curr. Emerg. Hosp. Med. Rep. 2022, 10, 67–72. [Google Scholar] [CrossRef]
- Wang, D.; Yang, X.; Liu, X.; Jing, J.; Fang, S. Detail-preserving pulse wave extraction from facial videos using consume-level camera. Biomed. Opt. Express 2020, 11, 1876–1891. [Google Scholar] [CrossRef]
- Allen, J. Photoplethysmography and its application in clinical physiological measurement. Physiol. Meas. 2007, 28, R1. [Google Scholar] [CrossRef] [Green Version]
- Karlen, W.; Raman, S.; Ansermino, J.M.; Dumont, G.A. Multiparameter respiratory rate estimation from the photoplethysmogram. IEEE Trans. Biomed. Eng. 2013, 60, 1946–1953. [Google Scholar] [CrossRef]
- Temko, A. Accurate heart rate monitoring during physical exercises using PPG. IEEE Trans. Biomed. Eng. 2017, 64, 2016–2024. [Google Scholar] [CrossRef] [Green Version]
- Harju, J.; Tarniceriu, A.; Parak, J.; Vehkaoja, A.; Yli-Hankala, A.; Korhonen, I. Monitoring of heart rate and inter-beat intervals with wrist plethysmography in patients with atrial fibrillation. Physiol. Meas. 2018, 39, 065007. [Google Scholar] [CrossRef]
- Slapničar, G.; Luštrek, M.; Marinko, M. Continuous blood pressure estimation from PPG signal. Informatica 2018, 42, 33–42. [Google Scholar]
- Mohan, P.M.; Nisha, A.A.; Nagarajan, V.; Jothi, E.S.J. (Eds.) Measurement of arterial oxygen saturation (SpO2) using PPG optical sensor. In Proceedings of the 2016 International Conference on Communication and Signal Processing (ICCSP), Noida, India, 26–28 December 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Kuznetsova, T.; Szczesny, G.; Thijs, L.; Jozeau, D.; D’hooge, J.; Staessen, J.A. Assessment of peripheral vascular function with photoplethysmographic pulse amplitude. Artery Res. 2011, 5, 58–64. [Google Scholar] [CrossRef]
- Elgendi, M. On the analysis of fingertip photoplethysmogram signals. Curr. Cardiol. Rev. 2012, 8, 14–25. [Google Scholar] [CrossRef] [PubMed]
- Lin, W.-H.; Wu, D.; Li, C.; Zhang, H.; Zhang, Y.-T. (Eds.) Comparison of heart rate variability from PPG with that from ECG. In Proceedings of the International Conference on Health Informatics: ICHI 2013, Vilamoura, Portugal, 7–9 November 2013; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
- Polanía, L.F.; Mestha, L.K.; Huang, D.T.; Couderc, J.-P. (Eds.) Method for classifying cardiac arrhythmias using photoplethysmography. In Proceedings of the 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, Italy, 25–29 August 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
- Banerjee, R.; Sinha, A.; Choudhury, A.D.; Visvanathan, A. (Eds.) PhotoECG: Photoplethysmographyto estimate ECG parameters. In Proceedings of the 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Florence, Italy, 4–9 May 2014; IEEE: Piscataway, NJ, USA, 2014. [Google Scholar]
- Gidea, M.; Gidea, C.; Byrd, W. Deterministic models for simulating electrocardiographic signals. Commun. Nonlinear Sci. Numer. Simul. 2011, 16, 3871–3880. [Google Scholar] [CrossRef]
- McSharry, P.E.; Clifford, G.D.; Tarassenko, L.; Smith, L.A. A dynamical model for generating synthetic electrocardiogram signals. IEEE Trans. Biomed. Eng. 2003, 50, 289–294. [Google Scholar] [CrossRef] [Green Version]
- Sarkar, P.; Etemad, A. (Eds.) Cardiogan: Attentive generative adversarial network with dual discriminators for synthesis of ECG from PPG. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021. [Google Scholar]
- Tang, Q.; Chen, Z.; Guo, Y.; Liang, Y.; Ward, R.; Menon, C.; Elgendi, M. Robust Reconstruction of Electrocardiogram Using Photoplethysmography: A Subject-Based Model. Front. Physiol. 2022, 645. [Google Scholar] [CrossRef]
- Zhu, Q.; Tian, X.; Wong, C.-W.; Wu, M. Learning your heart actions from pulse: ECG waveform reconstruction from PPG. IEEE Internet Things J. 2021, 8, 16734–16748. [Google Scholar] [CrossRef]
- Omer, O.A.; Salah, M.; Hassan, A.M.; Mubarak, A.S. Beat-by-Beat ECG Monitoring from Photoplythmography Based on Scattering Wavelet Transform. Traitement Signal 2022, 39, 1483–1488. [Google Scholar] [CrossRef]
- Tian, X.; Zhu, Q.; Li, Y.; Wu, M. (Eds.) Cross-domain joint dictionary learning for ECG reconstruction from PPG. In Proceedings of the ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; IEEE: Piscataway, NJ, USA, 2020. [Google Scholar]
- Zhu, J.-Y.; Park, T.; Isola, P.; Efros, A.A. (Eds.) Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 27–29 October 2017. [Google Scholar]
- Pimentel, M.A.; Johnson, A.E.; Charlton, P.; Birrenkott, D.; Watkinson, P.J.; Tarassenko, L.; Clifton, D.A. Toward a robust estimation of respiratory rate from pulse oximeters. IEEE Trans. Biomed. Eng. 2016, 64, 1914–1923. [Google Scholar] [CrossRef]
- Li, Y.; Tian, X.; Zhu, Q.; Wu, M. Inferring ECG from PPG for Continuous Cardiac Monitoring Using Lightweight Neural Network. arXiv 2023, arXiv:201204949. [Google Scholar]
- Saeed, M.; Lieu, C.; Raber, G.; Mark, R.G. (Eds.) MIMIC II: A massive temporal ICU patient database to support research in intelligent patient monitoring. In Computers in Cardiology; IEEE: Piscataway, NJ, USA, 2002. [Google Scholar]
- Kachuee, M.; Kiani, M.M.; Mohammadzade, H.; Shabany, M. (Eds.) Cuff-less high-accuracy calibration-free blood pressure estimation using pulse transit time. In Proceedings of the 2015 IEEE international symposium on circuits and systems (ISCAS), Lisbon, Portugal, 24–27 May 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
- Moody, G.; Mark, R. A database to support development and evaluation of intelligent intensive care monitoring. In Computers in Cardiology; IEEE: Indianapolis, IN, USA, 1996; pp. 657–660. [Google Scholar]
- The MathWorks I. Timeseries Ideal Filter—MATLAB Idealfilter—MathWorks. Help Center. Available online: https://www.mathworks.com/help/matlab/ref/timeseries.idealfilter.html, (accessed on 1 March 2023).
- Salah, M.; Omer, O.A.; Hassan, L.; Ragab, M.; Hassan, A.M.; Abdelreheem, A. Beat-Based PPG-ABP Cleaning Technique for Blood Pressure Estimation. IEEE Access 2022, 10, 55616–55626. [Google Scholar] [CrossRef]
- Tusman, G.; Acosta, C.M.; Pulletz, S.; Böhm, S.H.; Scandurra, A.; Arca, J.M.; Madorno, M.; Sipmann, F.S. Photoplethysmographic characterization of vascular tone mediated changes in arterial pressure: An observational study. J. Clin. Monit. Comput. 2019, 33, 815–824. [Google Scholar] [CrossRef]
- Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef]
- Elgendi, M.; Norton, I.; Brearley, M.; Abbott, D.; Schuurmans, D. Systolic peak detection in acceleration photoplethysmograms measured from emergency responders in tropical conditions. PLoS ONE 2013, 8, e76585. [Google Scholar] [CrossRef] [Green Version]
- Campello, R.J.; Moulavi, D.; Sander, J. (Eds.) Density-based clustering based on hierarchical density estimates. In Proceedings of the Pacific-Asia Conference on Knowledge Discovery and Data Mining, Gold Coast, Australia, 14–17 April 2013; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Ester, M.; Kriegel, H.-P.; Sander, J.; Xu, X. (Eds.) A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. Kdd; AAAI Press: Portland, OR, USA, 1996; Volume 226, p. 231. [Google Scholar]
- Degirmenci, M.; Ozdemir, M.A.; Izci, E.; Akan, A. Arrhythmic heartbeat classification using 2d convolutional neural networks. Irbm 2022, 43, 422–433. [Google Scholar] [CrossRef]
- Wang, Q.; Feng, C.; Xu, Y.; Zhong, H.; Sheng, V.S. A novel privacy-preserving speech recognition framework using bidirectional LSTM. J. Cloud Comput. 2020, 9, 36. [Google Scholar] [CrossRef]
- Nonaka, N.; Seita, J. Data augmentation for electrocardiogram classification with deep neural network. arXiv 2020, arXiv:200904398. [Google Scholar]
- Liu, L.; Tang, W.; Chen, G.; Lu, Y. Correlation and agreement: Overview and clarification of competing concepts and measures. Shanghai Arch. Psychiatry 2016, 28, 115. [Google Scholar] [PubMed]
Subject Dependency | Number of Subjects per Model | Relation between Test and Train Dataset | Examples |
---|---|---|---|
Subject-Dependent | Single subject | Signals/beats from the same subject are divided into training and testing datasets | [28,29] |
Partial Subject-Independent | Multiple subjects | 80% of beats from each subject for training and 20% for testing | [27,30,31] |
Completely Subject-Independent | Multiple subjects | Training and testing datasets come from different subjects who have the same diseases, gender, and age range | Our Proposed |
Dataset | Training/Testing Scheme | Number of Subjects Train/Test | Number of Beats Training/Test | Duration of Training/Test Dataset in Hours |
---|---|---|---|---|
Extracted from MIMIC II [35] | Partially subject-independent | 12,000/12,000 | 622,776/77,848 | About 177.72/14.7 |
BIDMC [33] | Partially subject-independent | 53/53 | 17,650/4413 | About 3.28/0.82 |
MIMIC database [37] | Completely subject-independent | 1/1 | 5000/5876 | About 1/1 |
Criteria | µ | σ |
---|---|---|
MSE | 0.0086 | 0.0125 |
r | 0.923 | 0.092 |
rRMSE | 0.35 | 0.083 |
Algorithm | r | rRMSE | FLOPs(M) |
---|---|---|---|
µ ± σ | µ ± σ | - | |
DCT [29] | 0.70 ± 0.35 | 0.66 ± 0.23 | 0.36 |
XDJDL [31] | 0.82 ± 0.27 | 0.48 ± 0.36 | 60.21 |
Lightweight neural network [34] full version | 0.90 ± 0.16 | 0.35 ± 0.26 | 28.32 |
Lightweight neural network [34] compressed version | 0.89 ± 0.16 | 0.39 ± 0.25 | 18.63 |
Proposed model | 0.91 ± 0.10 | 0.31 ± 0.07 | 2.95 |
Without data augmentation | rRMSE | 0.582 ± 0.703 |
R | 0.846 ± 0.0396 | |
With oriented data augmentation | rRMSE | 0.379 ± 0.361 |
R | 0.908 ± 0.0305 |
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. |
© 2023 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
Abdelgaber, K.M.; Salah, M.; Omer, O.A.; Farghal, A.E.A.; Mubarak, A.S. Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information 2023, 14, 377. https://doi.org/10.3390/info14070377
Abdelgaber KM, Salah M, Omer OA, Farghal AEA, Mubarak AS. Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information. 2023; 14(7):377. https://doi.org/10.3390/info14070377
Chicago/Turabian StyleAbdelgaber, Khaled M., Mostafa Salah, Osama A. Omer, Ahmed E. A. Farghal, and Ahmed S. Mubarak. 2023. "Subject-Independent per Beat PPG to Single-Lead ECG Mapping" Information 14, no. 7: 377. https://doi.org/10.3390/info14070377
APA StyleAbdelgaber, K. M., Salah, M., Omer, O. A., Farghal, A. E. A., & Mubarak, A. S. (2023). Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information, 14(7), 377. https://doi.org/10.3390/info14070377