Deep Spatial Gradient and Temporal Depth Learning for Face Anti-spoofing

Zezheng Wang, Zitong Yu, Chenxu Zhao, Xiangyu Zhu, Yunxiao Qin, Qiusheng Zhou, Feng Zhou, Zhen Lei

Introduction

Face recognition systems have become integral to modern security, yet they remain susceptible to Presentation Attacks (PAs), such as high-resolution printed photos or video replays. Traditional "depth-supervised" methods attempt to distinguish 3D faces from flat spoofs, but often fail to capture fine-grained spatial details or the complex temporal dynamics of facial movement. This paper proposes a novel framework that leverages deep spatial gradients and temporal depth learning to achieve robust face anti-spoofing.

Methodology

The proposed architecture addresses the limitations of standard convolutional networks through three key innovations.

Residual Spatial Gradient Block (RSGB)

Standard CNNs tend to lose high-frequency spatial details as they extract high-level semantic features. The RSGB explicitly calculates spatial gradient magnitudes using the Sobel operator and integrates them back into the feature maps via shortcut connections. This ensures the model retains the subtle texture clues—such as the difference between human skin and printed paper—that are critical for spoof detection.

Comparison of spatial gradient maps for living (a) and spoofing (b) faces.

Spatio-Temporal Propagation Module (STPM)

To capture the dynamics of a face in motion, the STPM processes sequences of frames. It utilizes a Short-term Spatio-Temporal Block (STSTB) to identify local motion cues and a Convolutional Gated Recurrent Unit (ConvGRU) to track long-term depth changes. This allows the system to detect the "planar" giveaway of a replay attack, where the entire face moves as a single flat surface rather than a 3D object.

Contrastive Depth Loss (CDL)

Moving beyond standard Euclidean distance metrics, the authors introduce Contrastive Depth Loss. CDL supervises the relative topography of the face by focusing on the relationships between adjacent pixels. By learning that a nose should protrude further than a cheek, the model becomes significantly more sensitive to the inherent flatness of spoofing materials, regardless of lighting or camera distance.

The Double-modal Anti-spoofing Dataset (DMAD)

A significant contribution of this work is the introduction of the DMAD dataset. While previous research relied on mathematically estimated "pseudo-depth," DMAD utilizes a RealSense SR300 camera to capture actual 3D depth maps for 300 subjects. This high-fidelity ground truth allows for more effective training of depth-supervised models.

Results and Discussion

The model was evaluated on major benchmarks including OULU-NPU, SiW, CASIA-MFSD, and Replay-Attack. It achieved state-of-the-art (SOTA) results, notably obtaining the lowest Average Classification Error Rate (ACER) across all OULU-NPU protocols.

Furthermore, the approach demonstrates exceptional cross-database generalization. In a transfer test from CASIA-MFSD to Replay-Attack, the method achieved a Half Total Error Rate (HTER) of 17.0%, a substantial improvement over the previous best of 27.6%. Experiments on the DMAD dataset confirmed that training with real depth data (4.55% ACER) significantly outperforms training with pseudo-depth (6.33% ACER).

Conclusion

By integrating fine-grained spatial gradients with temporal depth dynamics, this research provides a powerful defense against common face spoofing attacks. Future work may involve incorporating additional modalities, such as remote photoplethysmography (rPPG), to further enhance system security.

Summary updated

BibTeX
@inproceedings{wang2020deep,
  author = {Zezheng Wang and Zitong Yu and Chenxu Zhao and Xiangyu Zhu and Yunxiao Qin and Qiusheng Zhou and Feng Zhou and Zhen Lei},
  title = {{Deep Spatial Gradient and Temporal Depth Learning for Face Anti-spoofing}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00509},
}
Figure