Currently, the package supports PPG preprocessing and extraction of more than 400 features. The PPG pipeline was originally implemented for analysis of the AuroraBP database.
It provides:
- PPG preprocessing: Singal quality metrics, baseline extraction, etc.
- PPG feature extraction: time-domain, frequency-domain, statistical features ( >400 features)
- Compatibility with PPG recorded from 128 Hz to 500 Hz: tested with local devices and large datasets.
VitalPy is written in Python (3.9+). Navigate to the Python repository and install the required packages:
pip install -r requirements.txt
Import:
from src.ppg.PPGSignal import PPGSignal
Check the signal (make sure that the file waveform_df is in dataframe format and contains the columns 't' for time and 'ppg' for the signal values):
signal = PPGSignal(waveform_df, verbose=1)
signal.check_keypoints()
Get features:
signal = PPGSignal(waveform_df, verbose=0)
features = signal.extract_features()
Used file: measurements_oscillometric/o001/o001.initial.Sitting_arm_down.tsv
The following figure shows the mean template computed from all templates within the signal given as input.
![](https://private-user-images.githubusercontent.com/33239037/263743623-9ede79d8-2613-47b6-a1ca-b5247c417cfc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNDc3MDgsIm5iZiI6MTcyMDM0NzQwOCwicGF0aCI6Ii8zMzIzOTAzNy8yNjM3NDM2MjMtOWVkZTc5ZDgtMjYxMy00N2I2LWExY2EtYjUyNDdjNDE3Y2ZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDEwMTY0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwYzdmMjcxM2MzYjkwM2U1YmY1MmY3OTY1MDFhNWRlNjY1YWJlNzQxZDA3NzdkMmQ2ZTQ3OTQwNWU3NjE5ZDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1l3wMFBySqrJbN1beLcTRYnlYf17SZvaTWQXuB35KkE)
All preprocessing steps are depicted. The final result should have filtered out all low quality waveforms.
![](https://private-user-images.githubusercontent.com/33239037/263743859-ecc0a2ea-b4e8-4f67-a4b2-05232de1f81c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNDc3MDgsIm5iZiI6MTcyMDM0NzQwOCwicGF0aCI6Ii8zMzIzOTAzNy8yNjM3NDM4NTktZWNjMGEyZWEtYjRlOC00ZjY3LWE0YjItMDUyMzJkZTFmODFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDEwMTY0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZkZWZlYzA1MWZmZTM1ZWVlYTFkNzQxZTM1Y2QyMjk5ZmUyNTk5MTY2YWQ5N2ZiYzJmNjY2YzE4NTkxYTFhZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-Of0nQKR6na0UCAxUMYaInV6ea1cCSfqnIgjKN9ykzE)
Exemplary PPG keypoint extraction.
![](https://private-user-images.githubusercontent.com/33239037/263744016-93e17375-e5c3-44a3-a437-63aa9bbb2262.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNDc3MDgsIm5iZiI6MTcyMDM0NzQwOCwicGF0aCI6Ii8zMzIzOTAzNy8yNjM3NDQwMTYtOTNlMTczNzUtZTVjMy00NGEzLWE0MzctNjNhYTliYmIyMjYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDEwMTY0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhYWRhNmQyZjcwMjZhNTgyYmQ1Y2M2NzY4MWUxYjU2ZjZkZjUxN2JkOTRkNTY5MTZiMmQwNWVlNWJiZmI2ZGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.m7g8BojhhR_2hBXSlWn5uyHVF8crZe-K3dI6QBXdRUk)
VitalPy is available under the General Public License v3.0.
If you use this repository or any of its components and/or our paper as part of your research, please cite the publication as follows:
A. Cisnal, Y. Li, B. Fuchs, M. Ejtehadi, R. Riener and D. Paez-Granados, "Robust Feature Selection for BP Estimation in Multiple Populations: Towards Cuffless Ambulatory BP Monitoring," in IEEE Journal of Biomedical and Health Informatics, doi: 10.1109/JBHI.2024.3411693.
@ARTICLE{10552318,
author={Cisnal, Ana and Li, Yanke and Fuchs, Bertram and Ejtehadi, Mehdi and Riener, Robert and Paez-Granados, Diego},
journal={IEEE Journal of Biomedical and Health Informatics},
title={Robust Feature Selection for BP Estimation in Multiple Populations: Towards Cuffless Ambulatory BP Monitoring},
year={2024},
volume={},
number={},
pages={1-12},
keywords={Feature extraction;Estimation;Statistics;Sociology;Noise;Morphology;Monitoring;Cuffless blood pressure;photoplethysmography;pulse wave analysis},
doi={10.1109/JBHI.2024.3411693}}