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实验进行一个汇总,是我为了做实验方便(并分享给朋友)的一篇文章. 前 ...
随机推荐
- 快速部署postfix邮件服务器
• 装包.配置.起服务– 默认的标准配置即可为本机提供发/收邮件服务– 若有必要,可扩大服务范围(邮件域) 前提:邮件服务器,必须为手工配置永久主机名虚拟机server0[root@server0 ~ ...
- 从操作系统层面理解Linux下的网络IO模型
I/O( INPUT OUTPUT),包括文件I/O.网络I/O. 计算机世界里的速度鄙视: 内存读数据:纳秒级别. 千兆网卡读数据:微妙级别.1微秒=1000纳秒,网卡比内存慢了千倍. 磁盘读数据: ...
- Scala实践4
一.数组 在Scala中,用()来访问元素,数组声明的语法格式如下 : var z:Array[String] = new Array[String](3) 或 var z = new Array[S ...
- 关于django中的get_or_create方法的坑
最近在项目中发现了这样的一个坑,那就是我们的需求是不能添加一个相同的对象到数据库中,就通过某些字段的值组合成唯一值到数据库中去查找数据,如果没有找到对象,那就创建一条新的数据库记录,而刚好django ...
- 我的开源权限管理项目BeCore (基于.net core开发)
首先 谢谢大家还记得我.. 新年快乐 祝大家工作顺利 事事顺心 人见人爱 车见车载 冬不寒 下雨有伞 全身哪都不疼 就是有人疼 ~~ Github地址:https://github.com/baby8 ...
- [bzoj2326] [洛谷P3216] [HNOI2011] 数学作业
想法 最初的想法就是记录当前 \(%m\) 值为cur,到下一个数时 \(cur=cur \times 10^x + i\) n这么大,那就矩阵乘法呗. 矩阵乘法使用的要点就是有一个转移矩阵会不停的用 ...
- Docker获取镜像报错docker: Error response from daemon
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled ...
- ios--->ios == 和 isEqual的用法区别
ios == 和 isEqual的用法区别 首先要理解指针和指针值的却别 存放变量地址的变量我们称之为"指针变量",简单的说变量p中存储的是变量a的地址,那么p就可以称为是指针变量 ...
- php--->查询超大文件(12G)
今天遇到一个要在一个12G日志中查询数据的需求,手中暂时没有查询这种超大文件的工具,于是自己写了一个程度来读这个超大文件 其整体思路就是一行一行地去读取超大文件中的数据,然后将拿出的一行数据做相应的查 ...
- Leetcode 题目整理-6 Swap Nodes in Pairs & Remove Duplicates from Sorted Array
24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For ...