2022-03
:创建仓库,支持不同模型训练,支持大量可调整参数,支持step、cos学习率下降法、支持adam、sgd优化器选择、支持学习率根据batch_size自适应调整、新增图片裁剪。
模型 | 路径 |
---|---|
facenet | https://github.com/bubbliiiing/facenet-keras |
arcface | https://github.com/bubbliiiing/arcface-keras |
retinaface | https://github.com/bubbliiiing/retinaface-keras |
facenet + retinaface | https://github.com/bubbliiiing/facenet-retinaface-keras |
训练数据集 | 权值文件名称 | 测试数据集 | 输入图片大小 | accuracy | Validation rate |
---|---|---|---|---|---|
CASIA-WebFace | arcface_mobilenet.h5 | LFW | 112x112 | 99.00% | 0.95200+-0.02237 @ FAR=0.00100 |
CASIA-WebFace | arcface_mobilefacenet.h5 | LFW | 112x112 | 99.02% | 0.96500+-0.01344 @ FAR=0.00133 |
CASIA-WebFace | arcface_iresnet50.h5 | LFW | 112x112 | 98.98% | 0.92967+-0.01935 @ FAR=0.00133 |
tensorflow==1.13.2 keras=2.1.5
已经训练好的权值可以在百度网盘下载。
链接:https://pan.baidu.com/s/1P3-T6_PoXGTMYa_VuiwXmw 提取码: 114e
训练用的CASIA-WebFaces数据集以及评估用的LFW数据集可以在百度网盘下载。
链接: https://pan.baidu.com/s/1qMxFR8H_ih0xmY-rKgRejw 提取码: bcrq
img\1_001.jpg
img\1_002.jpg
img\1_001.jpg
img\1_002.jpg
_defaults = {
#--------------------------------------------------------------------------#
# 使用自己训练好的模型进行预测要修改model_path,指向logs文件夹下的权值文件
# 训练好后logs文件夹下存在多个权值文件,选择验证集损失较低的即可。
# 验证集损失较低不代表准确度较高,仅代表该权值在验证集上泛化性能较好。
#--------------------------------------------------------------------------#
"model_path" : "model_data/arcface_mobilefacenet.h5",
#-------------------------------------------#
# 输入图片的大小。
#-------------------------------------------#
"input_shape" : [112, 112, 3],
#-------------------------------------------#
# 所使用到的主干特征提取网络,与训练的相同
# mobilefacenet
# mobilenetv1
# iresnet50
#-------------------------------------------#
"backbone" : "mobilefacenet",
#-------------------------------------------#
# 是否进行不失真的resize
#-------------------------------------------#
"letterbox_image" : True,
}
img\1_001.jpg
img\1_002.jpg
|-datasets
|-people0
|-123.jpg
|-234.jpg
|-people1
|-345.jpg
|-456.jpg
|-...
https://github.com/deepinsight/insightface
https://github.com/timesler/facenet-pytorch