pyVHR: a Python framework for remote photoplethysmography

PeerJ Comput Sci. 2022 Apr 15:8:e929. doi: 10.7717/peerj-cs.929. eCollection 2022.

Abstract

Remote photoplethysmography (rPPG) aspires to automatically estimate heart rate (HR) variability from videos in realistic environments. A number of effective methods relying on data-driven, model-based and statistical approaches have emerged in the past two decades. They exhibit increasing ability to estimate the blood volume pulse (BVP) signal upon which BPMs (Beats per Minute) can be estimated. Furthermore, learning-based rPPG methods have been recently proposed. The present pyVHR framework represents a multi-stage pipeline covering the whole process for extracting and analyzing HR fluctuations. It is designed for both theoretical studies and practical applications in contexts where wearable sensors are inconvenient to use. Namely, pyVHR supports either the development, assessment and statistical analysis of novel rPPG methods, either traditional or learning-based, or simply the sound comparison of well-established methods on multiple datasets. It is built up on accelerated Python libraries for video and signal processing as well as equipped with parallel/accelerated ad-hoc procedures paving the way to online processing on a GPU. The whole accelerated process can be safely run in real-time for 30 fps HD videos with an average speedup of around 5. This paper is shaped in the form of a gentle tutorial presentation of the framework.

Keywords: Contactless monitoring; Deep rPPG; Deepfake Detection; Heart Rate Estimation; Remote photoplethysmography.

Grants and funding

This work was supported by the University of Milan through the APC initiative. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.