人脸识别系列方法调研

一、基于mtcnn和facenet的实时人脸检测与识别系统开发A++)

        https://zhuanlan.zhihu.com/p/25025596

 

       该系统基于python/ opencv2/ tensorflow/ Linux环境,实现了从摄像头读取视频,实时检测人脸,识别人脸的功能。检测、识别

 

       人脸检测:本文中采用mtcnn是基于python和tensorflow的实现(代码来自于davidsandbergcaffe实现代码参见:kpzhang93

       facenet embedding(映射):Facenet是谷歌研发的人脸识别系统,该系统是基于百万级人脸数据训练的深度卷积神经网络,可以将人脸图像embedding(映射)成128维度的特征向量。本文采用的是davidsandberg基于FaceScrub and CASIA-WebFace数据集预训练的Facenet模型,LFW测试集准确率为0.98。

       人脸识别:对人脸进行embedding后,得到128维度的特征向量 。以该特征向量为基础,可以采用任何机器学习的方法进行分类和识别。本文中,选取了knnk-NearestNeighbor)方法(你可以换其它任何分类方法,比如svm或者神经网络方法等)。本文中,采用了sklearn库实现knn模型的训练和预测。

 

       怎么运行test文件夹:A description of how to run the test can be found on the page Validate on LFW.

       mtcnn论文:https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html

代码就是Matlab/Caffe

       facenet论文:https://arxiv.org/abs/1503.03832

                               部分摘要: To train, we use triplets of roughly aligned matching / non-matching face patches generated using a novel online triplet mining method. The benefit of our approach is much greater representational efficiency: we achieve state-of-the-art face recognition performance using only 128-bytes per face. On the widely used Labeled Faces in the Wild (LFW) dataset, our system achieves a new record accuracy of 99.63%. On YouTube Faces DB it achieves 95.12%. Our system cuts the error rate in comparison to the best published result by 30% on both datasets. 

                             知乎中文facenet解析:https://zhuanlan.zhihu.com/p/24837264

 

       LFW     0.9963    0.98

人脸识别系列方法调研
人脸识别系列方法调研

       model   mtcnn

                       Python/Tensorflow     https://github.com/davidsandberg/facenet/tree/master/src/align

                        Matlab/Caffe

https://github.com/kpzhang93/MTCNN_face_detection_alignment

 

                        facenetInception-ResNet-v1 model)

https://github.com/davidsandberg/facenet/blob/master/src/models/inception_resnet_v1.py

        

         二进制文件  无

         每张图片识别时间only 128-bytes per face

 

二、MTCNN_face_detection_alignment

        https://github.com/kpzhang93/MTCNN_face_detection_alignment

       Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks。检测、对齐

       基于python/ caffe/ Linux环境

    Requirement

1. Caffe: Linux OS: https://github.com/BVLC/caffe. Windows OS: https://github.com/BVLC/caffe/tree/windows or https://github.com/happynear/caffe-windows

2. Pdollar toolbox: https://github.com/pdollar/toolbox

3. Matlab 2014b or later

4. Cuda (if use nvidia gpu)

人脸识别系列方法调研 人脸识别系列方法调研

 

 

三、facenet

      This is a TensorFlow implementation of the face recognizer described in the paper "FaceNet: A Unified Embedding for Face Recognition and Clustering". The project also uses ideas from the paper "A Discriminative Feature Learning Approach for Deep Face Recognition" as well as the paper "Deep Face Recognition" from the Visual Geometry Group at Oxford.

     https://github.com/davidsandberg/facenet

    训练集: CASIA-WebFace

     预处理:Face alignment using MTCNN

 

