Python API for bob.ip.dlib¶
-
class
bob.ip.dlib.
AlignDLib
[source]¶ Bases:
object
Use dlib’s landmark estimation to align faces.
The alignment preprocess faces for input into a neural network. Faces are resized to the same size (such as 96x96) and transformed to make landmarks (such as the eyes and nose) appear at the same location on every image.
Code copied from here https://raw.githubusercontent.com/cmusatyalab/openface/master/openface/align_dlib.py
-
class
bob.ip.dlib.
DlibLandmarkExtraction
(model=None, bob_landmark_format=False)[source]¶ Bases:
object
Binds to the DLib landmark detection using the shape_predictor_68_face_landmarks,
This facial landmark detector is an implementation of [Kazemi2014]
Parameters:
-
class
bob.ip.dlib.
FaceDetector
[source]¶ Bases:
object
Detects face using the dlib Face Detector (http://dlib.net/face_detector.py.html)
-
detect_all_faces
(image)[source]¶ Find all face bounding boxes in an image.
Parameters: image (2D or 3D numpy.ndarray
) – GRAY scaled or RGB image in the format (CxWxH)
-
detect_single_face
(image)[source]¶ Detect the biggest detected face in an image
Parameters: image (2D or 3D numpy.ndarray
) – GRAY scaled or RGB image in the format (CxWxH)
-