RhythmFormer: Extracting Patterned rPPG Signals based on Periodic Sparse Attention
Bochao Zou, Zizheng Guo, Jiansheng Chen, Junbao Zhuo, Weiran Huang, Huimin Ma
TL;DR
RhythmFormer addresses the challenge of extracting reliable rPPG signals from facial videos by exploiting the quasi-periodic nature of PPG through a novel periodic sparse attention mechanism guided by a pre-attention stage. A plug-and-play fusion stem enhances frame-level rPPG cues and steers self-attention toward weak BVP signals, enabling finer-grained feature extraction with reduced computation. The method stacks a hierarchical temporal periodic transformer with three TPT blocks and a multi-scale temporal fusion, achieving state-of-the-art results on five public datasets and transferring well across datasets. The work provides a practical, open-source baseline for rPPG with potential extension to multimodal periodic video understanding.
Abstract
Remote photoplethysmography (rPPG) is a non-contact method for detecting physiological signals based on facial videos, holding high potential in various applications. Due to the periodicity nature of rPPG signals, the long-range dependency capturing capacity of the transformer was assumed to be advantageous for such signals. However, existing methods have not conclusively demonstrated the superior performance of transformers over traditional convolutional neural networks. This may be attributed to the quadratic scaling exhibited by transformer with sequence length, resulting in coarse-grained feature extraction, which in turn affects robustness and generalization. To address that, this paper proposes a periodic sparse attention mechanism based on temporal attention sparsity induced by periodicity. A pre-attention stage is introduced before the conventional attention mechanism. This stage learns periodic patterns to filter out a large number of irrelevant attention computations, thus enabling fine-grained feature extraction. Moreover, to address the issue of fine-grained features being more susceptible to noise interference, a fusion stem is proposed to effectively guide self-attention towards rPPG features. It can be easily integrated into existing methods to enhance their performance. Extensive experiments show that the proposed method achieves state-of-the-art performance in both intra-dataset and cross-dataset evaluations. The codes are available at https://github.com/zizheng-guo/RhythmFormer.
