Ai
2 Star 11 Fork 2

小南橙/Flask-application

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.py 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
小南橙 提交于 2022-12-21 14:59 +08:00 . face done
# import cv2
# img1 = cv2.imread('face1.jpeg')
# gray = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY)
# face_detector = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
# faces = face_detector.detectMultiScale(gray, 1.1, 3,cv2.CASCADE_SCALE_IMAGE,(50,50),(100,100))
# for (x, y, w, h) in faces:
# cv2.rectangle(img1, (x, y), (x + w, y + w), (0, 255, 0),2)
# # cv2.imshow("img",img1)
# cv2.waitKey(0)
# import cv2
# import os
# import matplotlib.pyplot as plt
# def detect(filename=r"\static\img\face1.jpeg"):# 定位识别
# save_file=r"\static\img\detect_result.png"
# face_cascade=cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
# img = cv2.imread(filename)
# gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
# faces = face_cascade.detectMultiScale(gray,1.3,5)
# for(x,y,w,h)in faces:
# cv2.rectangle(img,(x,y),(x + w,y + h),(255,0,0),2)
# cv2.imwrite(filename=save_file,img=img)
# return save_file
# import face_recognition
# import cv2
# import matplotlib.pyplot as plt
# image=face_recognition.load_image_file("mctz.jfif")
# face_landmarks_list = face_recognition.face_landmarks(image)
# #print(faces_landmarks_list)
# for points in face_landmarks_list:
# #print(points)
# for pp in points:
# print(pp)
# img=cv2.circle(image,(100,100),60,(255,0,0),2)
# plt.imshow(img)
# plt.axis('off')
# plt.show()
from tools.face import get_face_res
get_face_res()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/dragonlord/flask-application.git
git@gitee.com:dragonlord/flask-application.git
dragonlord
flask-application
Flask-application
master

搜索帮助