2020
11-19
11-19
python实现图片,视频人脸识别(dlib版)
图片人脸检测#coding=utf-8importcv2importdlibpath="img/meinv.png"img=cv2.imread(path)gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)#人脸分类器detector=dlib.get_frontal_face_detector()#获取人脸检测器predictor=dlib.shape_predictor("C:\\Python36\\Lib\\site-packages\\dlib-data\\shape_predictor_68_face_landmarks.dat")dets=detector(gray,1)forfaceindets:shape=predictor(img,face)#寻...
继续阅读 >