当前位置:网站首页>Multi-Modal Face Anti-Spoofing Based on Central Difference Networks学习笔记
Multi-Modal Face Anti-Spoofing Based on Central Difference Networks学习笔记
2022-07-31 05:15:00 【Cassiel_cx】
论文题目:Multi-Modal Face Anti-Spoofing Based on Central Difference Networks
代码地址:GitHub - ZitongYu/CDCN: Central Difference Convolutional Networks (CVPR'20)
文章创新点
第一个将 CDCN 用于基于 FAS 的深度和红外模态输入,并分析了 CDCN 在这两种模态下的表现。
Multi-Modal CDCN
CDC 卷积算子如下图所示:
作者使用 CDCN 作为每个模态分支的主干网络,每个模态分支的网络是不共享的。因此,每个分支都能够独立地学习模态感知特征,每个模态分支的多级特征通过级联进行融合,网络架构如下图所示:
由于特征级融合策略并非对测试集的所有协议都是最优的,作者尝试了另外两种融合策略:(1)通过将三模态输入直接拼接成 256×256×9 的输入级融合;(2)分数级融合,通过加权每个模态的预测分数以获得最终得分。
监督信号
相比于二分类,像素级监督能使模型学到更具判别力的特征表示方法。作者对每张图片生成了一个二值 mask,人脸区域内的像素值为 1,非人脸区域的像素值为 0。
损失函数
损失函数由均方误差和对比深度损失组成,公式如下:
其中, 表示第 n 个对比卷积算子,卷积权值如下:
对应代码如下:
def contrast_depth_conv(input):
''' compute contrast depth in both of (out, label) '''
'''
input 32x32
output 8x32x32
'''
kernel_filter_list =[
[[1,0,0],[0,-1,0],[0,0,0]], [[0,1,0],[0,-1,0],[0,0,0]], [[0,0,1],[0,-1,0],[0,0,0]],
[[0,0,0],[1,-1,0],[0,0,0]], [[0,0,0],[0,-1,1],[0,0,0]],
[[0,0,0],[0,-1,0],[1,0,0]], [[0,0,0],[0,-1,0],[0,1,0]], [[0,0,0],[0,-1,0],[0,0,1]]
]
kernel_filter = np.array(kernel_filter_list, np.float32)
kernel_filter = torch.from_numpy(kernel_filter.astype(np.float)).float().cuda()
# weights (in_channel, out_channel, kernel, kernel)
kernel_filter = kernel_filter.unsqueeze(dim=1)
input = input.unsqueeze(dim=1).expand(input.shape[0], 8, input.shape[1],input.shape[2])
contrast_depth = F.conv2d(input, weight=kernel_filter, groups=8) # depthwise conv
return contrast_depth
class Contrast_depth_loss(nn.Module):
def __init__(self):
super(Contrast_depth_loss,self).__init__()
return
def forward(self, out, label):
'''
compute contrast depth in both of (out, label),
then get the loss of them
tf.atrous_convd match tf-versions: 1.4
'''
contrast_out = contrast_depth_conv(out)
contrast_label = contrast_depth_conv(label)
criterion_MSE = nn.MSELoss().cuda()
loss = criterion_MSE(contrast_out, contrast_label)
#loss = torch.pow(contrast_out - contrast_label, 2)
#loss = torch.mean(loss)
return loss
实验
对比实验结果与消融实验结果如下:
结论
在本文中,作者详细研究了 CDCN 在 FAS 任务中的多种模态输入中的应用。 实验结果表明CDCN对单模态和多模态 FAS 任务的有效性。
边栏推荐
- 数据库 | SQL查询进阶语法
- Common JVM interview questions and answers
- On the side of Ali, tell me what are the application scenarios of message middleware you know?
- 安装Multisim出现 No software will be installed or removed解决方法
- 一个简单的bash转powershell案例
- 浅谈对分布式模式下CAP的理解
- UiBot has an open Microsoft Edge browser and cannot perform the installation
- 为什么bash中的read要配合while才能读取/dev/stdin的内容
- What is an EVM Compatible Chain?
- Getting to know regular expressions
猜你喜欢
Access database query
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
This in js points to the prototype object
The feign call fails, JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
[uiautomation] Get WeChat friend list (stored in txt)
Sqlite A列数据复制到B列
js中的this指向与原型对象
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
Understanding of objects and functions in js
Xiaomi mobile phone SMS location service activation failed
随机推荐
mysql common commands
js中流程控制语句
understand js operators
[Cloud native] Open source data analysis SPL easily copes with T+0
Using IIS10 to build an asp website in win11
Chinese garbled solution in UTF-8 environment in Powershell
计网 Packet Tracer仿真 | 简单易懂集线器和交换机对比(理论+仿真)
为什么bash中的read要配合while才能读取/dev/stdin的内容
数据库 | SQL增删改查基础语法
js中的break与continue退出
Tencent Cloud Lightweight Server deletes all firewall rules
ERROR Error: No module factory availabl at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST ‘Error
cocos2d-x-3.2 不能混合颜色修改
2021年京东数据分析工程师秋招笔试编程题
The latest MySql installation teaching, very detailed
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
sql 添加 default 约束
mysql常用命令
What is the difference between NFT and digital collection?
cocos2d-x-3.2图片灰化效果