Abstract
Unsupervised domain adaptation-based face anti-spoofing methods have attracted more and more attention due to their promising generalization abilities. To mitigate domain bias, existing methods generally attempt to align the marginal distributions of samples from source and target domains. However, the label and pseudo-label information of the samples from source and target domains are ignored. To solve this problem, this paper proposes a Weighted Joint Distribution Optimal Transport unsupervised multi-source domain adaptation method for cross-scenario face anti-spoofing (WJDOT-FAS). WJDOT-FAS consists of three modules: joint distribution estimation, joint distribution optimal transport, and domain weight optimization. Specifically, the joint distributions of the features and pseudo labels of multi-source and target domains are firstly estimated based on a pre-trained feature extractor and a randomly initialized classifier. Then, we compute the cost matrices and the optimal transportation mappings from the joint distributions related to each source domain and the target domain by solving Lp-L1 optimal transport problems. Finally, based on the loss functions of different source domains, the target domain, and the optimal transportation losses from each source domain to the target domain, we can estimate the weights of each source domain, and meanwhile, the parameters of the feature extractor and classifier are also updated. All the learnable parameters and the computations of the three modules are updated alternatively. Extensive experimental results on four widely used 2D attack datasets and three recently published 3D attack datasets under both single- and multi-source domain adaptation settings (including both close-set and open-set) show the advantages of our proposed method for cross-scenario face anti-spoofing.
Similar content being viewed by others
Data Availability
Experimental data from seven datasets: CASIA-FASD (Zhang et al., 2012), Idiap Replay-Attack (Chingovska et al., 2012), MSU-MFSD (Wen et al., 2015), OULU-NPU (Boulkenafet et al., 2017), CASIA-SURF 3DMask (Yu et al., 2020), CASIA-SURF HiFiMask (Liu et al., 2022) and Surveillance High-Fidelity Mask (Fang et al., 2024). The data that support the findings of this study are available from third-party institutions (including Idiap Research Institute, Michigan State University, Chinese Academy of Sciences, and University of Oulu) but restrictions apply to the availability of these data, which were used under license for the current study. Data are however available from the authors upon reasonable request and with permission of the above-mentioned third-party institutions.
References
Sun, B., & Saenko, K. (2016). Deep coral: Correlation alignment for deep domain adaptation. In Computer Vision-(ECCV), Amsterdam (pp. 443–450). Springer.
Boulkenafet, Z., Komulainen, J., Li, L., Feng, X., & Hadid, A. (2017). OULU-NPU: A mobile face presentation attack database with real-world variations. In 2017 12th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2017) (pp. 612–618). IEEE.
Cédric V. (2008). Optimal transport: Old and new (Grundlehren der mathematischen Wissenschaften). Springer.
Chen, Z., Yao, T., Sheng, K., Ding, S., Tai, Y., Li, J., Huang, F., & Jin, X. (2021). Generalizable representation learning for mixture domain face anti-spoofing. In Proceedings of the AAAI Conference on Artificial Intelligence.
Chingovska, I., Anjos, A., & Marcel, S. (2012). On the effectiveness of local binary patterns in face anti-spoofing.2012 BIOSIG-Proceedings of the International Conference of Biometrics Special Interest Group (BIOSIG) (pp. 1–7).
Courty, N., Flamary, R., & Tuia, D. (2014). Domain adaptation with regularized optimal transport. In Proc. Eur. Conf. Mach. Learn. Principles Practice Knowl. Discovery Databases (pp. 1–16).
Nicolas, C., Remi, F., Devis, T., & Alain, R. (2016). Optimal transport for domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(9), 1853–1865.
Courty, N., Flamary, R., Habrard, A., & Rakotomamonjy, A. (2017). Joint distribution optimal transportation for domain adaptation. In Advances in neural information processing systems (Vol. 30).
Cuturi, M. (2013). Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in neural information processing systems (Vol. 26, pp. 2292–2300). Curran Associates, Inc.
Cuturi, M., & Doucet, A. (2014). Fast computation of wasserstein barycenters. In International Conference on Machine Learning, PMLR (pp. 685–693).
Damodaran, B. B., Kellenberger, B., Flamary, R., Tuia, D., & Courty, N. (2018). Deepjdot: Deep joint distribution optimal transport for unsupervised domain adaptation. In Proceedings of the European Conference on Computer Vision (ECCV) (pp. 447–463).
Duchi, J., Hazan, E., & Singer, Y. (2011). Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12, 2121–2159.
Fang, H., Liu, A. J., Wan, J., et al. (2024). Surveillance face anti-spoofing. IEEE Transactions on Information Forensics and Security, 19, 1535–1546.
Ghifary, M., Kleijn, W. B., Zhang, M., Balduzzi, D., & Li, W. (2016). Deep reconstruction-classification networks for unsupervised domain adaptation. Computer Vision-(ECCV), Amsterdam, The Netherlands (pp. 597–613). Springer
He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 770–778).
He, Y., Carass, A., Zuo, L., Dewey, B. E. & Prince, J. L. (2020). Self domain adapted network. In International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI).
Hu, L., Kan, M., Shan, S., & Chen, X. (2018). Duplex generative adversarial network for unsupervised domain adaptation. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 1498–1507).
Jia, Y., Zhang, J., Shan, S. & Chen, X. (2020). Single-side domain generalization for face anti-spoofing. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 8484–8493).
Jia, Y., Zhang, J., Shan, S., & Chen, X. (2021). Unified unsupervised and semi-supervised domain adaptation network for cross-scenario face anti-spoofing. Pattern Recognition, 115, 107888.
Jiang, F., Li, Q., Liu, P., Zhou, X. D., & Sun, Z. (2023). Adversarial learning domain-invariant conditional features for robust face anti-spoofing. International Journal of Computer Vision 1–24.
Hoffman, J., Mohri, M., & Zhang, N. (2018). Algorithms and theory for multiplesource adaptation. In Advances in neural information processing systems (pp. 8246–8256).
Kang, G., Jiang, L., Wei, Y., et al. (2020). Contrastive adaptation network for single-and multi-source domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(4), 1793–1804.
Kantorovich, L. V. (2006). On the translocation of masses. Journal of Mathematical Sciences, 133(4), 1381–1382.
Khammari, M. (2019). Robust face anti-spoofing using CNN with LBP and WLD. IET Image Processing, 13, 1880–1884.
Kingma, D. P. & Ba, J. (2014). Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980
Komulainen, J., Hadid, A., & Pietikäinen, M. (2013). Context based face anti-spoofing. In IEEE Sixth International Conference on Biometrics (pp. 1–8).
Li, H., Li, W., Cao, H., Wang, S., Huang, F., & Kot, A. C. (2018). Unsupervised domain adaptation for face anti-spoofing. IEEE Transactions on Information Forensics and Security, 13(7), 1794–1809.
Li, Y., Wang, N., Shi, J., Hou, X., & Liu, J. (2018). Adaptive batch normalization for oractical domain adaptation. Pattern Recognition (PR), 80, 109–117.
Li, K., Lu, J., Zuo, H., & Zhang, G. (2021). Multi-source contribution learning for domain adaptation. IEEE Transactions on Neural Networks and Learning Systems, 33(10), 5293–5307.
Li, Z., Cai, R., Li, H., Lam, K. Y., Hu, Y., & Kot, A. C. (2022). One-class knowledge distillation for face presentation attack detection. IEEE Transactions on Information Forensics and Security, 17, 2137–2150.
Liang, J., Hu, D. & Feng, J. (2020). Do we really need to access the source data? Source hypothesis transfer for unsupervised domain adaptation. In International Conference on Machine Learning (ICML), PMLR (pp. 6028–6039).
Liu, Y., Jourabloo, A., & Liu, X. (2018). Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition (CVPR) (pp. 389–398).
Liu, A., Tan, Z., Wan, J., Escalera, S., Guo, G., & Li, S. Z. (2021). Casia-surf cefa: A benchmark for multi-modal cross-ethnicity face anti-spoofing. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (pp. 1179–1187).
Liu, Y., Chen, Y., Dai, W., Gou, M., Huang, C. T., & Xiong, H. (2022). Source-free domain adaptation with contrastive domain alignment and self-supervised exploration for face anti-spoofing. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel (pp. 511–528). Springer.
Liu, S., Lu, S., Xu, H., Yang, J., Ding, S., & Ma, L. (2022). Feature generation and hypothesis verification for reliable face anti-spoofing. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 36, pp. 1782–1791).
Liu, Y., Chen, Y., Dai, W., Li, C., Zou, J., & Xiong, H. (2022). Causal intervention for generalizable face anti-spoofing. In ICME (pp. 1–6). IEEE.
Liu, A., Zhao, C., Yu, Z., et al. (2022). Contrastive context-aware learning for 3d high-fidelity mask face presentation attack detection. IEEE Transactions on Information Forensics and Security, 17, 2497–2507.
Sun, Y., Liu, Y., Liu, X., Li, Y., & Chu, W. S. (2023). Rethinking domain generalization for face anti-spoofing: Separability and alignment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 24563–24574).
Long, X., Zhang, J., Wu, S., Jin, X., & Shan, S. (2023). Dual sampling based causal intervention for face anti-spoofing with identity debiasing. IEEE Transactions on Information Forensics and Security (TIFS). https://doi.org/10.1109/TIFS.2023.3326370
Lv, L., Xiang, Y., Li, X., Huang, H., Ruan, R., Xu, X. & Fu, Y. (2021). Combining dynamic image and prediction ensemble for cross-domain face anti-spoofing. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) (pp. 2550–2554).
Maaten, L. V. D., & Hinton, G. (2008). Visualizing data using t-SNE. Journal of Machine Learning Research (JLMR), 9, 2579–2605.
Patel, K., Han, H., & Jain, A. K. (2016). Secure face unlock: Spoof detection on smartphones. IEEE Transactions on Information Forensics and Security, 11(10), 2268–2283.
Pei, Z., Cao, Z., Long, M., & Wang, J. (2018). Multi-adversarial domain adaptation. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 32).
Peng, X., Bai, Q., Xia, X., Huang, Z., Saenko, K., & Wang, B. (2019). Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (pp. 1406–1415).
Quan, R., Wu, Y., Yu, X., & Yang, Y. (2021). Progressive transfer learning for face antispoofing. IEEE Transactions on Image Processing, 30(3), 3946–3955.
Rahman, M. M., Fookes, C., Baktashmotlagh, M., & Sridharan, S. (2020). On minimum discrepancy estimation for deep domain adaptation. In Domain adaptation for visual understanding(pp. 81–94). Springer.
Rehman, Y. A. U., Po, L. M., & Komulainen, J. (2020). Enhancing deep discriminative feature maps via perturbation for face presentation attack detection. Image and Vision Computing, 94, 103858.
Saad, D. (1998). Online algorithms and stochastic approximations. Online Learning, 5(3), 6.
Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., & J’egou, H. (2021). Training data-efficient image transformers & distillation through attention. In ICML, PMLR (pp. 10347–10357).
Turrisi, R., Flamary, R., Rakotomamonjy, A., & Pontil, M. (2022). Multi-source domain adaptation via weighted joint distributions optimal transport. In Uncertainty in Artificial Intelligence. PMLR (pp. 1970–1980).
Tzeng, E., Hoffman, J., Saenko, K., & Darrell, T. (2017). Adversarial discriminative domain adaptation. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 7167–7176).
Wang, G., Han, H., Shan, S. & Chen, X. (2020). Cross-domain face presentation attack detection via multi-domain disentangled representation learning. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 6678–6687).
Wang, G., Han, H., Shan, S., & Chen, X. (2019). Improving cross-database face presentation attack detection via adversarial domain adaptation. In ICB. IEEE.
Wang, D., Shelhamer, E., Liu, S., Olshausen, B., & Darrell, T. (2020). Tent: Fully test-time adaptation by entropy minimization. arXiv:2006.10726
Wang, G., Han, H., Shan, S., & Chen, X. (2021). Unsupervised adversarial domain adaptation for cross-domain face presentation attack detection. IEEE Transactions on Information Forensics and Security, 16, 56–69.
Wang, J., Zhang, J., Bian, Y., Cai, Y., Wang, C., & Pu, S. (2021). Self-domain adaptation for face anti-spoofing. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI) (Vol. 35, pp. 2746–2754).
Wang, Z., Wang, Z., Yu, Z., Deng, W., Li, J., Gao, T., & Wang, Z. (2022). Domain generalization via shuffled style assembly for face anti-spoofing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 4123–4133).
Wang, C. Y., Lu, Y. D., Yang, S. T., & Lai, S. H. (2022). Patchnet: A simple face anti-spoofing framework via fine-grained patch recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 20281–20290).
Wang, Z., Yu, Z., Wang, X., Qin, Y., Li, J., Zhao, C., Liu, X., & Lei, Z. (2023). Consistency regularization for deep face anti-spoofing. IEEE Transactions on Information Forensics and Security, 8, 1127–1140.
Wen, D., Han, H., & Jain, A. K. (2015). Face spoof detection with image distortion analysis. IEEE Transactions on Information Forensics and Security (TIFS), 10(4), 746–761.
Wen, J., Greiner, R., & Schuurmans, D. (2020). Domain aggregation networks for multi-source domain adaptation. In International Conference on Machine Learning. PMLR (pp. 10214–10224).
Xu, R., Chen, Z., Zuo, W., Yan, J., & Lin, L. (2018). Deep cocktail network: Multi-source unsupervised domain adaptation with category shift. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 3964–3973).
Yang, J., Lei, Z., Yi, D., & Li, S. Z. (2015). Person-specific face antispoofing with subject domain adaptation. IEEE Transactions on Information Forensics and Security (TIFS), 10, 797–809.
Yang, S., Wang, Y., van de Weijer, J., Herranz, L. & Jui, S. (2021a). Generalized source-free domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (pp. 8978–8987).
Yang, S., Van de Weijer, J., Herranz, L., & Jui, S. (2021b). Exploiting the intrinsic neighborhood structure for source-free domain adaptation. In Advances in neural information processing systems (NeurIPS) (Vol. 34, pp. 29393–29405).
Mansour, Y., Mohri, M., & Rostamizadeh, A. (2008). Domain adaptation with multiple sources. In Advances in neural information processing systems (pp. 1041–1048).
Yu, Z., Zhao, C., Wang, Z., Qin, Y., Su, Z., Li, X., Zhou, F., & Zhao, G. (2020). Searching central difference convolutional networks for face anti-spoofing. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR) (pp. 5295–5305).
Yu, Z., Wan, J., Qin, Y., Li, X., Li, S. Z., & Zhao, G. (2020). NAS-FAS: Static-dynamic central difference network search for face anti-spoofing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(9), 3005–3023.
Yu, Z., Qin, Y., Li, X., Zhao, C., Lei, Z., & Zhao, G. (2022). Deep learning for face anti-spoofing: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(5), 5609–5631.
Yue, H., Wang, K., Zhang, G., Feng, H., Han, J., Ding, E., & Wang, J. (2022). Cyclically disentangled feature translation for face anti-spoofing. arXiv preprint arXiv:2212.03651
Zhang, Z., Yan, J., Liu, S., Lei, Z., Yi, D., & Li, S. Z. (2012). A face anti-spoofing database with diverse attacks. In 2012 5th IAPR International Conference on Biometrics (ICB) (pp. 26–31). IEEE.
Zhang, K., Zhang, Z., Li, Z., & Qiao, Y. (2016). Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23, 1499–1503.
Zhang, S., Wang, X., Liu, A., Zhao, C., Wan, J., Escalera, S., Shi, H., Wang, Z., & Li, S. Z. (2019). A dataset and benchmark for large-scale multi-modal face anti-spoofing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 919–928).
Zhang, S., Liu, A., Wan, J., Liang, Y., Guo, G., Escalera, S., Escalante, H. J., & Li, S. Z. (2020). CASIA-SURF: A large-scale multi-modal benchmark for face anti-spoofing. IEEE Transactions on Biometrics, Behavior, and Identity Science, 2, 182–193.
Zhao, H., Zhang, S., Wu, G., Moura, J. M., Costeira, J. P., & Gordon, G. J. (2018). Adversarial multiple source domain adaptation. In Advances in neural information processing systems (Vol. 31).
Zhao, S., Wang, G., Zhang, S., Gu, Y., Li, Y., Song, Z., Xu, P., Hu, R., Chai, H., & Keutzer, K. (2020). Multi-source distilling domain adaptation. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 34, pp. 12975–12983).
Zhou, Q., Zhang, K. Y., Yao, T., Yi, R., Sheng, K., Ding, S., & Ma, L. (2022). Generative domain adaptation for face anti-spoofing. In Computer Vision-ECCV, Tel Aviv, Israel (pp. 335–356). Springer.
Zhou, Q., Zhang, K. Y., Yao, T., Lu, X., Yi, R., Ding, S., & Ma, L. (2023). Instance-aware domain generalization for face anti-spoofing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 20453–20463).
Zhuang, F., Cheng, X., Luo, P., Pan, S. J., & He, Q. (2015). Supervised representation learning: Transfer learning with deep autoencoders. In Twenty-Fourth International Joint Conference on Artificial Intelligence.
Acknowledgements
We thank the following professors and their group members: Wan et al., Lei et al., Jain et al., Komulainen et al., and Marcel et al. for the CASIA-FASD, Idiap Replay-Attack, MSU-MFSD, OULU-NPU, 3DMask, HiFiMask and Surveillance datasets. The work was supported in part by the National Natural Science Foundation of China (NSFC) under Grant (No. 61976173).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Segio Escalera.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Mao, S., Chen, R. & Li, H. Weighted Joint Distribution Optimal Transport Based Domain Adaptation for Cross-Scenario Face Anti-Spoofing. Int J Comput Vis 133, 590–610 (2025). https://doi.org/10.1007/s11263-024-02178-5
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1007/s11263-024-02178-5