计算机与现代化 ›› 2025, Vol. 0 ›› Issue (07): 1-8.doi: 10.3969/j.issn.1006-2475.2025.07.001

• 图像处理 •    下一篇

基于领域生成和对比学习的人脸活体检测

  

  1. (1. 延安大学物理与电子信息学院,陕西 延安 716000; 2. 西安工业大学电子信息工程学院,陕西 西安 710021)
  • 出版日期:2025-07-22 发布日期:2025-07-22
  • 作者简介: 作者简介:张山鹿(2003—),男,陕西渭南人,本科生,研究方向:计算机视觉,模式识别,E-mail: 1969654183@qq.com; 张伟(1999—),男,陕西榆林人,硕士,研究方向:深度学习,图像处理,E-mail: 2369698566@qq.com。
  • 基金资助:
    基金项目:西安工业大学研究生创新实践项目(2022030615)

Face Anti-spoofing Based on Domain Synthesis and Contrastive Learning

  1. (1. School of Physics and Electronic Information, Yan’an University, Yan’an 716000, China; 
    2. School of Electronic Information Engineering, Xi’an Technological University, Xi’an 710021, China)
  • Online:2025-07-22 Published:2025-07-22

摘要: 摘要:人脸活体检测是保障人脸识别系统安全性的重要手段。现有的人脸活体检测方法在跨数据集测试场景下泛化性较差,导致性能急剧下降。针对这一问题,本文提出一种基于领域生成和对比学习的人脸活体检测方法。本文方法主要包含2个新颖的模块:源域生成模块和对比学习模块。前者首先在图像级将不同源域中人脸图像的局部区域进行随机交换以生成伪源域样本;然后,将上述人脸图像在特征级进行重组,即交换图像级重构对应位置的局部特征。通过最大化重构样本的特征和重组特征的相似性,该模块能够在扩充样本数量和攻击类型的同时,确保所生成的伪源域的稳定性,为本文方法学习泛化的特征空间提供良好的数据基础。后者则最小化真实人脸表示的类内距离,并在最大化真实人脸和欺骗人脸的类间距离的同时,最大化真实人脸和重构样本的类间距离,有效促进真实人脸表示的类内紧凑,确保本文方法能够学习良好的决策曲线。将本文方法在4个公开的人脸活体检测数据集CASIA-FASD、Replay-Attack、MSU-MFSD和OULU-NPU上进行训练和测试,实验结果表明在跨数据集测试场景下具备良好的泛化性能。





关键词: 关键词:人脸活体检测, 伪源域, 对比学习, 领域泛化

Abstract: Abstract: Face anti-spoofing (FAS) is an important mean to guarantee the security of face recognition systems. Existing FAS methods have poor generalization in cross-dataset testing scenarios, which leads to a drastic performance degradation. To this way, this paper proposes a FAS method based on domain synthesis and contrastive learning. The proposed method mainly contains two novel modules: domain synthesis module and contrastive learning module. The former randomly swaps local regions of face images in different source domains at the image level to generate pseudo-source domain samples. Then, the above face images are reconstructed at the feature-level by exchanging the local features of the corresponding positions reconstructed at the image-level. By maximizing the similarity of the reconstructed sample’s features and the reconstructed features, this module can ensure the stability of the generated pseudo source domain while expanding the number of samples and attack types. This provides a solid data foundation for the proposed method to learn generalized feature spaces. The later minimizes the intra-class distance of the real face representation and maximizes the inter-class distance between the real face and spoof faces. Meanwhile, this module maximizes the inter-class distance between the real face and the reconstructed samples. This process effectively promotes intra-class compactness of the real face and ensures that the proposed method can learn a good decision curve. The proposed method is trained and tested on four publicly available face live detection datasets CASIA-FASD, Replay-Attack, MSU-MFSD, and OULU-NPU, and the experimental results show that the proposed method has a good generalization performance in cross-dataset testing scenarios.

Key words: Key words: face anti-spoofing, pseudo source domain, contrastive learning, domain generalization

中图分类号: