Page Summary
-
This documentation details globally available type definitions used for face detection within ML Kit.
-
Definitions include types for facial contours, landmarks, and detection modes (classification, performance, landmark, contour).
-
MLKFaceDetectionCallbackis a block providing an array of detected faces or an error. -
Each type definition provides its Objective-C declaration and a brief description of its purpose.
Type Definitions
The following type definitions are available globally.
-
The facial contours.
Declaration
Objective-C
typedef NSString *MLKFaceContourType -
A block containing an array of faces or
nilif there’s an error.Declaration
Objective-C
typedef void (^MLKFaceDetectionCallback)(NSArray<MLKFace *> *_Nullable, NSError *_Nullable)Parameters
facesArray of faces detected in the image or
nilif there was an error.errorThe error or
nil. -
@enum FaceDetectorClassificationMode Classification mode for face detection.
Declaration
Objective-C
typedef NSInteger MLKFaceDetectorClassificationMode -
@enum FaceDetectorPerformanceMode Performance preference for accuracy or speed of face detection.
Declaration
Objective-C
typedef NSInteger MLKFaceDetectorPerformanceMode -
@enum FaceDetectorLandmarkMode Landmark detection mode for face detection.
Declaration
Objective-C
typedef NSInteger MLKFaceDetectorLandmarkMode -
@enum FaceDetectorContourMode Contour detection mode for face detection.
Declaration
Objective-C
typedef NSInteger MLKFaceDetectorContourMode -
The facial landmarks.
Declaration
Objective-C
typedef NSString *MLKFaceLandmarkType