代码拉取完成,页面将自动刷新
# 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()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。