Abstract
Face anti-spoofing (FAS) aims to defend face recognition systems from various presentation attacks. To deal with cross-domain testing scenarios, many FAS methods adopted domain generalization or domain adaptation approaches by using all the available source domain data to adapt the model in the offline training stage. However, as there exist ever-growing and ever-evolving attacks, attempting to simulate unseen attacks by offline adaptation techniques is extremely difficult if not impossible. Test-Time Adaptation (TTA), which focuses on on-line adapting an off-the-shelf model to unlabeled target data without referring to any source data, has been successfully adopted in image classification but is still unexplored in FAS methods. In this paper, our goal is to address the TTA issues for robust face anti-spoofing. We first propose a novel TTA benchmark covering different domains and various attacks to simulate the challenges of FAS when facing new domain data and unseen attacks. Next, we develop a novel framework 3A-TTA, including three main components: activation-based pseudo-labeling, anti-forgetting feature learning, and asymmetric prototype contrastive learning to tackle the issues of TTA in FAS. Our extensive experiments on the proposed benchmark show that the proposed 3A-TTA achieves superior performance for on-line detecting both seen and unseen types of face presentation attacks from new domains.