This repository contains the source codes related to a deep learning model dedicated to the conversion of imaging PPG signals (computed from video) into BP signals (measured by a continuous non-invasive sensor). The technique has been evaluated on BP4D+.
If you find this code useful or use it in an academic or research project, please cite it as:
Frédéric Bousefsaf et al., Estimation of blood pressure waveform from facial video using a deep U-shaped network and the wavelet representation of imaging photoplethysmographic signals, Biomedical Signal Processing and Control, 2022.
You can also visit my website for additional information.
Please refer to the original publication to get all the details. We propose to convert imaging photoplethysmographic (iPPG) to blood pressure (BP) signals using their continuous wavelet transforms (CWT). The real and imaginary parts of the CWT are passed to a deep pre-trained (ResNeXt101) U-shaped architecture.
Deep learning models have been developed and learned through Tensorflow+Keras frameworks (2.3.4) over Python 3.8 . Results were analyzed with MATLAB R2020b.
Different packages must be installed to properly run the codes :
pip install tensorflow
(ortensorflow-gpu
)pip install opencv-python
pip install matplotlib
pip install scipy
pip install scikit-learn
pip install segmentation-models
BP4D+ is available here.
We carried out a manual selection of proper iPPG and BP signals. The selected samples are detailed in the file BP4D_selected_participants.txt
.
Training
train.py
includes all the training procedure.
The input, data_training.mat
(and data_validation.mat
), corresponds to a collection of continuous wavelet representation (size: 256×256) of iPPG and ground truth BP signals (not supplied here). signal_to_cwt.py
is the MATLAB procedure dedicated to the conversion of a raw iPPG signal to its wavelet representation. Note that the mean pressure must be added to the CWT of (ground-truth and predicted) BP signals before computing the inverse wavelet transform. You can use this following MATLAB command:
CWT.cfs = CWT.cfs + (CWT.meanSIG + 1i*CWT.meanSIG);
Prediction
The trained architecture (U-Net supported by a ResNeXt101 backbone) is available on Zenodo. You can test this model on some freely available excerpts.
predict.py
will output a .mat
file that can be analyzed with MATLAB.