admin管理员组文章数量:1660208
https://github/BoyuanJiang/Age-Gender-Estimate-TF
0.环境
ubuntu16.04
python3.6
tensorflow==1.10.0
dlib==19.8.1
opencv-python==4.1.0.25
matplotlib==3.3.1
imutils==0.4.3
numpy==1.19.2
pandas==1.1.2
scipy
scikit-learn
scikit-image
tqdm
1.准备与处理数据
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。
处理数据,首先修改convert_to_records_multiCPU.py,在line 120行替换为如下:
'file_name': _bytes_feature(bytes(file_name[index][0], 'utf-8'))}))
再运行下面的,转换为tfrecord:
python convert_to_records_multiCPU.py --imdb --nworks 8
(这个过程太漫长了,一度以为出错了。7个多小时)
以/data/train目录为例:
2.准备预训练模型
https://pan.baidu/s/1dFewgqH(大概80多M),按照作者的要求,放到models目录下。
cp ./weight_from_facenet_20170512-110547.zip ./models/
cd models/ && unzip ./weight_from_facenet_20170512-110547.zip && cd ..
3.训练
CUDA_VISIBLE_DEVICES=1 python train.py --lr 1e-3 --weight_decay 1e-5 --epoch 6 --batch_size 128 --keep_prob 0.8 --cuda
这是作者复现的tensorboard可视化结果。
4.测试
测试部分作者写得很详细:
https://github/BoyuanJiang/Age-Gender-Estimate-TF
版权声明:本文标题:【人脸属性】Age-Gender-Estimate-TF复现步骤 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1729850122a1215297.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论