We aim to improve the heart rate (HR) prediction accuracy by introducing divergence metrics with a Small Neural Network to assess the quality of PPG segments. We attempted to discover whether combining SNNs with various divergence metrics could reduce the prediction error compared to only using large ML models alone such as CorNet or U-Net. To explore that we used four different datasets: DaLia [1], IEEE SPC [3], WESAD [2], and BIDMC [4], which also contain abnormal HR patterns. We analyzed the relationship between model test error and the divergence metrics to optimize the skipping of noisy segments. Our findings demonstrate that integrating divergence metrics with SNNs reduces the Mean Absolute Error (MAE), with Total Variation (TV) Distance achieving the best results across most datasets. However, it was less effective with the BIDMC dataset, underscoring the challenges of dealing with abnormal HR patterns. Skipping segments led to lower MAE indicating that these segments were most likely noisy thus validating the approach to assess the signal quality. In conclusion, our method enhances heart rate prediction accuracy under typical conditions, further refinements are needed for abnormal cases
To install the required packages, run the following command:
pip install -r requirements.txtBefore running the scripts, please ensure that your data is in its raw format and placed in the
appropriate directories under the data folder.
The directory structure should look like this:
.
├── README.md
├── requirements.txt
├── data
│ ├── DALIA
│ │ ├── processed
│ │ ├── raw
Each dataset should be in its own directory.
For example, the raw DALIA dataset should be in the data/DALIA directory.
To run the data processing script, use the following command:
python src/model/process_data.pyThis project uses several models and methods for heart rate estimation:
-
CorNet: A convolutional neural network model used for heart rate estimation. It is trained on the PPG signal and outputs the next heart rate.
-
UNet: Another convolutional neural network model used for heart rate estimation. It is trained on the Fourier transform of the PPG signal and outputs the estimated heart rate.
-
Naive: This method uses the heart rate transition function proposed in BeliefPPG to get a probability distribution of the next heart rate
-
NN: This method uses a small neural network for heart rate estimation. It uses the last five heart rate and acceleration data to predict the probability distribution of the next heart rate.
-
NN_NO_ACC: This method is similar to the NN method, but it does not use acceleration data.
To train CorNET on the DaLia dataset, run the following command:
python src/hr_estimation.py --model CorNet --dataset DALIATo train the SNN (using acceleration data) on the DaLia dataset, run the following command:
python src/energy_saving_hr_estimation.py --method NN --dataset DALIA --trainTo run our proposed method on the DaLia dataset, run the following command:
python src/energy_saving_hr_estimation.py --method NN --model UNet --dataset DALIA --no-train-
A. Reiss, I. Indlekofer, P. Schmidt, and K. V. Laerhoven. 2019. Deep PPG: Large-scale Heart Rate Estimation with Convolutional Neural Networks. MDPI Sensors, 19(14), 2019.
-
Philip Schmidt, Attila Reiss, Robert Duerichen, Claus Marberger, and Kristof Van Laerhoven. 2018. Introducing WESAD, a multimodal dataset for Wearable Stress and Affect Detection. In 2018 International Conference on Multimodal Interaction (ICMI ’18), October 16–20, 2018, Boulder, CO, USA. ACM, New York, NY, USA, 9 pages. https://doi.org/10.1145/3242969.3242985
-
Z. Zhang, Z. Pi, B. Liu. TROIKA: A general framework for heart rate monitoring using wrist-type photoplethysmographic signals during intensive physical exercise. IEEE Transactions on Biomedical Engineering, vol. 62, no. 2, pp. 522-531, February 2015. DOI: 10.1109/TBME.2014.2359372
-
Pimentel, M.A.F. et al. Towards a Robust Estimation of Respiratory Rate from Pulse Oximeters. IEEE Transactions on Biomedical Engineering, 64(8), pp.1914-1923, 2016. DOI: 10.1109/TBME.2016.2613124 M.A.F. et al. Towards a Robust Estimation of Respiratory Rate from Pulse Oximeters. IEEE Transactions on Biomedical Engineering, 64(8), pp.1914-1923, 2016. DOI: 10.1109/TBME.2016.2613124