Dataset之CASIA-WebFace:CASIA-WebFace 数据集的简介、安装、使用方法之详细攻略

简介: Dataset之CASIA-WebFace:CASIA-WebFace 数据集的简介、安装、使用方法之详细攻略

CASIA-WebFace 数据集的简介


       CASIA-WebFace数据集包含了10575 个人的494414 张图像。CASIA-webface数据库,压缩包有4个多g,里面包含了10000个人,一共50万张人脸图片,无论是做SVM,DNN还是别的训练,都是非常好的数据库。


1、英文原文介绍


    Pushing by big data and deep convolutional neural network (CNN), the performance of face recognition is becoming comparable to human. Using private large scale training datasets, several groups achieve very high performance on LFW, i.e., 97% to 99%. While there are many open source implementations of CNN, none of large scale face dataset is publicly available. The current situation in the field of face recognition is that data is more important than algorithm. To solve this problem, we propose a semi-automatical way to collect face images from Internet and build a large scale dataset containing 10,575 subjects and 494,414 images, called CASIA-WebFace. To the best of our knowledge, the size of this dataset rank second in the literature, only smaller than the private dataset of Facebook (SCF). We encourage those data-consuming methods training on this dataset and reporting performance on LFW.

       在大数据和深度卷积神经网络(美国有线电视新闻网)的推动下,人脸识别的性能已与人类相比。使用私有的大规模训练数据集,若干组在LFW上实现非常高的性能,即97%到99%。虽然有许多开源的美国有线电视新闻网的实现,没有大规模的面部数据集是公开可用的。人脸识别领域的研究现状是数据比算法更重要。为了解决这个问题,我们提出了一种半自动的方式来收集来自互联网的人脸图像,并建立一个大型数据集包含10575个主题和494414个图像,称为CASIA WebFACTS。据我们所知,该数据集的大小在文献中排名第二,仅比脸谱网(SCF)的私有数据集小。我们鼓励在这个数据集上的数据消耗方法训练和LFW上的报告性能。


image.png





CASIA-WebFace 数据集的安装


因为数据集太大,4个多G,无法直接给各位网友,获取方法:

T1、官网下载

T2、留言向博主索取!






CASIA-WebFace 数据集的使用方法


更新……



1、基础用法


通过人脸识别方法提取人脸特征;

使用每个名人的mainphoto作为它的种子(因为mainphoto一般都是正脸,而且不会出现其他人);

使用那些只有1个人脸的图片去增加每个名人的种子的数量;

在photo gallery剩下的图片中,通过与种子的相似度来找到属于每个名人的其余照片。

裁剪人脸,将同一个名人的脸单独存入一个路径内,之后再进行人工纠错,进一步提高数据集纯度。



2、Tensorflow以CASIA-Webface为例子读取tfrecords数据数据


import mxnet as mx

import argparse

import PIL.Image

import io

import numpy as np

import cv2

import tensorflow as tf

import os

def parse_function(example_proto):

   features = {'image_raw': tf.FixedLenFeature([], tf.string),

               'label': tf.FixedLenFeature([], tf.int64)}

   features = tf.parse_single_example(example_proto, features)

   # You can do more image distortion here for training data

   img = tf.image.decode_jpeg(features['image_raw'])

   img = tf.reshape(img, shape=(112, 112, 3))

   r, g, b = tf.split(img, num_or_size_splits=3, axis=-1)

   img = tf.concat([b, g, r], axis=-1)

   img = tf.cast(img, dtype=tf.float32)

   #归一化

   img = tf.subtract(img, 127.5)

   img = tf.multiply(img,  0.0078125)

   #一些图像增强操作

   img = tf.image.random_flip_left_right(img)

   label = tf.cast(features['label'], tf.int64)

   return img, label

if __name__ == '__main__':

   args = parse_args()

   config = tf.ConfigProto(allow_soft_placement=True)

   sess = tf.Session(config=config)

   # training datasets api config

   tfrecords_f = os.path.join(args.tfrecords_file_path, 'tran.tfrecords')

   dataset = tf.data.TFRecordDataset(tfrecords_f)

   dataset = dataset.map(parse_function)

   #队列缓冲区长度30000,并且打乱顺序

   dataset = dataset.shuffle(buffer_size=30000)

   #这样每次迭代就是32张图片

   dataset = dataset.batch(32)

   iterator = dataset.make_initializable_iterator()

   next_element = iterator.get_next()

   # begin iteration

   for i in range(1000):

       sess.run(iterator.initializer)

       while True:

           try:

               images, labels = sess.run(next_element)

               plt.imshow(images[0])

               fig = plt.gcf()

               plt.show()

               fig.savefig('test.jpg')

           except tf.errors.OutOfRangeError:

               print("End of dataset")







相关文章
|
算法 数据库 计算机视觉
Dataset之COCO数据集:COCO数据集的简介、下载、使用方法之详细攻略
Dataset之COCO数据集:COCO数据集的简介、下载、使用方法之详细攻略
|
机器学习/深度学习 算法 程序员
Dataset之GermanCreditData:GermanCreditData数据集的简介、下载、使用方法之详细攻略
Dataset之GermanCreditData:GermanCreditData数据集的简介、下载、使用方法之详细攻略
Dataset之GermanCreditData:GermanCreditData数据集的简介、下载、使用方法之详细攻略
|
算法 数据可视化
Dataset:GiveMeSomeCredit数据集的简介、下载、使用方法之详细攻略
Dataset:GiveMeSomeCredit数据集的简介、下载、使用方法之详细攻略
|
机器学习/深度学习 算法 图形学
Dataset:fetch_20newsgroups(20类新闻文本)数据集的简介、安装、使用方法之详细攻略
Dataset:fetch_20newsgroups(20类新闻文本)数据集的简介、安装、使用方法之详细攻略
|
传感器 编解码 算法
Dataset之MapillaryVistas:MapillaryVistas数据集的简介、下载、使用方法之详细攻略
Dataset之MapillaryVistas:MapillaryVistas数据集的简介、下载、使用方法之详细攻略
Dataset之MapillaryVistas:MapillaryVistas数据集的简介、下载、使用方法之详细攻略
|
算法 数据库
Dataset之CamVid:CamVid数据集的简介、下载、使用方法之详细攻略
Dataset之CamVid:CamVid数据集的简介、下载、使用方法之详细攻略
Dataset之CamVid:CamVid数据集的简介、下载、使用方法之详细攻略
|
机器学习/深度学习 数据挖掘 TensorFlow
Dataset之Knifey-Spoony:Knifey-Spoony数据集的简介、下载、使用方法之详细攻略
Dataset之Knifey-Spoony:Knifey-Spoony数据集的简介、下载、使用方法之详细攻略
|
计算机视觉
Dataset之WebVision:WebVision数据集简介、下载、使用方法之详细攻略
Dataset之WebVision:WebVision数据集简介、下载、使用方法之详细攻略
Dataset之WebVision:WebVision数据集简介、下载、使用方法之详细攻略
Dataset之Facades:Facades数据集的简介、安装、使用方法之详细攻略
Dataset之Facades:Facades数据集的简介、安装、使用方法之详细攻略
Dataset之Facades:Facades数据集的简介、安装、使用方法之详细攻略