编者荐语 人脸识别是基于人的脸部特征信息进行身份识别的一种生物识别技术,该技术也是计算机视觉当中非常成熟的一类技术。文章分享一个人脸识别的实战项目:考勤系统,感兴趣的同学可以仔细阅读一下。
Python研究者
前言
本项目为IOT实验室人员签到考勤设计,系统实现功能:
- 人员人脸识别并完成签到/签退
- 考勤时间计算
- 保存考勤数据为CSV格式(Excel表格)
PS:本系统2D人脸识别,节约了繁琐的人脸识别训练部分,简洁快捷
项目效果图
登陆界面
主界面展示图:
签到功能展示
签退功能展示
后台签到数据记录
是否签到/退判断
项目环境
核心环境:
- OpenCV-Python 4.5.5.64
- face_recognition 1.30
- face_recognition_model 0.3.0
- dlib 19.23.1
UI窗体界面:
- PyQt5 5.15.4
- pyqt5-plugins 5.15.4.2.2
- PyQt5-Qt5 5.15.2
- PyQt5-sip 12.10.1
- pyqt5-tools 5.15.4.3.2
编译器
Pycham 2021.1.3
Anaconda
辅助开发QT-designer
项目配置
代码部分
核心代码
「MainWindow.py」UI文件加载:
摄像头调用:
「OutWindow.py」获取当前系统时间
签到时间计算
人脸识别部分
签到数据保存与判断
项目目录结构
后记
- 因为本系统没有进行人脸训练建立模型,系统误识别率较高,安全性较低
- 系统优化较差,摄像头捕捉帧数较低(8-9),后台占有高,CPU利用率较高
- 数据保存CSV格式,安全性较低
正式版改进
- 加入TensorFlow深度学习,提高系统人脸识别安全性与准确性
- 加入MySQL数据库,对签到数据进行更安全保护,不易被修改
- 美化优化UI设计
链接:https://github.com/BIGBOSS-dedsec/Python-Face-recognition-Attendance