MediaPipeTasksVision Framework Reference

MPPFaceLandmarkerOptions


@interface MPPFaceLandmarkerOptions : MPPTaskOptions <NSCopying>

Options for setting up a FaceLandmarker.

  • Running mode of the face landmark dection task. Defaults to .image. FaceLandmarker can be created with one of the following running modes:

    1. .image: The mode for performing face detection on single image inputs.
    2. .video: The mode for performing face detection on the decoded frames of a video.
    3. .liveStream: The mode for performing face detection on a live stream of input data, such as from the camera.

    Declaration

    Objective-C

    @property (nonatomic) MPPRunningMode runningMode;
  • An object that confirms to FaceLandmarkerLiveStreamDelegate protocol. This object must implement faceLandmarker(_:didFinishDetectionWithResult:timestampInMilliseconds:error:) to receive the results of performing asynchronous face landmark detection on images (i.e, when runningMode = .liveStream).

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<MPPFaceLandmarkerLiveStreamDelegate> faceLandmarkerLiveStreamDelegate;
  • The maximum number of faces can be detected by the FaceLandmarker. Defaults to 1.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger numFaces;
  • The minimum confidence score for the face detection to be considered successful. Defaults to 0.5.

    Declaration

    Objective-C

    @property (nonatomic) float minFaceDetectionConfidence;
  • The minimum confidence score of face presence score in the face landmark detection. Defaults to 0.5.

    Declaration

    Objective-C

    @property (nonatomic) float minFacePresenceConfidence;
  • The minimum confidence score for the face tracking to be considered successful. Defaults to 0.5.

    Declaration

    Objective-C

    @property (nonatomic) float minTrackingConfidence;
  • Whether FaceLandmarker outputs face blendshapes classification. Face blendshapes are used for rendering the 3D face model.

    Declaration

    Objective-C

    @property (nonatomic) BOOL outputFaceBlendshapes;
  • Whether FaceLandmarker outputs facial transformation_matrix. Facial transformation matrix is used to transform the face landmarks in canonical face to the detected face, so that users can apply face effects on the detected landmarks.

    Declaration

    Objective-C

    @property (nonatomic) BOOL outputFacialTransformationMatrixes;