您的位置:山东大学 -> 科技期刊社 -> 《山东大学学报(工学版)》

山东大学学报 (工学版) ›› 2023, Vol. 53 ›› Issue (6): 1-7.doi: 10.6040/j.issn.1672-3961.0.2023.132

• 机器学习与数据挖掘 •    下一篇

一种高效且轻量的RGB单帧人脸反欺诈模型

李家春(),李博文,常建波   

  1. 华南理工大学计算机科学与工程学院,广东 广州 510006
  • 收稿日期:2023-06-21 出版日期:2023-12-20 发布日期:2023-12-19
  • 作者简介:李家春(1968—),女,湖北松滋人,副教授,硕士生导师,博士,主要研究方向为计算机网络与信息安全、隐私保护、人工智能安全、智慧教学等。E-mail: jclee@scut.edu.cn
  • 基金资助:
    教育部产学合作协同育人资助项目(201902186007);教育部产学合作协同育人资助项目(201901034001)

An efficient and lightweight RGB frame-level face anti-spoofing model

Jiachun LI(),Bowen LI,Jianbo CHANG   

  1. School of Computer Science and Engineering, South China University of Technology, Guangzhou 510006, Guangdong, China
  • Received:2023-06-21 Online:2023-12-20 Published:2023-12-19

摘要:

针对在仅具有三原色(red-green-blue,RGB)摄像头的通用消费设备上部署基于深度学习的人脸反欺诈(face anti-spoofing,FAS) 算法时存在的挑战问题,提出一种高效且轻量的RGB单帧FAS(efficient and lightweight RGB frame-level face anti-spoofing,EL-FAS)模型。探索一种新的全局空间自注意力机制捕获全局上下文信息的依赖关系,以提高模型泛化能力并在受限条件下实现高检测性能;设计一种等通道像素级二元监督方法,强制模型从不同的像素中学习共享特征;采用Bottleneck模块搭建骨干网络以减少模型参数。试验结果表明,EL-FAS模型在OULU-NPU数据集的大多数协议上平均分类错误率RACE最低,取得较好的人脸欺诈检测效果,在SiW数据集和跨数据集测试中也取得较好的性能,并且模型轻量,参数只有1.34×106个。

关键词: 深度学习, 人脸反欺诈, 自注意力机制, 像素级监督, 轻量级模型

Abstract:

Based on the challenge when deploying a deep learning-based face anti-spoofing (FAS) algorithm on general-purpose consumer devices with only RGB camera, an efficient and lightweight RGB frame-level FAS model (EL-FAS) was proposed. To improve the generalization ability of the model and achieve high performance under constrained conditions, a novel global spatial self-attention mechanism was explored to capture global feature dependencies, and an equal-channel pixel-wise binary supervision method was designed to force our model to learn shared features from different pixels. The Bottlenecks residual block was used to establish the backbone network to reduce parameters. Analysis and the experimental results showed that EL-FAS model achieved state-of-the-art performance in the OULU-NPU dataset, obtained competitive performance in the SiW dataset and cross-dataset tests. The model was lightweight, with only 1.34×106 parameters.

Key words: deep learning, face anti-spoofing, self-attention mechanism, pixel-wise supervision, lightweight model

中图分类号: 

  • TP391

图1

EL-FAS模型架构"

表1

EL-FAS模型架构细节"

解编码器 模块 输入 操作 t c s
编码器 E1 3×2242 Conv3×3 32 2
32×1122 Bottleneck 1 16 1
E2 16×562 Bottleneck 6 24 2
24×562 Bottleneck 6 24 1
24×562 Bottleneck 6 32 2
E3 32×282 Bottleneck 6 32 1
32×282 Bottleneck 6 32 1
32×282 Bottleneck 6 64 2
64×142 Bottleneck 6 64 1
64×142 Bottleneck 6 64 1
E4 64×142 Bottleneck 6 64 1
64×142 Bottleneck 6 96 1
96×142 Bottleneck 6 96 1
96×142 Bottleneck 6 96 1
解码器 96×142 ConvTrans 32 2
D1 64×282 Bottleneck 6 32 1
32×282 Bottleneck 6 32 1
32×282 ConvTrans 24 2
D2 48×562 Bottleneck 6 24 1
24×562 Bottleneck 6 24 1
24×562 ConvTrans 16 2
D3 32×1122 Bottleneck 6 16 1
16×1122 Bottleneck 6 16 1
D4 16×1122 ConvTrans 16 2
16×2242 Conv3×3 3 1

