【人脸年龄估计】megaage_asian 数据集分析和论文阅读

数据集地址:https://aistudio.baidu.com/aistudio/datasetdetail/45324

├─list
  └─test_age.txt
  └─test_dis.txt
  └─test_name.txt
  └─train_age.txt
  └─train_dis.txt
  └─train_name.txt
├─train
└─val
└─labels.txt
└─train.txt
└─ val.txt

train、val 都是放的图片。
下面3个估计是上传这个数据集的人分的类。

在 list 文件夹下,值得注意的是 *dis.txt , 行数和训练的图像个数一样,列数为 70,表示 0-69 岁,每个都有一个概率,一起来表示该图像的 age。这个数据集并没有 gender 标签。

train_age.txt 和 test_age.txt 是真实年龄,从 0-69 岁

预处理代码:

import glob
import os
import shutil

img_lists = glob.glob('val/*.jpg') # train
out_dir = 'images/val' # train
label_txt = 'list/test_age.txt' # train
age_list = []
with open(label_txt, 'r') as f_age:
	for index, line in enumerate(f_age):
		age_list.append(int(line.strip()))

img_lists.sort(key=lambda x:int(os.path.basename(x).split('.jpg')[0]))

for img_path, age in zip(img_lists, age_list):
	if age < 18 or age > 60: # 只要 小于 18 大于 60 的
		out_img_name = 'megaage_asian_val_' + str(age) + '_' + os.path.basename(img_path) # train
		print(img_path)
		shutil.copy(img_path, os.path.join(out_dir, out_img_name))
原始题目 Quantifying Facial Age by Posterior of Age Comparisons
中文名称 通过年龄比较的 后验分布 来 量化人脸年龄
发表时间 2017 年 10 月 13 日
平台 bmvc2017
来源 商汤、香港中文大学信息工程系
文章链接 https://arxiv.org/pdf/1708.09687.pdf
开源代码 https://github.com/zyx2012/Age_estimation_BMVC2017(并无代码)
posted @ 2022-10-31 17:28  Zenith_Hugh  阅读(638)  评论(0)    收藏  举报