March 2019
Intermediate to advanced
532 pages
13h 2m
English
With the aim of detecting faces using face_recognition, the face_locations() function should be called:
rects_1 = face_recognition.face_locations(rgb, 0, "hog")rects_2 = face_recognition.face_locations(rgb, 1, "hog")
The first parameter is the input (RGB) image. The second parameter sets how many times the input image is upsampled before the detection process has been carried out. The third parameter determines which face detection model will be used.
In this case, the hog detection model will be used. The full code for this example can be seen in the face_detection_fr_hog.py script.
Additionally, face_processing can be configured to detect faces using the cnn face detector:
rects_1 = face_recognition.face_locations(rgb ...
Read now
Unlock full access