图2

全局空间自注意力机制架构"

表2

数据集描述"

数据集 用户数 视频数 攻击设备 测试协议数
SiW 165 4 478 iPad, iPhone7, GalaxyS8, Asus MB168B(RGB) 3
OULU-NPU 55 4 950 Dell 1905FP, MacBook(RGB) 4
Replay-Attack 50 1 200 iPad, iPhone 3GS(RGB) 1
CASIA-FASD 50 600 A4 Paper, iPad(RGB) 1

表3

数据集内消融试验结果"

模型 RAPCE RBPCE RACE
Single 4.2±9.3 4.6±6.8 4.4±4.9
Equal 3.3±4.7 5.4±6.8 4.4±3.2
Single+Attention 3.4±4.5 4.4±6.8 3.9±3.5
Equal+Attention 1.6±3.7 5.8±8.3 3.7±4.0

表4

跨数据集消融试验结果"

模型 RAPCE RBPCE RACE
Single 3.3±3.7 2.5±2.5 2.9±2.7
Equal 3.0±4.0 2.5±2.2 2.8±2.0
Single+Attention 3.0±4.0 2.0±1.9 2.5±1.8
Equal+Attention 0.8±1.8 3.7±4.3 2.3±2.4

表5

OULU-NPU数据集内的测试结果"

协议 方法 RAPCE RBPCE RACE
1 GRADIANT[18] 1.3 12.5 6.9
Auxiliary[17] 1.6 1.6 1.6
FaceDs[19] 1.2 1.7 1.5
STDN[20] 0.8 1.3 1.1
DSGT[5] 2.0 0 1.0
DeepPix[10] 0.8 0 0.4
EL-FAS 0 1.6 0.8
2 DeepPix[10] 11.4 0.6 6.0
FaceDs[19] 4.2 4.4 4.3
Auxiliary[17] 2.7 2.7 2.7
GRADIANT[18] 3.1 1.9 2.5
DSGT[5] 2.5 1.3 1.9
STDN[20] 2.3 1.6 1.9
EL-FAS 0.3 0.5 0.4
3 DeepPix[10] 11.7±19.6 10.6±14.1 11.1±9.4
GRADIANT[18] 2.6±3.9 5.0±5.3 3.8±2.4
Auxiliary[17] 2.6±3.9 5.0±5.3 3.8±2.4
FaceDs[19] 4.0±1.8 3.8±1.2 3.6±1.6
STDN[20] 1.6±1.6 4.0±5.4 2.8±3.3
DSGT[5] 3.2±2.0 2.2±1.4 2.7±0.6
EL-FAS 1.9±2.4 3.5±2.4 2.7±1.2
4 DeepPix[10] 36.7±29.7 13.3±16.8 25.0±12.7
GRADIANT[18] 5.0±4.5 15.0±7.1 10.0±5.0
Auxiliary[17] 9.3±5.6 10.4±6.0 9.5±6.0
FaceDs[19] 5.1±6.3 6.1±5.1 5.6±5.7
DSGT[5] 6.7±7.5 3.3±4.1 5.0±2.2
STDN[20] 2.3±3.6 5.2±5.4 3.8±4.2
EL-FAS 1.6±3.7 5.8±8.3 3.7±4.0

表6

SiW数据集内的测试结果"

