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实验进行一个汇总,是我为了做实验方便(并分享给朋友)的一篇文章. 前 ...
随机推荐
- 微信小程序吸顶功能
---------------------------HTML------------------------ <view class="navbar-wrap"> ...
- AnyDesk免费远程工具
AnyDesk是一款声称速度最快的免费长途衔接/长途桌面操控软件,是前TeamViewer开发小组人员自立门户的商品,它拥有领先的视频压缩技能DeskRT,能够轻松穿透防火墙/路由器,实测在电信.移动 ...
- Go数组和切片你不知道的区别
开篇语 数组和切片是两种不同的数据结构,比较常见,在Go语言中同时存在,今天我们就一起来看看他们在使用方式上,原理上的一些区别? 数组 在Go语言中,数组是一种具有相同类型固定大小的一种数据结构. 我 ...
- 侠说java8--Stream流操作学习笔记,都在这里了
前言 首次接触到Stream的时候以为它是和InputStream.OutputStream这样的输入输出流的统称. 流和集合的前世今生 概念的差异 在开发中,我们使用最多的类库之一就是集合.集合是一 ...
- FWT 入门
#include <bits/stdc++.h> using namespace std; #define ll long long const ll maxn = 3e5+5; cons ...
- 网络流 - 最大流构图入门 bzoj 1305
一次舞会有n个男孩和n个女孩.每首曲子开始时,所有男孩和女孩恰好配成n对跳交谊舞.每个男孩都不会和同一个女孩跳两首(或更多)舞曲.有一些男孩女孩相互喜欢,而其他相互不喜欢(不会“单向喜欢”).每个男孩 ...
- mysql 向字段添加数据或者删除数据
UPDATE table SET cids = CONCAT(cids , ',12') where id=id //向字段添加数据 //因为要用逗号分隔 所以在在前面加了一个逗号 UPDATE ta ...
- unittest模块使用方法
unittest模块常用属性 1. unittest.TestCase类:所有的测试用例类继承的基类 定义一个测试用例类,需要继承TestCase,比如: class BaiduTest(unitte ...
- Nginx. 用http访问https跨域
用http 访问 https域名, 报跨越问题 解决方法: 在nginx相应服务的转发配置下添加: add_header 'Access-Control-Allow-Origin' 'http://i ...
- Excel大数据排查重复行内容方法,三步搞定!
首先第一步,我们找到一个空白列D输入公式“=A1&B1&C1”: 然后第二步,再选择下一空白列输入公式“=IF(COUNTIF(D:D,D1)>1,"重复", ...