四、LCNN_TRAIN (A+)

      训练论文"A Lightened CNN for Deep Face Representation"中的网络。

       https://github.com/Tonyfy/LCNN_TRAIN

      基于python/ caffe/ windows环境

     (对齐、识别

      训练集:CASIA-Webface

      测试集:lfw

 人脸识别系列方法调研人脸识别系列方法调研

 人脸识别系列方法调研

 人脸识别系列方法调研人脸识别系列方法调研人脸识别系列方法调研

 

五、DeepFaceA+)

      Face analysis mainly based on Caffe. At this time, face analysis tasks like detection, alignment and recognition have been done.

       https://github.com/RiweiChen/DeepFace

      ****:http://blog.****.net/chenriwei2/article/category/3146215

      基于python/ caffe/ Linux环境

     (检测、对齐、识别

 

      人脸检测 baseline:基于滑动窗口的人脸检测,将训练好了的网络改为全卷积网络,然后利用全卷积网络对于任意大小的图像输入,进行获取输出HeapMap。

 人脸识别系列方法调研人脸识别系列方法调研

人脸关键点检测 try1_1: 基于DeepID网络结构的人脸关键点检测

 人脸识别系列方法调研人脸识别系列方法调研

人脸验证 deepid: 基于DeepID网络结构的人脸验证

 人脸识别系列方法调研人脸识别系列方法调研

 

LFW 0.826333333333

             http://blog.****.net/chenriwei2/article/details/49500687

            实验的结果没有理想中的那么好,主要的原因分为几个: 
            1、数据集不够好:有较多的噪声数据 
            2、数据集合不平衡:每个人的图片个数从几十张到几百张不等。 
            3、网络结构没优化:原始的DeepID的大小为:48*48,而我选择的人脸图像大小为64*64,                  网络结构却没有相对应的调整。(主要影响在于全连接层的个数太多了)

model  检测

https://github.com/RiweiChen/DeepFace/tree/master/FaceDetection/baseline 

                对齐

https://github.com/RiweiChen/DeepFace/tree/master/FaceAlignment/Model/try1_2

                识别

FaceRecognition文件夹下没找到

 

二进制文件  无

每张图片识别时间

 

 

 

六、mxnet_mtcnn_face_detection (B)

   https://github.com/pangyupo/mxnet_mtcnn_face_detection

  基于python/ mxnetopencv/ Linux环境

     (检测、对齐   不确定多人脸的行不行

 人脸识别系列方法调研人脸识别系列方法调研

 人脸识别系列方法调研人脸识别系列方法调研

 

 

 

七、face_recognition (A+)

       https://github.com/ageitgey/face_recognition

      基于python/ macOS or Linux (Windows untested)环境
     检测、对齐、识别   

 人脸识别系列方法调研人脸识别系列方法调研

 人脸识别系列方法调研人脸识别系列方法调研

 人脸识别系列方法调研人脸识别系列方法调研

 

LFW 99.38%

model

二进制文件  face_recognition 包

每张图片识别时间


 

 

八、face_recognition (A+)

      使用李子青团队的webface人脸数据集,根据汤晓欧团队的DeepID网络,通过Caffe训练出模型参数,经过LFW二分类得到人脸识别准确率。

       https://github.com/hqli/face_recognition

      基于python/ caffe/ 平台未知 环境
     检测、对齐、识别 

人脸数据集

李子青团队的webface

· 下载网址:http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html

· 10,575个人,494,414幅图像

· 需要申请,个人申请无效,需要学校部门的领导或者代表。

图像预处理

对包含人脸的图像进行人脸框识别,人脸对齐和人脸剪裁。

原理

· 人脸框识别

· 人脸对齐

· 人脸剪裁

实现

· 下载webface

· 根据预处理工具进行人脸框检测,人脸对齐。

预处理工具是其他人写的,地址:https://github.com/RiweiChen/FaceTools

根据香港中文大学提供的人脸框检测和人脸特征点检测的windows二进制程序实现。

§ http://mmlab.ie.cuhk.edu.hk/archive/CNN_FacePoint.htm

caffe训练

根据DeepID的网络使用caffe训练得到模型参数。

原理

· 对原始数据分离训练集和测试集

· 转换为caffe可以处理的lmdb格式

· 根据设定的Net网络和Solver配置文件进行训练

· 得到训练的模型

实现

· 修改DeepID.py中demo(num)方法中的人脸对齐后的文件夹以及最后一行的中训练的人数(1-10575)。

· 执行以下代码

   python DeepID.py

人脸识别检测

检验训练好的模型,得到LFW的人脸准确率。

原理

· 根据http://vis-www.cs.umass.edu/lfw/提供的数据集以及pairs.txt得到需要检验的6000对图像(3000对相同人脸,3000对不同人脸)

· 分别将对应的两个图像分别作为训练好的模型输入,得到两个160维的特征向量。6000对图像依次进行操作,共得到6000对160维特征向量。

· 计算对应的特征向量的余弦距离(或欧式距离等其他距离),6000对图像依次进行该操作,得到6000个余弦距离(或欧式距离等其他距离),通过选择阈值得到人脸识别的准确率。

实现

· 下载lfwcrop_color.zip

   http://conradsanderson.id.au/lfwcrop/lfwcrop_color.zip

· 修改DeepIDTest.py中demo_test方法中caffepath,lfwpath等相关路径,以及最后一行的中训练的人数与所用模型的迭代次数。

· caffe_path(一般为~/caffe-master)下,执行以下代码

   python DeepIDTest.py




九、LBP-DBN-face-recognitionB)

      使用LBP特征提取算法提取人脸特征,DBN网络来实现人脸识别,测试数据库ORL数据库,识别率可达90%以上。

       https://github.com/lu-jian-dong/LBP-DBN-face-recognition

      基于matlab/ DBN/ 平台未知 环境
     识别 

      时间比较久远,但是LBP、DBN的知识介绍的很详细,之后论文可能会用到

 

十、

LoveLiveFaceRecognition (A)

       https://github.com/inlmouse/LoveLiveFaceRecognition

      基于python/ caffe/ Windows 环境
     识别 

 人脸识别系列方法调研

 人脸识别系列方法调研

 

 

十一、SeetaFaceEngine (A+)

          seetaface由中科院计算所山世光研究员带领的人脸识别研究组研发。代码基于C++实现,不依赖第三方库。SeetaFace人脸识别引擎包括了搭建一套全自动人脸识别系统所需的三个核心模块, 
即:人脸检测模块SeetaFace Detection、面部特征点定位模块SeetaFace Alignment以及人脸特征提取与比对模块 SeetaFace Identification。 

         主要功能: 
1.人脸检测模块(SeetaFace Detection): 采用了一种结合传统人造特征与多层感知机(MLP)的级联结构,在FDDB上达到了84.4%的召回率(100个误检时),并可在单个i7 CPU上实时处理VGA分辨率的图像。 
2.面部特征点定位模块(SeetaFace Alignment): 通过级联多个深度模型(栈式自编码网络)来回归5个关键特征点(两眼中心、鼻尖和两个嘴角)的位置,在AFLW数据库上达到state-of-the-art的精度,定位速度在单个i7 CPU上超过200fps。 
3.人脸识别模块(SeetaFace Identification): 采用一个9层的卷积神经网络(CNN)来提取人脸特征,在LFW数据库上达到97.1%的精度(注:采用SeetaFace人脸检测和SeetaFace面部特征点定位作为前端进行全自动识别的情况下),特征提取速度为每图120ms(在单个i7 CPU上)。

         https://github.com/seetaface/SeetaFaceEngine

          http://blog.****.net/wuzuyu365/article/details/52574365

         基于C++/ windows 环境
        检测、对齐、识别 

 人脸识别系列方法调研

 人脸识别系列方法调研

 

十二、FaceVerificationA+)

         A messy code for developing a face verfication program.It includes a C++ face detection / alignment program, joint bayesian and several supplementary codes. 

         https://github.com/happynear/FaceVerification

        基于C++/ caffe/ 平台未知环境
        检测、对齐、识别 

Progress

1. Training DeepID (pure softmax network).

    create database. done.

    iteration 360,000, lr=0.01,

    lfw verification: L2 : 95.9%, jb :

    iteration 500,000, lr=0.001,

    lfw verification: L2 : 96.8%, jb : 93.3% (strongly overfit, it's >99% for lfw training set).

    iteration 660,000, lr=0.0001,

    lfw verification: L2 : 96.78% (converged)

    Accuracy on training set is about 89.5%~91.5%. LFW result with L2 or cosine has reached what the paper claimed. Joint Bayesian seems to be strongly overfit. The main reason is that I only train Joint Bayesian on the lfw training set, not CASIA-WebFace. Joint Bayesian for over 10,000 classes is too costy for my PC.

    This model is public available now: http://pan.baidu.com/s/1qXhNOZE . Mean file is in http://pan.baidu.com/s/1eQYEJU6 .

    Another model with resolution of 64*64 is trained. By ensembling the two models, accuracy increases to 97.18%.


LFW 96.8%%

model http://pan.baidu.com/s/1qXhNOZE

二进制文件  无

每张图片识别时间