# FaceRec
A simple working facial recognition program.
## Installation:
1. Install the dependencies
2. Download the pretrained models here: https://drive.google.com/file/d/0Bx4sNrhhaBr3TDRMMUN3aGtHZzg/view?usp=sharing
Then extract those files into models
3. Run main.py
## Requirements:
Python3 (3.5 ++ is recommended)
## Dependencies:
opencv3
numpy
tensorflow
## Howto:
`python3 main.py` to run the program
`python3 main.py --mode "input"` to add new user. Start turning left, right, up, down after inputting the new name. Turn slowly to avoid blurred images
To achieve best accuracy, please try to mimick what I did here in this gif while inputting new subject:
![GIF Demo](https://media.giphy.com/media/3o7aD7CZ6C3RLCvLgs/giphy.gif)
### Flags:
`--mode "input"` to add new user into the data set
## General Information:
Project: Facial Recogition
This is a simple minified version of a bigger project I was working on this summer.
### Info on the models I used:
Facial Recognition Architecture: Facenet Inception Resnet V1
_Pretrained model is provided in Davidsandberg repo_
More information on the model: https://arxiv.org/abs/1602.07261
Face detection method: MTCNN
More info on MTCNN Face Detection: https://kpzhang93.github.io/MTCNN_face_detection_alignment/
Both of these models are run simultaneouslyx
### Framework and Libs:
Tensorflow: The infamous Google's Deep Learning Framework
OpenCV: Image processing (VideoCapture, resizing,..)
## Suggestions for Improvement:
To keep this repo as simple as possible, I will probably have this "plug-in" in a seperate repo:
Given the constrain of the facenet model's accuracy, there are many ways you can improve accuracy in real world application. One of my suggestion would be to create a tracker for each detected face on screen, then run recognition on each of them in real time. Then, decide who is in each tracker after some number of frames (3 - 10 frames, depending on how fast your machine is). Keep doing the same thing until the tracker disappears or loses track. Your result can look somewhat like this:
`{"Unknown" :3, "PersonA": 1, "PersonB": 20}` ---> This tracker is tracking PersonB
This will definitely improve your program liability, because the result will most likely be leaning toward the right subject in the picture after some number of frames, instead of just deciding right away after 1 frame like you normally would. One benefit of this approach is that the longer the person stays in front of the camera, the more accurate and confident the result is, as confidence points get incremented over time.
Also, you can do some multi-threading/processing tricks to improve performance.
### Demos:
![GIF Demo](https://media.giphy.com/media/l378mx3j8ZsWlOuze/giphy.gif)
Live demo: https://www.youtube.com/watch?v=6CeCheBN0Mg
@Author: David Vu
## Credits:
- Pretrained models from: https://github.com/davidsandberg/facenet
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 MTCNN人脸检测+FaceNet人脸识别算法(python源码+项目说明)(LFW数据集准确率达99.4%,可接摄像头实时部署人脸检测).zip
资源推荐
资源详情
资源评论
收起资源包目录
MTCNN人脸检测+FaceNet人脸识别算法(python源码+项目说明)(LFW数据集准确率达99.4%,可接摄像头实时部署人脸检测).zip (61个子文件)
code_20105
facerec_128D.txt 119KB
3pos_and20num_dlib68_camshifttra.py 10KB
ui_ui_1_1.py 18KB
find_people.py 4KB
tf_graph.pyc 756B
mtcnn_detect.py 21KB
main.py 6KB
dlib_test.py 1KB
ui_2.ui 4KB
align_custom.pyc 5KB
trackers
__init__.py 79B
camshift.pyc 2KB
__init__.pyc 276B
correlation.pyc 2KB
correlation.py 1KB
camshift.py 2KB
face_feature.pyc 2KB
add.py 3KB
architecture
__init__.py 0B
inception_resnet_v1.pyc 8KB
__init__.pyc 150B
__pycache__
inception_resnet_v1.cpython-36.pyc 6KB
inception_resnet_v1.py 11KB
selectors
__init__.py 36B
box_selector.py 2KB
__init__.pyc 200B
__pycache__
__init__.cpython-35.pyc 194B
box_selector.pyc 2KB
align_custom_1.py 5KB
face_recognition.py 8KB
align_custom.py 5KB
3pos_and20num_dlib68_dlibtra.py 10KB
mtcnn
mtcnn_detect.py 21KB
5pos_and20num_mtcnn5_dlibtra.py 10KB
mtcnn_detect.pyc 22KB
test.py 546B
test_algin_custom.pyc 5KB
facerec_128D_1.txt 51KB
ui_1.ui 2KB
test
2.jpg 22KB
6.jpg 65KB
1.jpg 63KB
5.jpg 13.86MB
3.jpg 122KB
7.jpg 206KB
4.jpg 396KB
models
det3.npy 1.49MB
det2.npy 392KB
det1.npy 27KB
__MACOSX
._det1.npy 478B
._det2.npy 478B
._det3.npy 478B
5pos_and20num_mtcnn5_dlibtra.py 10KB
mtcnn_detect.pyc 22KB
face_feature.py 2KB
ui_ui_2.py 4KB
test.py 10KB
README.md 3KB
tf_graph.py 278B
align_custom_1.pyc 5KB
mtcnn_test.py 10KB
共 61 条
- 1
资源评论
- 小小可可爱爱2024-03-26资源中能够借鉴的内容很多,值得学习的地方也很多,大家一起进步!
土豆片片
- 粉丝: 1719
- 资源: 5641
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功