Ai
4 Star 1 Fork 0

wjwilliam/software_engineering-dlib_face_recognition

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Process.py 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
royalwjw 提交于 2022-06-18 00:54 +08:00 . init&重构项目
import cv2
from src.utils.GlobalVariable import models
from src.model.Face import StudentRgFace
#此用于面部特征计算进程
# 自动进行普通识别=> 消费者模型
def process_student_rg(Q1, Q2, share):
face_rg = StudentRgFace()
while True:
while not Q1.empty():
img = Q1.get()
rgbImage = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
gray = cv2.cvtColor(rgbImage, cv2.COLOR_RGB2GRAY)
location_faces = models.detector(gray)
if len(location_faces) == 1:
raw_face = models.predictor(gray, location_faces[0])
result = face_rg.rg(img, rgbImage, raw_face, share)
Q2.put(result)
#time.sleep(1)
# def process_admin_rg(Q1, share):
# face_rg = AdminRgFace()
# while True:
# while not Q1.empty():
# img = Q1.get()
# rgbImage = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# gray = cv2.cvtColor(rgbImage, cv2.COLOR_RGB2GRAY)
# location_faces = models.detector(gray)
# if len(location_faces) == 1:
# raw_face = models.predictor(gray, location_faces[0])
# result = face_rg.rg_face(img, rgbImage, raw_face,share)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wjwilliam/software_engineering-dlib_face_recognition.git
git@gitee.com:wjwilliam/software_engineering-dlib_face_recognition.git
wjwilliam
software_engineering-dlib_face_recognition
software_engineering-dlib_face_recognition
master

搜索帮助