协议 方法 RAPCE RBPCE RACE
1 Auxiliary[17] 3.58 3.58 3.58
DSGT[5] 0.64 0.17 0.40
STDN[20] 0 0 0
EL-FAS 0 0 0
2 Auxiliary[17] 0.57±0.69 0.57±0.69 0.57±0.69
DSGT[5] 0 0.04±0.08 0.02±0.04
STDN[20] 0 0 0
EL-FAS 0.08±0.14 0 0.04±0.07
3 Auxiliary[17] 8.31±3.81 8.31±3.80 8.31±3.81
STDN[20] 8.33±3.33 7.50±3.33 7.90±3.30
DSGT[5] 2.63±3.72 2.92±3.42 2.78±3.57
EL-FAS 25.80±23.50 0 12.90±11.70

表7

CASIA-FASD和Replay-Attack数据集间的跨数据集测试结果"

方法 RHTE
CR RC
CNN[3] 48.5 45.5
FaceDs[19] 28.5 41.1
Auxiliary[16] 27.6 28.4
EL-FAS 31.2 31.1

表8

从SiW到OULU-NPU数据集的测试结果"

协议 方法 RAPCE RBPCE RACE
1 Auxiliary[17] 10.0
DSGT[5] 1.7 13.3 7.5
EL-FAS 3.3 4.6 3.9
2 Auxiliary[17] 14.1
DSGT[5] 9.7 14.2 11.9
EL-FAS 3.1 20.5 11.8
3 Auxiliary[17] 13.8±5.7
DSGT[5] 17.5±4.6 11.7±12.0 14.6±4.8
EL-FAS 3.9±2.8 10.8±3.8 7.4±2.5
4 Auxiliary[17] 10.0±8.8
DSGT[5] 0.8±1.9 10.0±11.6 5.4±5.7
EL-FAS 0.8±1.8 3.7±4.3 2.3±2.4

表9

轻量级指标对比"

