1、识别效果 2、识别代码 import cv2 as cv def face_detect_demo(img): # 将图片灰度 gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) # 加载特征数据 face_detector = cv.