IMDB-WIKI人脸数据集说明

IMDB-WIKI人脸数据集说明

flyfish

数据来源两个地方 IMDb和Wikipedia

IMDb介绍

IMDb全称是互联网电影资料库(Internet Movie Database)是一个关于电影演员、电影、电视节目、电视明星和电影制作的在线数据库。
数据集中总共有523,051张面部图像,其中从IMDB的20,284名名人和维基百科的62,328名名人获得了460,723张面部图像。

关于两个网站的数据集处理

一、www.imdb.com

我们获取了IMDB网站(www.imdb.com)上最出名的10万个演员列表,并自动爬取他们的档案出生日期、图片和注释。我们移除没有时间戳(即照该图片的拍照日期)的图片,以及一张图片上有多个高分人脸检测的图片。假设该单一人脸图像能够显示演员,并且图片的时间戳和出生日期是正确的,我们就能够计算出该图片人脸的生理(真实)年龄。因为错误的时间戳,许多图片都是电影的剧照,可能延长制作时间,因此会导致时间戳不准,所以我们不能保证赋值的年龄信息的准确性。。总之我们从IMDB中获得了461871张名人的人脸图片。

二、en.wikipedia.org

对于Wikipedia网站(en.wikipedia.org),我们从人物网页中爬取了所有的外在图片,并且根据应用在IMDB中的相同的准则去过滤这些图像,最后得到62359张图片。在表1中我们总结了发布的IMDB-WIKI数据集:
总之有524230张带着爬取年龄信息的人脸图像。这些图像中的一部分(尤其是从IMDB中来的)包含了多个人脸,防止误检,我们仅使用他们中第二个最强的人脸检测分数在阈值下的图像。为了使网络对所有年龄一视同仁,我们使年龄分布相等,即我们随机忽略了最常见年龄的一些图像。因此最后留给我们的CNNs的仅有260282张训练图像。

关于年龄的类别

1、真实年龄,翻译是 Actual age、biological age、 real age,根据出生日期计算
2、外貌年龄,翻译是Apparent age,看人的外貌表现出来的年龄

解释标注文件

mat格式用法
对于IMDb和维基百科图像,可以加载包含所有元信息的Matlab格式的文件,存储在一个单独的.mat文件中。格式如下:

    dob:出生日期(Matlab序列号)
    photo_taken:拍摄照片的年份
    full_path:文件路径
    性别:女性为0,男性为1,NaN为未知
    名称:名人的名字
    face_location:脸的位置。在Matlab运行中裁剪脸部
    img(face_location(2):face_location(4),face_location(1):face_location(3),:))

    face_score:检测器得分(越高越好)。Inf意味着在图像中没有找到任何脸,而face_location则只返回整个图像
    second_face_score:具有第二高分的脸部检测器分数。这对于忽略具有多个脸部的图像很有用。如果没有检测到第二面,则second_face_score为NaN。
    celeb_names(仅限IMDB):所有名人名单的列表
    celeb_id(仅限IMDB):名人名称的索引
    
一个人的年龄可以根据出生日期和拍照时间计算:假设照片是在年中拍摄的(in the middle of the year)
[年龄,〜] = datevec(datenum(wiki.photo_taken,7,1)-wiki.dob); 

可以不使用matlab加载,使用scipy.io