方法 参数量 浮点运算量
LSTM-CNN[4] 2.07×106 4.77×109
DSGT[5] 5.53×106 773.40×109
Depth[8] 9.25×106 20.57×109
BASN[9] 80.40×106 274.13×109
DeepPix[10] 3.20×106 4.62×109
EL-FAS 1.34×106 0.79×109
1 PATEL K , HAN H , JAIN A K . Secure face unlock: spoof detection on smartphones[J]. IEEE Transactions on Information Forensics and Security, 2016, 11 (10): 2268- 2283.
doi: 10.1109/TIFS.2016.2578288
2 KOMULAINEN J, HADID A, PIETIKÄINEN M. Context based face anti-spoofing[C]//Proceedings of the 2013 IEEE Sixth International Conference on Biometrics: Theory, Applications and Systems (BTAS). Arlington, USA: IEEE, 2013: 6712690.
3 YANG J, LEI Z, LI S Z. Learn convolutional neural network for face anti-spoofing[EB/OL]. (2014-08-26)[2023-02-21]. https://arxiv.org/abs/1408.5601.
4 XU Z, LI S, DENG W. Learning temporal features using LSTM-CNN architecture for face anti-spoofing[C]//Proceedings of the 2015 3rd IAPR Asian Conference on Pattern Recognition(ACPR). Kuala Lumpur, Malaysia: IEEE, 2015: 141-145.
5 WANG Z, YU Z, ZHAO C, et al. Deep spatial gradient and temporal depth learning for face anti-spoofing[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle, USA: IEEE, 2020: 5042-5051.
6 ZHANG S, WANG X, LIU A, et al. A dataset and benchmark for large-scale multi-modal face anti-spoofing[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach, USA: IEEE, 2019: 919-928.
7 WANG Z , WANG Q , DENG W , et al. Learning multi-granularity temporal characteristics for face anti-spoofing[J]. IEEE Transactions on Information Forensics and Security, 2022, 17, 1254- 1269.
doi: 10.1109/TIFS.2022.3158062
8 ATOUM Y, LIU Y, JOURABLOO A, et al. Face anti-spoofing using patch and depth-based CNNs[C]//Proceedings of the 2017 IEEE International Joint Conference on Biometrics (IJCB). Denver, USA: IEEE, 2017: 319-328.
9 KIM T, KIM Y H, KIM I, et al. BASN: enriching feature representation using bipartite auxiliary supervisions for face anti-spoofing[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops. Seoul, Korea: IEEE, 2019: 494-503.
10 GEORGE A, MARCEL S. Deep pixel-wise binary supervision for face presentation attack detection[C]// Proceedings of the 2019 International Conference on Biometrics (ICB). Crete, Greece: IEEE, 2019: 19352833.
11 RONNEBERGER O, FISCHER P, BROX T. U-Net: convolutional networks for biomedical image segmentation[C]//Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention. Munich, Germany: Springer, 2015: 234-241.
12 SANDLER M, HOWARD A, ZHU M, et al. MobileNetV2: inverted residuals and linear bottlenecks[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE, 2018: 4510-4520.
13 VISIN F, KASTNER K, CHO K, et al. ReNet: a recurrent neural network based alternative to convolutional networks[EB/OL]. (2015-07-23)[2023-02-21]. https://arxiv.org/abs/1505.00393.
14 BOULKENAFET Z, KOMULAINEN J, LI L, et al. OULU-NPU: a mobile face presentation attack database with real-world variations[C]//Proceedings of the 2017 12th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2017). Washington, USA: IEEE, 2017: 612-618.
15 CHINGOVSKA I, ANJOS A, MARCEL S. On the effectiveness of local binary patterns in face anti-spoofing[C]//2012 BIOSIG-Proceedings of the International Conference of Biometrics Special Interest Group (BIOSIG). Darmstadt, Germany: IEEE, 2012: 13029854.
16 ZHANG Z, YAN J, LIU S, et al. A face anti-spoofing database with diverse attacks[C]//Proceedings of the 2012 5th IAPR International Conference on Biometrics (ICB). New Delhi, India: IEEE, 2012: 26-31.
17 LIU Y, JOURABLOO A, LIU X. Learning deep models for face anti-spoofing: binary or auxiliary supervision[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE, 2018: 389-398.
18 BOULKENAFET Z, KOMULAINEN J, AKHTAR Z, et al. A competition on generalized software-based face presentation attack detection in mobile scenarios[C]//Proceedings of the 2017 IEEE International Joint Conference on Biometrics (IJCB). Denver, USA: IEEE, 2017: 688-696.
19 JOURABLOO A, LIU Y, LIU X. Face de-spoofing: anti-spoofing via noise modeling[C]//Proceedings of the European Conference on Computer Vision (ECCV). Munich, Germany: IEEE, 2018: 290-306.
20 LIU Y, STEHOUWER J, LIU X. On disentangling spoof trace for generic face anti-spoofing[C]//Proceedings of the European Conference on Computer Vision. Glasgow, England: Springer, 2020: 406-422.
[1] 王禹鸥,苑迎春,何振学,何晨. 融合多特征和多头自注意力机制的高校学业命名实体识别[J]. 山东大学学报 (工学版), 2025, 55(6): 35-44.
[2] 李常刚,李宝亮,曹永吉,王佳颖. 人工智能在电力系统潮流计算中的应用综述及展望[J]. 山东大学学报 (工学版), 2025, 55(5): 1-17.
[3] 周群颖,隋家成,张继,王洪元. 基于自监督卷积和无参数注意力机制的工业品表面缺陷检测[J]. 山东大学学报 (工学版), 2025, 55(4): 40-47.
[4] 薛冰冰,王勇,杨维浩,王川,于迪,王旭. 基于ETC收费数据的高速公路交通流数据修复及实时预测[J]. 山东大学学报 (工学版), 2025, 55(3): 58-71.
[5] 董明书,陈俐企,马川义,张珠皓,孙仁娟,管延华,庄培芝. 沥青路面内部裂缝雷达图像智能判识算法研究[J]. 山东大学学报 (工学版), 2025, 55(3): 72-79.
[6] 常新功,苏敏惠,周志刚. 基于进化集成的图神经网络解释方法[J]. 山东大学学报 (工学版), 2024, 54(4): 1-12.
[7] 索大翔,李波. 基于Gromov-Wasserstein最优传输的输电线路小目标检测方法[J]. 山东大学学报 (工学版), 2024, 54(3): 22-29.
[8] 宋辉,张轶哲,张功萱,孟元. 基于类权重和最小化预测熵的测试时集成方法[J]. 山东大学学报 (工学版), 2024, 54(3): 36-43.
[9] 刘新,刘冬兰,付婷,王勇,常英贤,姚洪磊,罗昕,王睿,张昊. 基于联邦学习的时间序列预测算法[J]. 山东大学学报 (工学版), 2024, 54(3): 55-63.
[10] 聂秀山,巩蕊,董飞,郭杰,马玉玲. 短视频场景分类方法综述[J]. 山东大学学报 (工学版), 2024, 54(3): 1-11.
[11] 李璐,张志军,范钰敏,王星,袁卫华. 面向冷启动用户的元学习与图转移学习序列推荐[J]. 山东大学学报 (工学版), 2024, 54(2): 69-79.
[12] 高泽文,王建,魏本征. 基于混合偏移轴向自注意力机制的脑胶质瘤分割算法[J]. 山东大学学报 (工学版), 2024, 54(2): 80-89.
[13] 陈成,董永权,贾瑞,刘源. 基于交互序列特征相关性的可解释知识追踪[J]. 山东大学学报 (工学版), 2024, 54(1): 100-108.
[14] 王旭晴,魏伟波,杨光宇,宋金涛,吕婷,潘振宽. 基于算法展开的图像盲去模糊深度学习网络[J]. 山东大学学报 (工学版), 2023, 53(6): 35-46.
[15] 王碧瑶,韩毅,崔航滨,刘毅超,任铭然,高维勇,陈姝廷,刘嘉巍,崔洋. 基于图像的道路语义分割检测方法[J]. 山东大学学报 (工学版), 2023, 53(5): 37-47.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 张永花,王安玲,刘福平 . 低频非均匀电磁波在导电界面的反射相角[J]. 山东大学学报(工学版), 2006, 36(2): 22 -25 .
[2] 李 侃 . 嵌入式相贯线焊接控制系统开发与实现[J]. 山东大学学报(工学版), 2008, 38(4): 37 -41 .
[3] 孔祥臻,刘延俊,王勇,赵秀华 . 气动比例阀的死区补偿与仿真[J]. 山东大学学报(工学版), 2006, 36(1): 99 -102 .
[4] 来翔 . 用胞映射方法讨论一类MKdV方程[J]. 山东大学学报(工学版), 2006, 36(1): 87 -92 .
[5] 余嘉元1 , 田金亭1 , 朱强忠2 . 计算智能在心理学中的应用[J]. 山东大学学报(工学版), 2009, 39(1): 1 -5 .
[6] 李梁,罗奇鸣,陈恩红. 对象级搜索中基于图的对象排序模型(英文)[J]. 山东大学学报(工学版), 2009, 39(1): 15 -21 .
[7] 陈瑞,李红伟,田靖. 磁极数对径向磁轴承承载力的影响[J]. 山东大学学报(工学版), 2018, 48(2): 81 -85 .
[8] 王波,王宁生 . 机电装配体拆卸序列的自动生成及组合优化[J]. 山东大学学报(工学版), 2006, 36(2): 52 -57 .
[9] 李可,刘常春,李同磊 . 一种改进的最大互信息医学图像配准算法[J]. 山东大学学报(工学版), 2006, 36(2): 107 -110 .
[10] 季涛,高旭,孙同景,薛永端,徐丙垠 . 铁路10 kV自闭/贯通线路故障行波特征分析[J]. 山东大学学报(工学版), 2006, 36(2): 111 -116 .