All Projects → bleakie → Maskinsightface

bleakie / Maskinsightface

Licence: apache-2.0
基于人脸关键区域提取的人脸识别(LFW:99.82%+ CFP_FP:98.50%+ AgeDB30:98.25%+)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Maskinsightface

Instabotai
Instagram AI bot with face detection. It works without instagram api, need only login and password.
Stars: ✭ 181 (-18.1%)
Mutual labels:  face-recognition
Viewfacecore
C# 超简单的人脸识别库。
Stars: ✭ 193 (-12.67%)
Mutual labels:  face-recognition
Esp32 Cam Webserver
Expanded version of the Espressif ESP webcam
Stars: ✭ 200 (-9.5%)
Mutual labels:  face-recognition
Hms Ml Demo
HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
Stars: ✭ 187 (-15.38%)
Mutual labels:  face-recognition
Facerecognition
Webcam face recognition using tensorflow and opencv
Stars: ✭ 192 (-13.12%)
Mutual labels:  face-recognition
Marvel
Marvel - Face Recognition With Android & OpenCV
Stars: ✭ 199 (-9.95%)
Mutual labels:  face-recognition
Facegan
TF implementation of our ECCV 2018 paper: Semi-supervised Adversarial Learning to Generate Photorealistic Face Images of New Identities from 3D Morphable Model
Stars: ✭ 176 (-20.36%)
Mutual labels:  face-recognition
Howdy
🛡️ Windows Hello™ style facial authentication for Linux
Stars: ✭ 3,237 (+1364.71%)
Mutual labels:  face-recognition
Face Nn
游戏捏脸,基于神经风格迁移框架生成逼真人脸
Stars: ✭ 192 (-13.12%)
Mutual labels:  face-recognition
Facerecognition
Implement face recognition using PCA, LDA and LPP
Stars: ✭ 206 (-6.79%)
Mutual labels:  face-recognition
Mobile Id
Deep Face Model Compression
Stars: ✭ 187 (-15.38%)
Mutual labels:  face-recognition
Tf Insightface
A better tensorflow implementation of deepinsight, aiming at smoothly production ready for cross-platforms. Currently only with inference, training code later.
Stars: ✭ 191 (-13.57%)
Mutual labels:  face-recognition
Arcface Multiplex Recognition
适用于复杂场景的人脸识别身份认证系统
Stars: ✭ 200 (-9.5%)
Mutual labels:  face-recognition
Opencv Course
Learn OpenCV in 4 Hours - Code used in my Python and OpenCV course on freeCodeCamp.
Stars: ✭ 185 (-16.29%)
Mutual labels:  face-recognition
Face.evolve.pytorch
🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥
Stars: ✭ 2,719 (+1130.32%)
Mutual labels:  face-recognition
Movie rating prediction
Predict movie's IMDB rating
Stars: ✭ 177 (-19.91%)
Mutual labels:  face-recognition
Mediadevices
Go implementation of the MediaDevices API.
Stars: ✭ 197 (-10.86%)
Mutual labels:  face-recognition
Face recognition py
基于OpenCV的视频人脸识别
Stars: ✭ 215 (-2.71%)
Mutual labels:  face-recognition
Mobilefacenet pytorch
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
Stars: ✭ 209 (-5.43%)
Mutual labels:  face-recognition
Ros people object detection tensorflow
An extensive ROS toolbox for object detection & tracking and face/action recognition with 2D and 3D support which makes your Robot understand the environment
Stars: ✭ 202 (-8.6%)
Mutual labels:  face-recognition

insightface制作自己的数据及其训练

2021.03.03: 更新insightface TensorRT模型,trt模型与原版差距<0.01,参考InsightFace-REST

2020.04.09: 更新基于SSR-Net的性别和年龄预测网络,在私有数据集上gender(98.53), age_mae(3.29),原作者SSR-Net

2019.12.30: 更新MobileFaceNet的训练模型,参考> ZQCNN ,人脸检测+landmark可参考CenterMulti,效果更好,而且支持landmark的confidence

2019.12.10: 更新VarGFaceNet的训练模型,参考VarGFaceNet

2019.10.21: 更新人脸检测模型,检测器是基于SSH,相较于原版检测,该版本主要更新了误检

2019.10.01: 公布人脸识别模型,模型基于glint和私有数据训练,在私有数据上拥有0.88的F1-score,insightface原始模型0.56

说明:算法集成insightface:insightface

改进地方:ssh(人脸检测)+prnet(68 landmark 人脸对齐, 3d人脸mask)+insightface

(1)修改人脸检测器(优化后的SSH,误检率更低,对大角度和blur的face进行过滤)
(2)使用68个点的landmark,prnet的对齐效果更准
(3)利用prnet拟合有效区域的人脸位置,抠出背景,以平均人脸像素填充背景,减少噪声影响,会在图片质量较好的情况下提高识别

MASK0

MASK1

0.安装

