当前位置:网站首页>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 任务的有效性。
边栏推荐
- [Elastic-Job] Overview of Distributed Scheduling Tasks
- VS通过ODBC连接MYSQL(一)
- Navicat从本地文件中导入sql文件
- Common JVM interview questions and answers
- MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
- 5 methods of MySQL paging query
- 【云原生】开源数据分析 SPL 轻松应对 T+0
- sqlmap injection tutorial common commands
- [swagger close] The production environment closes the swagger method
- [Cloud Native] What should I do if SQL (and stored procedures) run too slowly?
猜你喜欢
MySQL高级语句(一)
[Cloud native] Simple introduction and use of microservice Nacos
[windows]--- SQL Server 2008 super detailed installation tutorial
VS通过ODBC连接MYSQL(一)
flutter 混合开发 module 依赖
unicloud 发布后小程序提示连接本地调试服务失败,请检查客户端是否和主机在同一局域网下
How MySQL - depots table?A look at will understand
Using IIS10 to build an asp website in win11
NFTs: The Heart of Digital Ownership
Flutter mixed development module dependencies
随机推荐
flutter 混合开发 module 依赖
2021 Mianjing - Embrace Change
cocos2d-x-3.2图片灰化效果
configure:error no SDL library found
cocoscreator3.5.2打包微信小游戏发布到QQ小游戏修改
The server time zone value ‘й‘ is unrecognized or represents more than one time zone
微信小程序启动优化
flutter arr 依赖
C语言 | 获取字符串里逗号间隔的内容
Powershell中UTF-8环境中文乱码解决办法
js中的this指向与原型对象
Linux modify MySQL database password
quick lua加密
this points to the problem
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
sqlmap injection tutorial common commands
npm WARN config global `--global`, `--local` are deprecated. Use `--location solution
Hyper-V新建虚拟机注意事项
unicloud 云开发记录
powershell statistics folder size