CFPL-FAS: Class Free Prompt Learning for Generalizable Face Anti-spoofing

Domain generalization (DG) based Face Anti-Spoofing (FAS) aims to improve themodel’s performance on unseen domains. Existing methods either rely on domainlabels to align domain-invariant feature spaces, or disentangle generalizablefeatures from the whole sample, which inevitably lead to the distortion ofsemantic feature structures and achieve limited generalization. In this work,we make use of large-scale VLMs like CLIP and leverage the textual feature todynamically adjust the classifier’s weights for exploring generalizable visualfeatures. Specifically, we propose a novel Class Free Prompt Learning (CFPL)paradigm for DG FAS, which utilizes two lightweight transformers, namelyContent Q-Former (CQF) and Style Q-Former (SQF), to learn the differentsemantic prompts conditioned on content and style features by using a set oflearnable query vectors, respectively. Thus, the generalizable prompt can belearned by two improvements: (1) A Prompt-Text Matched (PTM) supervision isintroduced to ensure CQF learns visual representation that is most informativeof the content description. (2) A Diversified Style Prompt (DSP) technology isproposed to diversify the learning of style prompts by mixing featurestatistics between instance-specific styles. Finally, the learned text featuresmodulate visual features to generalization through the designed PromptModulation (PM). Extensive experiments show that the CFPL is effective andoutperforms the state-of-the-art methods on several cross-domain datasets.

Further reading