Landmarks = np.matrix( for p in predictor(img, rects).parts()]) Img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Reading images from the camera ,ok It is used to judge whether the read is successful or not # Turn on the camera The parameter is the input stream, Can be camera or video file Predictor = dlib.shape_predictor('shape_predictor_68_face_landmarks.dat') Install with command opencv: pip install opencv_python Two 、 install dlib library 1、 stay dlib Download from the official website python Version of dlib 2、 Input pip install dlib-19.19.0-cp38-cp38-win_amd64.whl install dlib Two 、 Face recognitionĭetector = dlib.get_frontal_face_detector() One 、opencv install 1、 open Anaconda Prompt Command box
0 Comments
Leave a Reply. |