(1)mxnet
(2)tensorflow

1.生成对齐后的数据集

1.1.数据下载

Data deepglint 数据集集合 insightface
Url download download download

cd make_rec

1.2.生成,'.lst, .rec, .idx, property'

(1)为了合并数据,可采用generate_lst.sh

(2)property是属性文件,里面内容是类别数和图像大小,例如

1000,112,112 其中1000代表人脸的类别数目,图片格式为112x112(一直都不知道怎么自动生成这个,我是自己写的)

(3)sh generate_lst.sh

1.3.生成测试文件.bin

python gen_valdatasets.py

1.4.生成数据

python3 gen_datasets.py  #完成后会output下生成train.lst

2.验证model精度

2.1.在bash

python3 -u ./src/eval/verification.py --gpu 0 --model "./models/glint-mobilenet/model,1" --target 'lfw'

2.2.快捷

sh verification.sh

3.训练

3.1.在bash里面训练

CUDA_VISIBLE_DEVICES='2,3,4,5' python3 -u train.py --network r100 --loss arcface --per-batch-size 64 2>&1 > log.log &

3.2.如果想要合并不同数据集

CUDA_VISIBLE_DEVICES=0 python3 src/data/dataset_merge.py --include 001_data,002_data --output ms1m+vgg --model ../../models/model,1

4.result

4.1 Resnet训练

network backbone: r100 ( output=E, emb_size=512, prelu )
loss function: arcface(m=0.5)
batch-size:256, 4gpu, config.fc7_wd_mult = 10
lr = 0.004, lr_steps [105000, 125000, 150000], default.wd = 0.0005, end with 180001,
then retrain with lr = 0.0004, lr_steps[200000, 300000, 400000], default.wd = 0.00001
Data LFW CFP_FP AgeDB30
ACCU(%) 99.82+ 98.50+ 98.25+

4.2 MobileFacenet训练

#!/usr/bin/env bash
export CUDA_VISIBLE_DEVICES=0,1,2,3
set MXNET_CUDNN_AUTOTUNE_DEFAULT=0
set MXNET_ENGINE_TYPE=ThreadedEnginePerDevice
set MXNET_CPU_WORKER_NTHREADS=8
# train softmax
#nohup python3 -u train_softmax.py --network y1 --margin-s 32.0 --margin-m 0.1 --ckpt 1 --loss-type 0 --lr-steps 240000,360000,440000 --wd 0.00004 --fc7-wd-mult 10 --per-batch-size 80 --emb-size 256 --version-output GDC --data-dir ../../datasets/glint-shimao-id-zhaohang-output --prefix ../models/y2/mobilefacenet-res4-8-16-4-dim256 --target 'agedb_30,img_ours-retina-5' --max-steps 140002 2>&1 > mobilenet-1.log &
# train arcface
nohup python3 -u train_softmax.py --network y1 --margin-s 64.0 --margin-m 0.5 --ckpt 1 --loss-type 4 --lr-steps 600000,800000,1000000 --wd 0.00004 --fc7-wd-mult 10.0 --per-batch-size 48  --emb-size 256 --version-output GDC --data-dir ../../datasets/glint-shimao-id-zhaohang-output --prefix ../models/y2/y2-4-8-16-4-dim256 --pretrained ../models/y2/mobilefacenet-res4-8-16-4-dim256/mobilefacenet-res4-8-16-4-dim256,62 --target 'agedb_30,img_ours-retina-5' --max-steps 1200002 2>&1 > mobilenet-2.log &

5.预训练模型

5.1. 人脸检测

(1) SSH: 人脸检测模型请参见mxnet-ssh-face-detection(在自有数据集上标定+修改部分训练参数,可在FDDB上取得98.7%)

(2) CenterMulti: 人脸检测+landmark可参考CenterMulti,效果更好,而且支持landmark的confidence

5.2. mask人脸识别预训练模型

模型基于glint和私有数据训练,backbone resnet152,在私有数据上拥有0.88的F1-score,insightface原始模型0.56,因为进行了私有数据的增强训练,在开源测试集上效果一般 google baidu,提取码: enph

5.3. VarGFaceNet预训练模型

使用RetinaFace的5点landmark对齐src/common/face_align_util.py/ARC_FACE(没有使用mask) baidu,提取码: ds3c

5.4. MobileFaceNet预训练模型,使用RetinaFace的5点landmark对齐src/common/face_align_util.py/ARC_FACE(没有使用mask),res4-8-16-4-dim256在个人测试集上效果更好

Backbone CFP_FP(%) AGE_db30(%) Speed(ms) Download
y2-res2-6-10-2-dim256 97.18 97.52 22 model
y2-res4-8-16-4-dim256 98.03 98.30 33 model

Todo

  1. 释放训练好的模型(PRNET,更新人脸检测模型基于Retina的RetinaDetection 链接:https://github.com/bleakie/RetinaDetector

  2. 近期会更新新的静默活体识别模型

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].