March 2019
Intermediate to advanced
532 pages
13h 2m
English
The landmarks_detection_fr.py script shows you how to both detect and draw facial landmarks using the face_recognition package.
In order to detect landmarks, the face_recognition.face_landmarks() function is called, as follows:
# Detect 68 landmarks:face_landmarks_list_68 = face_recognition.face_landmarks(rgb)
This function returns a dictionary of facial landmarks (for example, eyes and nose) for each face in the image. For example, if we print the detected landmarks, the output is as follows:
[{'chin': [(113, 251), (111, 283), (115, 315), (122, 346), (136, 376), (154, 402), (177, 425), (203, 442), (231, 447), (260, 442), (285, 426), (306, 403), (323, 377), (334, 347), (340, 315), (343, 282), ...