Contrast-Phys: Unsupervised Video-Based Remote Physiological Measurement via Spatiotemporal Contrast

Zhaodong Sun, Xiaobai LiECCV 2022

Abstract

Remote photoplethysmography (rPPG) enables non-contact heart rate monitoring from face videos by detecting minute skin color changes. While deep learning has advanced this field, most high-performing models rely on expensive supervised datasets with synchronized medical-grade ground truth. We present Contrast-Phys, a novel unsupervised framework that leverages spatiotemporal contrastive learning. By enforcing consistency across different facial regions and time windows, the model learns to extract pulse signals without any physiological labels. Contrast-Phys achieves performance comparable to supervised state-of-the-art methods while offering significant improvements in computational efficiency and robustness to environmental noise.

Introduction

Remote physiological measurement (rPPG) is a non-invasive technique that uses standard cameras to monitor blood volume pulses. Despite the progress in supervised deep learning models, the field faces challenges in data collection, as acquiring synchronized face videos and medical-grade signals (like ECG) is intrusive and difficult to scale. Existing unsupervised methods often struggle with a significant performance gap compared to supervised models and are highly sensitive to external periodic noises, such as flickering lights. Contrast-Phys addresses these issues by treating rPPG as a self-supervised contrastive learning problem, utilizing the inherent spatiotemporal redundancy of physiological signals across the human face.

Methodology

The core principle of Contrast-Phys is that a person's heart rate should remain consistent regardless of which part of the face is observed or which short time window is sampled.

Framework Architecture

The model employs a 3D Convolutional Neural Network (3DCNN) backbone, based on PhysNet, to process video clips. Instead of immediately collapsing spatial data into a single 1D signal, the network outputs a Spatiotemporal rPPG (ST-rPPG) block. This block represents a grid of signals ($S \times S$) across the spatial dimensions of the face over time, allowing the model to analyze local variations before global aggregation.

Overview of the Contrast-Phys framework, illustrating the pipeline from face video input to the contrastive loss calculation.

Spatiotemporal Contrastive Learning

During training, the system performs spatiotemporal sampling to create positive and negative pairs:

  1. Spatial Consistency: Multiple rPPG clips are sampled from different spatial locations (e.g., forehead vs. cheek). Since these originate from the same subject, their underlying heart rate frequency must be identical.
  2. Temporal Consistency: Clips are sampled from different time offsets within the same video, assuming the heart rate remains stable over short intervals (10–30 seconds).
Consistency of rPPG signals and their corresponding Power Spectrum Densities (PSDs) across different facial regions (A, B, C, D).

Frequency Domain Optimization

Contrast-Phys calculates its loss on the Power Spectrum Density (PSD) rather than raw time-domain waveforms. This makes the model invariant to phase shifts—slight timing differences in blood flow reaching different parts of the face—and focuses purely on the heart rate frequency. The loss function also incorporates a frequency constraint (40 to 250 bpm) to filter out non-biological frequencies, further enhancing signal purity.

Results and Evaluation

The model was evaluated on five diverse public datasets, including PURE, UBFC-rPPG, and MR-NIRP (Near-Infrared), proving its versatility across different lighting conditions and camera types.

  • State-of-the-Art Accuracy: On the UBFC-rPPG dataset, Contrast-Phys achieved a Mean Absolute Error (MAE) of 0.64 bpm, a massive improvement over previous unsupervised baselines (1.85 bpm) and very close to the best supervised models (0.44 bpm).
  • Superior Efficiency: The model operates at 802.45 frames per second (fps), roughly double the speed of previous unsupervised methods, because it requires only a single forward pass of the video.
  • Noise Robustness: In experiments where periodic noise was manually injected to simulate flickering lights, Contrast-Phys remained accurate. Because external noise typically does not satisfy the "spatiotemporal similarity" of a biological pulse, the model naturally learns to ignore it.
  • Generalization: When tested on the MMSE-HR dataset (featuring spontaneous expressions and motion), Contrast-Phys outperformed other methods, indicating it learns general physiological features rather than dataset-specific artifacts.

Conclusion

Contrast-Phys represents a significant advancement in unsupervised rPPG, effectively closing the performance gap with supervised models while offering superior speed and noise rejection. By utilizing the face's own spatial redundancy as a supervisory signal, it eliminates the need for costly ground-truth labels. Future work will focus on improving the model's ability to handle rapid heart rate transitions and extreme physical activity where motion artifacts are most severe.

Summary updated

BibTeX
@inproceedings{sun2022contrast,
  author = {Zhaodong Sun and Xiaobai Li},
  title = {{Contrast-Phys: Unsupervised Video-Based Remote Physiological Measurement via Spatiotemporal Contrast}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19775-8\_29},
}
Figure