Flow-Attention-based Spatio-Temporal Aggregation Network for 3D Mask Detection

Yuxin Cao, Yian Li, Yumeng Zhu, Derui Wang, Minhui Xue

Abstract

Face recognition systems are increasingly vulnerable to sophisticated 3D mask presentation attacks that mimic human facial geometry and texture. Traditional defense mechanisms often struggle with the high computational costs of remote photoplethysmography (rPPG) or the limited context of spatial-only analysis. This paper introduces the Flow-Attention-based Spatio-Temporal aggrEgation Network (FASTEN), a lightweight framework designed for high-performance 3D mask detection. FASTEN utilizes a specialized facial optical flow network (FlowNetFace) and an attention mechanism that prioritizes frames with significant movement, such as blinking. By aggregating features across only five RGB frames, FASTEN achieves state-of-the-art accuracy—including a 99.8% AUC on the HiFiMask dataset—while maintaining the efficiency required for real-world mobile deployment.

1. Introduction

As face recognition technology becomes ubiquitous in secure authentication, the threat of "presentation attacks" has evolved. While 2D attacks like printed photos or video replays are well-studied, 3D masks made of silicone, resin, or plaster present a more formidable challenge. These masks closely replicate the three-dimensional structure of a human face, often bypassing traditional spatial-based detectors.

Current defensive strategies generally fall into two categories: spatial-only methods and rPPG-based temporal methods. Spatial methods often fail to detect subtle "splicing traces" or unnatural textures that only appear during motion. Conversely, rPPG methods, which detect pulse-induced color changes, require long video sequences (25–30 frames) and high computational power, making them unsuitable for low-latency mobile applications. FASTEN addresses these limitations by providing a fast, robust, and RGB-only solution that operates on minimal temporal data.

2. The FASTEN Architecture

The FASTEN framework is built upon three primary components designed to balance detection accuracy with computational efficiency.

2.1 FlowNetFace

To capture the minute deformations of human skin and muscle, the authors developed FlowNetFace. This is a streamlined version of the FlowNetS architecture, specifically optimized for facial regions. Unlike general-purpose optical flow models, FlowNetFace focuses on the subtle movements that distinguish a living face from a rigid or semi-rigid 3D mask.

2.2 Flow Attention Mechanism

A key insight of this research is that not all frames in a video sequence are equally informative. Mask artifacts are most visible during active movements, such as eye blinks or mouth openings. FASTEN employs a Flow Attention mechanism that uses optical flow to calculate attention scores for each frame. By assigning higher weights to frames with significant motion, the network focuses its learning on the moments where the "unnatural" characteristics of a mask are most likely to be exposed.

2.3 Spatio-Temporal Aggregation

The model utilizes a MobileNetV3 backbone to extract high-level spatial features related to texture and structure. These are then combined with temporal transition features derived from the optical flow. This hybrid approach ensures that the system catches both static indicators (e.g., plaster texture) and dynamic indicators (e.g., rigid movement of a mask surface).

3. Experimental Evaluation

3.1 Datasets

FASTEN was evaluated on three diverse benchmarks to test its robustness:

  • 3DMAD: A baseline dataset consisting of 255 videos of 17 subjects.
  • HKBU-MARs V1+: A dataset featuring 180 videos with significant variations in lighting and mask materials.
  • HiFiMask: A large-scale, challenging dataset with over 54,000 high-resolution videos, featuring three different mask materials (plaster, resin, and transparent) across various lighting and motion scenarios.

3.2 Performance Results

FASTEN demonstrated superior performance compared to eight leading competitors, including CDCN++ and various rPPG-based models. On the HiFiMask dataset, the model achieved an Area Under the Curve (AUC) of 99.8%. On the 3DMAD dataset, it maintained a Half Total Error Rate (HTER) as low as 1.17%.

3.3 Efficiency and Deployment

Efficiency is a core strength of the FASTEN framework. The model achieves high accuracy using only five frames, whereas previous state-of-the-art methods required significantly more data. The average inference time is 25.3ms, which is nearly ten times faster than models like HRFP (286.5ms). The authors successfully deployed the model on mobile devices (Samsung S8 and Xiaomi 8), where it occupied less than 14MB of memory and delivered a total response time of approximately 879ms, including preprocessing.

4. Conclusion and Future Work

FASTEN represents a significant advancement in 3D mask detection by proving that sparse temporal data (5 frames) combined with motion-based attention is sufficient for high-fidelity spoof detection. By relying solely on RGB input, it eliminates the need for specialized hardware like depth or infrared sensors.

Future research will focus on refining the attention mechanism to operate at a sub-frame level, targeting specific regions like the eye contours where mask edges are most prominent. Additionally, the authors aim to extend these temporal features to address 2D deepfake and replay attacks while continuing to improve fairness across diverse demographic groups.

Summary updated

BibTeX
@inproceedings{cao2023flow,
  author = {Yuxin Cao and Yian Li and Yumeng Zhu and Derui Wang and Minhui Xue},
  title = {{Flow-Attention-based Spatio-Temporal Aggregation Network for 3D Mask Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=pvSKVt3EsM},
}
Figure