Face-anti-spoofing实验记录(通过val_public_list.txt制作val数据集)
https://sites.google.com/qq.com/chalearnfacespoofingattackdete/contest-details
数据集官方获取网站
网友总结
https://blog.csdn.net/baidu_40840693/article/details/89060374
网友的FeatherNets论文笔记
https://blog.csdn.net/u014640980/article/details/89473862
创新点
提出轻量级网络Feather:
thin CNN stem——计算代价小;
提出流模块——比GAP(Global Average Pooling)精确度更高;
设计了一种新的融合分类器体系结构,将从多模态数据(depth 和 IR 数据)中学习到的多模型进行组合和级联;
成就
仅用depth image进行训练,0.00168 ACER, 0.35M parameters and 83M FLOPS;
in the Face Anti-spoofing Attack Detection Challenge@CVPR2019 and
got the result of 0.0013(ACER), 0.999(TPR@FPR=10e-2),
0.998(TPR@FPR=10e-3) and 0.9814(TPR@FPR=10e-4).
数据集 MMFD
原理
真实人脸的depth image是不均匀的,攻击人脸的depth image是平面的

由于网上找到的数据集资源并没有val文件夹,通过对比发现val数据集中的图片是从test数据集中选取的图片,于是自己制作了val数据集。如下所示:
# coding: utf-8
from pathlib import Path #从pathlib中导入Path
import os
import fileinput import shutil
rgb = open('./rgb_train.txt','a')
pwd = os.getcwd() +'/'# the val data path 训练集的路径
test_pwd = '/home/tay/Videos/Anti_spoofing/Face_anti_spoofing/datasets/CASIA-SURF/Testing/'
dst_pwd = '/home/tay/Videos/Anti_spoofing/Face_anti_spoofing/Val/'
for line in fileinput.input("val_public_list.txt"):
list = line.split(' ')
print('list[0]', list[0])
# print('list[0] is', list[0].split('.jpg')[0].split('/')[-1])
print('list[1] is', list[1])
print('list[2] is', list[2])
# print('rgb is', pwd + list[0].split('.jpg')[0]+ '_tr' + '.jpg')
# rgb.write(pwd +list[0]+'\n')
# depth.write(pwd +list[1]+'\n')
# ir.write(pwd +list[2]+'\n')
#src = test_pwd +'/'+ list[0].split('Val/')[-1]+'\n'
#dst = list[0].split('/')[-2]
if os.path.exists(os.path.join(dst_pwd, list[0].split('/')[-2])):
shutil.copy(test_pwd + list[0].split('Val/')[-1], os.path.join(dst_pwd, list[0].split('/')[-2]))
else:
os.makedirs(os.path.join(dst_pwd, list[0].split('/')[-2]))
shutil.copy(test_pwd + list[0].split('Val/')[-1], os.path.join(dst_pwd, list[0].split('/')[-2])) if os.path.exists(os.path.join(dst_pwd, list[1].split('/')[-2])):
shutil.copy(test_pwd + list[1].split('Val/')[-1], os.path.join(dst_pwd, list[1].split('/')[-2]))
else:
os.makedirs(os.path.join(dst_pwd, list[1].split('/')[-2]))
shutil.copy(test_pwd + list[1].split('Val/')[-1], os.path.join(dst_pwd, list[1].split('/')[-2])) if os.path.exists(os.path.join(dst_pwd, list[2].split('/')[-2])):
shutil.copy(test_pwd + list[2].split('Val/')[-1], os.path.join(dst_pwd, list[2].split('/')[-2]))
else:
os.makedirs(os.path.join(dst_pwd, list[2].split('/')[-2]))
shutil.copy(test_pwd + list[2].split('Val/')[-1], os.path.join(dst_pwd, list[2].split('/')[-2]))
# rgb.write(test_pwd + list[0].split('Val/')[-1]+'\n')
# rgb.write(test_pwd + list[1].split('Val/')[-1]+'\n')
# rgb.write(test_pwd + list[2].split('Val/')[-1]+'\n')
# shutil.copy(local_img_name+'/'+new_obj_name, path+'/'+new_obj_name) #shutil.copy(src, dst) src是要复制的图像的文件路径,dst是将要复制到的路径 # rgb.close()
Face-anti-spoofing实验记录(通过val_public_list.txt制作val数据集)的更多相关文章
- case7 淋巴瘤子类分类实验记录
case7 淋巴瘤子类分类实验记录 简介 分类问题:3分类 (identifying three sub-types of lymphoma: Chronic Lymphocytic Leukemia ...
- 实验记录:Oracle redo logfile的resize过程
实验记录:Oracle redo logfile的resize过程. 实验环境:RHEL 6.4 + Oracle 11.2.0.3 单实例 文件系统 实验目的:本实验是修改redo logfile的 ...
- [20190130]删除tab$记录的恢复.txt
[20190130]删除tab$记录的恢复.txt --//网上提到许多删除tab$的案例,主要原因在于没有从官方正规渠道下载oracle版本,还有一些来自工具里面带有一些脚本删除tab$记录. -- ...
- [20180612]删除bootstrap$记录无法启动.txt
[20180612]删除bootstrap$记录无法启动.txt --//前几天看链接http://www.xifenfei.com/2018/05/willfully-delete-bootstra ...
- 使用Scapy向Mininet交换机注入流量 实验记录
使用Scapy向Mininet交换机注入流量 实验记录 用Python脚本及Scapy库写了一个简单的流量生成脚本,并打算使用该脚本往Mininet中的OpenvSwitch交换机注入流量.拓扑图如下 ...
- 树莓派4B智能小车机器套件——入手组装实验记录
树莓派4B智能小车机器套件--入手组装实验记录 4WD智能小车(4WD SMART ROBOT KIT),支持Arduino.51.STM32.Raspberry Pi等4个版本.本套件采用的是树莓派 ...
- CSAPP:datalab实验记录
CSAPP:datalab实验记录 bitXor /* * bitXor - x^y using only ~ and & * Example: bitXor(4, 5) = 1 * Lega ...
- RHCE实验记录总结-2-RHCE
RHCSA实验总结-点击跳转 RHCE实验 RHCE这边我简单分了下类: ## 网络与安全 1. IPv6 设置(推荐使用GUI程序 nm-connection-editor来完成) 2. team ...
- RHCE实验记录总结-1-RHCSA
不管是运维还是开发系统的了解下Linux或者系统的温习整理一下Linux知识点无疑是较好的,这篇文章是对RHCSA&RHCE实验进行一个汇总,是我为了做实验方便(并分享给朋友)的一篇文章. 前 ...
随机推荐
- SCU 4438 Censor|KMP变形题
传送门 Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text P. He ...
- 为QLabel增加Clicked信号
QT为QLabel添加Click事件(如果我们使用组件,我们关心的是信号槽:如果我们自定义组件,我们关心的是事件) 其实就是改写了一个函数:mouseReleaseEvent,当在QLabel放开鼠标 ...
- # go微服务框架kratos学习笔记六(kratos 服务发现 discovery)
目录 go微服务框架kratos学习笔记六(kratos 服务发现 discovery) http api register 服务注册 fetch 获取实例 fetchs 批量获取实例 polls 批 ...
- 2020 年了,Java 日志框架到底哪个性能好?——技术选型篇
大家好,之前写(shui)了两篇其他类型的文章,感觉大家反响不是很好,于是我乖乖的回来更新硬核技术文了. 经过本系列前两篇文章我们了解到日志框架大战随着 SLF4j 的一统天下而落下帷幕,但 SLF4 ...
- k8s~为服务添加ingress的实现
为服务添加ingress的实现 1 当我们为指定的项目添加ingress支持之后,它会在“负载均衡”标签页出现,并显示出你的域名解析到的服务. 2 我们的ingress是支持https的,所以需要为你 ...
- 【python系统学习05】input函数——实现人机交互
input函数 目录 input用途 语法 示例 参数 返回值 返回值数据类型转换 容错处理 动手吧 input用途 实现人机交互: 1.你提出问题打印在屏幕上, 2.运行程序的人再输入回答. 3.按 ...
- jqGrid以setGridParam方式postData,包含历史数据的问题
系统在使用jqGrid时,如果某些页面的查询项是复选框,后台是数组接收的,就会出现传值不正确问题. 1.项目中某查询页面存在的复选框:待处理S1,正在处理S2,已处理S3: 使用jqGrid提交查询数 ...
- 毒瘤养成记1: 如何卡hash
各位毒瘤大家好, 最近模拟赛考了一道trie+主席树好题, 但大家都用hash水过了这道题(包括我), 为了测试一下新搭建的HEAT OJ的hack功能, 我将继续扮演毒瘤的角色, 用毒瘤的艺术形象努 ...
- Java入门 - 面向对象 - 07.包(package)
原文地址:http://www.work100.net/training/java-package.html 更多教程:光束云 - 免费课程 包(package) 序号 文内章节 视频 1 概述 2 ...
- 创建dynamics CRM client-side (四) - Namespace Notation in JS
我们在开发的时候会写很多functions. 但是这些functions 管理起来很麻烦. 微软内部建议我们使用namespace notation的形式管理我们的代码 // Converting f ...