Face Anti-Spoofing (FAS) is pivotal in safeguarding facial recognition systems against presentation attacks. While domain generalization (DG) methods have been developed to enhance FAS performance, they predominantly focus on learning domain-invariant features during training, which may not guarantee generalizability to unseen data that differs largely from the source distributions. Our insight is that testing data can serve as a valuable resource to enhance the generalizability beyond mere evaluation for DG FAS. In this paper, we introduce a novel Test-Time Domain Generalization (TTDG) framework for FAS, which leverages the testing data to boost the model's generalizability. Our method, consisting of Test-Time Style Projection (TTSP) and Diverse Style Shifts Simulation (DSSS), effectively projects the unseen data to the seen domain space. In particular, we first introduce the innovative TTSP to project the styles of the arbitrarily unseen samples of the testing distribution to the known source space of the training distributions. We then design the efficient DSSS to synthesize diverse style shifts via learnable style bases with two specifically designed losses in a hyperspherical feature space. Our method eliminates the need for model updates at the test time and can be seamlessly integrated into not only the CNN but also ViT backbones. Comprehensive experiments on widely used cross-domain FAS benchmarks demonstrate our method's state-of-the-art performance and effectiveness.
翻译:人脸防欺骗(FAS)在保护面部识别系统免受呈现攻击中至关重要。尽管域泛化(DG)方法已被开发用于提升FAS性能,但它们主要侧重于在训练过程中学习域不变特征,这无法确保对与源分布差异巨大的未见数据具有泛化能力。我们意识到,测试数据可作为宝贵资源,用于增强DG FAS的泛化能力,而不仅限于评估。本文提出了一种新颖的测试时域泛化(TTDG)框架用于FAS,该框架利用测试数据提升模型的泛化能力。我们的方法由测试时风格投影(TTSP)和多样风格偏移模拟(DSSS)组成,能有效将未见数据投影至可见域空间。特别地,我们首先引入创新的TTSP,将测试分布中任意未见样本的风格投影至训练分布的已知源空间;随后设计高效的DSSS,通过可学习风格基与超球面特征空间中两个专门设计的损失函数合成多样风格偏移。该方法无需在测试时更新模型,并可无缝集成至CNN及ViT骨干网络。在广泛使用的跨域FAS基准上的综合实验表明,我们的方法达到了最先进的性能与有效性。