# Face Recognition using Tensorflow [![Build Status][travis-image]][travis]
[travis-image]: http://travis-ci.org/davidsandberg/facenet.svg?branch=master
[travis]: http://travis-ci.org/davidsandberg/facenet
This is a TensorFlow implementation of the face recognizer described in the paper
["FaceNet: A Unified Embedding for Face Recognition and Clustering"](http://arxiv.org/abs/1503.03832). The project also uses ideas from the paper ["Deep Face Recognition"](http://www.robots.ox.ac.uk/~vgg/publications/2015/Parkhi15/parkhi15.pdf) from the [Visual Geometry Group](http://www.robots.ox.ac.uk/~vgg/) at Oxford.
## Compatibility
The code is tested using Tensorflow r1.7 under Ubuntu 14.04 with Python 2.7 and Python 3.5. The test cases can be found [here](https://github.com/davidsandberg/facenet/tree/master/test) and the results can be found [here](http://travis-ci.org/davidsandberg/facenet).
## News
| Date | Update |
|----------|--------|
| 2018-04-10 | Added new models trained on Casia-WebFace and VGGFace2 (see below). Note that the models uses fixed image standardization (see [wiki](https://github.com/davidsandberg/facenet/wiki/Training-using-the-VGGFace2-dataset)). |
| 2018-03-31 | Added a new, more flexible input pipeline as well as a bunch of minor updates. |
| 2017-05-13 | Removed a bunch of older non-slim models. Moved the last bottleneck layer into the respective models. Corrected normalization of Center Loss. |
| 2017-05-06 | Added code to [train a classifier on your own images](https://github.com/davidsandberg/facenet/wiki/Train-a-classifier-on-own-images). Renamed facenet_train.py to train_tripletloss.py and facenet_train_classifier.py to train_softmax.py. |
| 2017-03-02 | Added pretrained models that generate 128-dimensional embeddings.|
| 2017-02-22 | Updated to Tensorflow r1.0. Added Continuous Integration using Travis-CI.|
| 2017-02-03 | Added models where only trainable variables has been stored in the checkpoint. These are therefore significantly smaller. |
| 2017-01-27 | Added a model trained on a subset of the MS-Celeb-1M dataset. The LFW accuracy of this model is around 0.994. |
| 2017‑01‑02 | Updated to run with Tensorflow r0.12. Not sure if it runs with older versions of Tensorflow though. |
## Pre-trained models
| Model name | LFW accuracy | Training dataset | Architecture |
|-----------------|--------------|------------------|-------------|
| [20180408-102900](https://drive.google.com/open?id=1R77HmFADxe87GmoLwzfgMu_HY0IhcyBz) | 0.9905 | CASIA-WebFace | [Inception ResNet v1](https://github.com/davidsandberg/facenet/blob/master/src/models/inception_resnet_v1.py) |
| [20180402-114759](https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-) | 0.9965 | VGGFace2 | [Inception ResNet v1](https://github.com/davidsandberg/facenet/blob/master/src/models/inception_resnet_v1.py) |
NOTE: If you use any of the models, please do not forget to give proper credit to those providing the training dataset as well.
## Inspiration
The code is heavily inspired by the [OpenFace](https://github.com/cmusatyalab/openface) implementation.
## Training data
The [CASIA-WebFace](http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html) dataset has been used for training. This training set consists of total of 453 453 images over 10 575 identities after face detection. Some performance improvement has been seen if the dataset has been filtered before training. Some more information about how this was done will come later.
The best performing model has been trained on the [VGGFace2](https://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) dataset consisting of ~3.3M faces and ~9000 classes.
## Pre-processing
### Face alignment using MTCNN
One problem with the above approach seems to be that the Dlib face detector misses some of the hard examples (partial occlusion, silhouettes, etc). This makes the training set too "easy" which causes the model to perform worse on other benchmarks.
To solve this, other face landmark detectors has been tested. One face landmark detector that has proven to work very well in this setting is the
[Multi-task CNN](https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html). A Matlab/Caffe implementation can be found [here](https://github.com/kpzhang93/MTCNN_face_detection_alignment) and this has been used for face alignment with very good results. A Python/Tensorflow implementation of MTCNN can be found [here](https://github.com/davidsandberg/facenet/tree/master/src/align). This implementation does not give identical results to the Matlab/Caffe implementation but the performance is very similar.
## Running training
Currently, the best results are achieved by training the model using softmax loss. Details on how to train a model using softmax loss on the CASIA-WebFace dataset can be found on the page [Classifier training of Inception-ResNet-v1](https://github.com/davidsandberg/facenet/wiki/Classifier-training-of-inception-resnet-v1) and .
## Pre-trained models
### Inception-ResNet-v1 model
A couple of pretrained models are provided. They are trained using softmax loss with the Inception-Resnet-v1 model. The datasets has been aligned using [MTCNN](https://github.com/davidsandberg/facenet/tree/master/src/align).
## Performance
The accuracy on LFW for the model [20180402-114759](https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-) is 0.99650+-0.00252. A description of how to run the test can be found on the page [Validate on LFW](https://github.com/davidsandberg/facenet/wiki/Validate-on-lfw). Note that the input images to the model need to be standardized using fixed image standardization (use the option `--use_fixed_image_standardization` when running e.g. `validate_on_lfw.py`).
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
利用 htm5 video 标签打开摄像头采集头像并使用 jquery.faceDeaction 组件来粗略检测人脸 将人脸图像上传到服务器,采用 mtcnn 检测人脸 利用 opencv 的仿射变换对人脸进行对齐,保存对齐后的人脸 采用预训练的 facenet 对检测的人脸进行 embedding,embedding 成 512 维度的特征; 对人脸 embedding 特征创建高效的 annoy 索引进行人脸检测
资源推荐
资源详情
资源评论
收起资源包目录
基于 mtcnn 与 facenet 实现人脸登录系统【100012127】 (373个子文件)
=0.17 126B
test.conf 65B
bootstrap.min.css 118KB
fq.css 230B
.gitignore 145B
camera.html 3KB
test_roate.html 2KB
picture.html 552B
test_zhihu.html 254B
config.ini 514B
meizi4.jpeg 45KB
shexiangtou.jpeg 37KB
meizi3.jpeg 35KB
meizi2.jpeg 19KB
oscar1.jpg 1.4MB
test.jpg 122KB
pilatus800.jpg 106KB
test2.jpg 54KB
Anthony_Hopkins_0001.jpg 13KB
Anthony_Hopkins_0002.jpg 13KB
cascade.js 456KB
jquery-3.2.1.min.js 85KB
jquery.min.js 82KB
bootstrap.min.js 36KB
ccv.js 18KB
zhihu.js 5KB
fp.js 4KB
jquery.facedetection.js 4KB
LICENSE 1KB
plot_learning_curves.m 11KB
detect_face_v2.m 9KB
align_dataset.m 8KB
detect_face_v1.m 8KB
README.md 6KB
README.md 2KB
LICENSE.md 1KB
det3.npy 1.49MB
det2.npy 392KB
det1.npy 27KB
smarty_internal_templateparser.php 133KB
smarty_internal_templatecompilerbase.php 59KB
smarty.class.php 42KB
Smarty.class.php 38KB
smarty_internal_templatelexer.php 35KB
smarty_internal_configfileparser.php 34KB
smarty_internal_testinstall.php 31KB
smarty_internal_template.php 25KB
smarty_internal_configfilelexer.php 24KB
smarty_security.php 23KB
smarty_internal_compile_section.php 18KB
smarty_cacheresource_keyvaluestore.php 17KB
smarty_internal_debug.php 15KB
function.html_select_date.php 15KB
smarty_internal_compile_include.php 15KB
function.html_select_time.php 14KB
smarty_internal_templatebase.php 14KB
cacheresource.pdo.php 14KB
SmartyBC.class.php 12KB
smarty_internal_compile_foreach.php 11KB
smarty_cacheresource_custom.php 10KB
smarty_internal_compile_private_php.php 10KB
smarty_internal_compile_function.php 10KB
modifier.escape.php 9KB
function.html_checkboxes.php 9KB
smarty_resource.php 9KB
smarty_template_compiled.php 9KB
smarty_internal_data.php 9KB
function.html_radios.php 8KB
smarty_internal_runtime_inheritance.php 8KB
smarty_internal_compile_if.php 8KB
function.html_options.php 8KB
smarty_internal_extension_handler.php 8KB
smarty_internal_cacheresource_file.php 8KB
function.fetch.php 8KB
smarty_internal_compile_private_modifier.php 8KB
smarty_template_cached.php 8KB
smarty_internal_compile_block.php 8KB
smarty_internal_runtime_tplfunction.php 7KB
smarty_internal_method_configload.php 7KB
smarty_internal_compilebase.php 7KB
smarty_internal_compile_private_foreachsection.php 7KB
smarty_internal_resource_file.php 7KB
smarty_internal_compile_for.php 7KB
smarty_internal_compile_private_print_expression.php 7KB
smarty_cacheresource.php 6KB
smarty_internal_runtime_updatecache.php 6KB
smarty_internal_config_file_compiler.php 6KB
cacheresource.mysql.php 6KB
smarty_internal_compile_insert.php 6KB
smarty_internal_runtime_cacheresourcefile.php 6KB
1104bf4b63ada7bd60d6bade65b644bb78076781_0.file.login.tpl.php 6KB
function.html_image.php 6KB
smarty_internal_method_clearcompiledtemplate.php 6KB
smarty_internal_smartytemplatecompiler.php 5KB
smarty_internal_compile_private_special_variable.php 5KB
smarty_internal_runtime_foreach.php 5KB
smarty_internal_compile_extends.php 5KB
function.mailto.php 5KB
function.html_table.php 5KB
smarty_template_source.php 5KB
共 373 条
- 1
- 2
- 3
- 4
资源评论
神仙别闹
- 粉丝: 2687
- 资源: 7649
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功