实战操刀
下载数据集
https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/imdb_crop.tar
https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/wiki_crop.tar
数据说明:https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/
解析元数据
元数据wiki.mat、imdab.mat是已matlab形式的mat文件存的,可以用scipy.io.loadmat读取。
属性 | 值 | 含义 |
---|---|---|
gender | nan/0/1 | 0 for female and 1 for male, NaN if unknown |
face_score | nan/float | NaN 没有人脸,得分越高越确定人脸 |
second_face_score | nan或float | 第二张人脸的的人,越高越确定,_NaN_ 表示没有第二张脸 |
dob | 不知道 | date of birth (Matlab serial date number)用来算age,有些age算出来超出常理。要丢弃 |
论文笔记
人脸图像的年龄估计技术研究
王先梅,综述,主要讲述深度学习前的人脸年龄估计的技术。包括特征提取和估计算法等,很全面。
基于卷积神经网络的人脸年龄估计算法
周旺,南京大学。主要使用显著图方式增强数据,并对数据倾斜部分的进行迁移学习训练。能学会数据增加方式和迁移学习。提供了开源做法的指引
人脸检测及人脸年龄与性别识别方法
张军挺,中国科学技术大学,faster r-cnn用cnn提取特征;多尺度LBP+AdaBoost;深度和传统方式都做了,rcnn也用了迁移学习的方法。提取后使用随机森林做预测
Deep expectation of real and apparent age from a single image without facial landmarks
LAP2015冠军,imdb-wiki数据提供者
旋转图片后,选择最高分的脸。
脸扩展40%的像素,以免脸的边缘到达图片边缘(padding时候有问题,也就是脸过大的问题),也使得所有图片保持一致。如果找不到脸,用整张图。
vgg16迁移
分类预测–>加权平均
Apparent Age Estimation from Face Images Combining General and Children-Specialized Deep Learning Models
LAP2016,人脸年龄v2比赛冠军
年龄编码的方式
##Apparent Age Estimation Using Ensemble of Deep Learning Models
LAP2016, 人脸年龄v2第5名
code
hog.py
1 | from skimage import feature as ft |
align.py
1 | # -*- coding: utf-8 -*- |
unify_meta_data.py
1 | # -*- coding: utf-8 -*- |
utils.py
1 | # utils.py |
svm.py
1 | import pandas as pd |
rfr.py
1 | import pandas as pd |
试验数据
各类特征pca512后,直接串连
LogisticRegression
LogisticRegression on hog(512) resulting mae: 12.534653
LogisticRegression on lbp(512) resulting mae: 12.316832
LogisticRegression on vgg(512) resulting mae: 5.792079
LogisticRegression on hog_lbp(1024) resulting mae: 12.564356
LogisticRegression on hog_vgg(1024) resulting mae: 4.762376
LogisticRegression on lbp_vgg(1024) resulting mae: 5.118812
LogisticRegression on hog_lbp_vgg(1536) resulting mae: 4.841584
LinearSVR
LinearSVR on hog(512) resulting mae: 13.975740
LinearSVR on lbp(512) resulting mae: 14.171815
LinearSVR on vgg(512) resulting mae: 6.477576
LinearSVR on hog_lbp(1024) resulting mae: 22.368721
LinearSVR on hog_vgg(1024) resulting mae: 9.580384
LinearSVR on lbp_vgg(1024) resulting mae: 11.537682
LinearSVR on hog_lbp_vgg(1536) resulting mae: 6.361257
SVR(rbf)
SVR on hog(512) resulting mae: 11.496392
SVR on lbp(512) resulting mae: 11.600109
SVR on vgg(512) resulting mae: 11.721817
SVR on hog_lbp(1024) resulting mae: 11.682743
SVR on hog_vgg(1024) resulting mae: 11.624635
SVR on lbp_vgg(1024) resulting mae: 11.608328
SVR on hog_lbp_vgg(1536) resulting mae: 11.349862
rf
RandomForestRegressor on hog(512) resulting mae: 11.234653
RandomForestRegressor on lbp(512) resulting mae: 12.245545
RandomForestRegressor on vgg(512) resulting mae: 5.855446
RandomForestRegressor on hog_lbp(1024) resulting mae: 10.981188
RandomForestRegressor on hog_vgg(1024) resulting mae: 5.754455
RandomForestRegressor on lbp_vgg(1024) resulting mae: 5.740594
RandomForestRegressor on hog_lbp_vgg(1536) resulting mae: 6.240594
ada
AdaBoostRegressor on hog(512) resulting mae: 11.469027
AdaBoostRegressor on lbp(512) resulting mae: 11.945927
AdaBoostRegressor on vgg(512) resulting mae: 6.560440
AdaBoostRegressor on hog_lbp(1024) resulting mae: 10.853807
AdaBoostRegressor on hog_vgg(1024) resulting mae: 6.464129
AdaBoostRegressor on lbp_vgg(1024) resulting mae: 6.640677
AdaBoostRegressor on hog_lbp_vgg(1536) resulting mae: 6.807597
直接串联融合
先全部pca skb-f_regression skb-mutual_info_regression
LinearSVR
LinearSVR on hog_lbp(300) resulting mae: 6.277855
LinearSVR on hog_vgg(300) resulting mae: 5.596323
LinearSVR on lbp_vgg(300) resulting mae: 6.167967
LinearSVR on hog_lbp_vgg(300) resulting mae: 5.759966
LinearSVR on hog_lbp(150) resulting mae: 5.891156
LinearSVR on hog_vgg(150) resulting mae: 5.809739
LinearSVR on lbp_vgg(150) resulting mae: 5.940609
LinearSVR on hog_lbp_vgg(150) resulting mae: 5.626772
LinearSVR on hog_lbp(60) resulting mae: 5.666367
LinearSVR on hog_vgg(60) resulting mae: 5.797798
LinearSVR on lbp_vgg(60) resulting mae: 6.250504
LinearSVR on hog_lbp_vgg(60) resulting mae: 5.709871
hog-pca512,lbp-pac512,vgg512后融合
PCA30+LDA30+f_regression30+mutual_info_regression30
LinearSVR on hog_lbp(120) resulting mae: 2.708872
LinearSVR on hog_vgg(120) resulting mae: 2.525526
LinearSVR on lbp_vgg(120) resulting mae: 2.654724
LinearSVR on hog_lbp_vgg(120) resulting mae: 4.254801
hog-1700+, lbp-16000+, vgg512融合
PCA30+LDA30+f_regression30+mutual_info_regression30
LinearSVR on hog_lbp(120) resulting mae: 3.564676
LinearSVR on hog_vgg(120) resulting mae: 3.800873
LinearSVR on lbp_vgg(120) resulting mae: 5.523058
LinearSVR on hog_lbp_vgg(120) resulting mae: 5.760532>