```python
import scipy.io as io
mat_path="./imdb/a.mat"
mat=io.loadmat(mat_path)['imdb'][0][0]
for a, b, c, d, e, f, g, h, i,j \
        in zip(mat[0][0], mat[1][0], mat[2][0], mat[3][0], mat[4][0], mat[5][0] ,mat[6][0], mat[7][0],mat[8][0],mat[9][0]):
    print(a, b, c, d, e, f, g, h, i,j )
    break

标注文件mat的样子

{'__header__': b'MATLAB 5.0 MAT-file, Platform: GLNXA64, Created on: Sun Jan 17 11:30:27 2016', '__version__': '1.0', '__globals__': [], 'imdb': array([[(array([[693726, 693726, 693726, ..., 726831, 726831, 726831]], dtype=int32), array([[1968, 1970, 1968, ..., 2011, 2011, 2011]], dtype=uint16), array([[array(['01/nm0000001_rm124825600_1899-5-10_1968.jpg'], dtype='),
        array(['01/nm0000001_rm3343756032_1899-5-10_1970.jpg'], dtype='),
        array(['01/nm0000001_rm577153792_1899-5-10_1968.jpg'], dtype='),
        ...,
        array(['08/nm3994408_rm926592512_1989-12-29_2011.jpg'], dtype='),
        array(['08/nm3994408_rm943369728_1989-12-29_2011.jpg'], dtype='),
        array(['08/nm3994408_rm976924160_1989-12-29_2011.jpg'], dtype=')]],
      dtype=object), array([[1., 1., 1., ..., 0., 0., 0.]]), array([[array(['Fred Astaire'], dtype='),
        array(['Fred Astaire'], dtype='),
        array(['Fred Astaire'], dtype='), ...,
        array(['Jane Levy'], dtype='),
        array(['Jane Levy'], dtype='),
        array(['Jane Levy'], dtype=')]], dtype=object), array([[array([[1072.926,  161.838, 1214.784,  303.696]]),
        array([[477.184, 100.352, 622.592, 245.76 ]]),
        array([[114.96964309, 114.96964309, 451.68657236, 451.68657236]]),
        ..., array([[  1,   1, 453, 640]], dtype=uint16),
        array([[144.75225472, 126.76472288, 305.78804127, 287.80050943]]),
        array([[457.524,  41.748, 518.016, 102.24 ]])]], dtype=object), array([[1.45969291, 2.5431976 , 3.45557949, ...,       -inf, 4.45072452,
        2.13350269]]), array([[1.11897336, 1.85200773, 2.98566022, ...,        nan,        nan,
               nan]]), array([[array(["'Lee' George Quinones"], dtype='),
        array(["'Weird Al' Yankovic"], dtype='),
        array(['2 Chainz'], dtype='), ...,
        array(['Éric Caravaca'], dtype='),
        array(['Ólafur Darri Ólafsson'], dtype='),
        array(['Óscar Jaenada'], dtype=')]], dtype=object), array([[6488, 6488, 6488, ..., 8410, 8410, 8410]], dtype=uint16))]],
      dtype=[('dob', 'O'), ('photo_taken', 'O'), ('full_path', 'O'), ('gender', 'O'), ('name', 'O'), ('face_location', 'O'), ('face_score', 'O'), ('second_face_score', 'O'), ('celeb_names', 'O'), ('celeb_id', 'O')])}

按照表格方式输出mat文件中一些数据

693726 1968 ['01/nm0000001_rm124825600_1899-5-10_1968.jpg'] 1.0 ['Fred Astaire'] [[1072.926  161.838 1214.784  303.696]] 1.4596929136202572 1.1189733571573068 ["'Lee' George Quinones"] 6488
693726 1970 ['01/nm0000001_rm3343756032_1899-5-10_1970.jpg'] 1.0 ['Fred Astaire'] [[477.184 100.352 622.592 245.76 ]] 2.5431975987694435 1.852007728341101 ["'Weird Al' Yankovic"] 6488
693726 1968 ['01/nm0000001_rm577153792_1899-5-10_1968.jpg'] 1.0 ['Fred Astaire'] [[114.96964309 114.96964309 451.68657236 451.68657236]] 3.455579487909806 2.9856602160994425 ['2 Chainz'] 6488
693726 1968 ['01/nm0000001_rm946909184_1899-5-10_1968.jpg'] 1.0 ['Fred Astaire'] [[622.88550564 424.21750384 844.33900767 645.67100587]] 1.872117169344902 nan ['50 Cent'] 6488
693726 1968 ['01/nm0000001_rm980463616_1899-5-10_1968.jpg'] 1.0 ['Fred Astaire'] [[1013.85900236  233.88204221 1201.5861278   421.60916765]] 1.1587657871914132 nan ['A Martinez'] 6488
702986 1991 ['02/nm0000002_rm1075631616_1924-9-16_1991.jpg'] 0.0 ['Lauren Bacall'] [[ 686.67682059  458.46721373 1198.10043604  969.89082917]] 3.4905630909496344 1.3453352771625287 ['A.D. Miles'] 11516
702986 2004 ['02/nm0000002_rm1346607872_1924-9-16_2004.jpg'] 0.0 ['Lauren Bacall'] [[ 78.23569407  52.33512938 194.25423516 168.35367048]] 3.4791889134154426 nan ['A.J. Buckley'] 11516
702986 2004 ['02/nm0000002_rm1363385088_1924-9-16_2004.jpg'] 0.0 ['Lauren Bacall'] [[ 64.30867104  64.30867104 207.26768087 207.26768087]] 3.87017062712482 nan ['A.J. Cook'] 11516
702986 1991 ['02/nm0000002_rm1411175936_1924-9-16_1991.jpg'] 0.0 ['Lauren Bacall'] [[ 212.76723692 1055.64418461  526.79809231 1357.824     ]] 3.786498646396679 3.6297041401689754 ['A.J. Johnson'] 11516
702986 2004 ['02/nm0000002_rm1447271168_1924-9-16_2004.jpg'] 0.0 ['Lauren Bacall'] [[242.176  49.664 278.528  86.016]] 3.472943641929206 2.9451325883872235 ['A.J. Langer'] 11516
702986 2008 ['02/nm0000002_rm1624085760_1924-9-16_2008.jpg'] 0.0 ['Lauren Bacall'] [[108.03894851  28.82624961 158.4253978   79.2126989 ]] 3.862810681579513 1.5253068067046478 ['A.J. McLean'] 11516
702986 1991 ['02/nm0000002_rm1646056960_1924-9-16_1991.jpg'] 0.0 ['Lauren Bacall'] [[  72.28774564 1055.64418461  386.31860102 1366.016     ]] 3.767166077822234 3.4634604907317743 ['A.J. Saudin'] 11516
702986 1974 ['02/nm0000002_rm221957120_1924-9-16_1974.jpg'] 0.0 ['Lauren Bacall'] [[3173.14469259  401.04083657 4059.15207489 1287.04821887]] 4.0964305784174595 nan ['A.J. Trauth'] 11516
702986 2007 ['02/nm0000002_rm2287049216_1924-9-16_2007.jpg'] 0.0 ['Lauren Bacall'] [[138.80620248  33.92673853 181.15543773  76.27597378]] 3.482030102193067 nan ['A.R. Rahman'] 11516
702986 1974 ['02/nm0000002_rm238734336_1924-9-16_1974.jpg'] 0.0 ['Lauren Bacall'] [[2135.21778394  765.85377998 3499.48578791 2130.12178394]] 4.86542134035104 nan ['AJ Bowen'] 11516
702986 2006 ['02/nm0000002_rm2585828096_1924-9-16_2006.jpg'] 0.0 ['Lauren Bacall'] [[ 70.08922574  87.46603217 225.89848365 243.27529008]] 5.414545418118097 nan ['AJ Michalka'] 11516
702986 2006 ['02/nm0000002_rm2602605312_1924-9-16_2006.jpg'] 0.0 ['Lauren Bacall'] [[ 52.186 121.05  129.12  197.984]] 4.349961336330576 3.2055228809775476 ['Aaliyah'] 11516

参考
https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/

你可能感兴趣的:(深度学习)