March 2019
Intermediate to advanced
532 pages
13h 2m
English
Another option is to use the dlib library to detect facial landmarks. In the landmarks_detection_dlib.py script, we detected facial landmarks using dlib. More specifically, we used the images taken from the webcam to perform face detection using dlib frontal face detection. We also offer the possibility of taking the image from a test image. The next step is to get the shape using the shape predictor:
p = "shape_predictor_68_face_landmarks.dat"predictor = dlib.shape_predictor(p)shape = predictor(gray, rect)
The following step is to transform shape into a numpy array. In this sense, shape is a dlib full_object_detection object, which represents the location of an object in an image with the positions ...