MediaPipeTasksVision Framework Reference

FaceLandmarkerResult

class FaceLandmarkerResult: TaskResult, NSCopying

Represents the detection results generated by FaceLandmarker.

  • Initializes a new FaceLandmarkerResult with the given array of landmarks, blendshapes, facialTransformationMatrixes and timestamp (in milliseconds).

    Declaration

    Swift

    init(faceLandmarks: [[NormalizedLandmark]], faceBlendshapes: [Classifications], facialTransformationMatrixes: [TransformMatrix], timestampInMilliseconds: Int)

    Parameters

    faceLandmarks

    An array of NormalizedLandmark objects.

    faceBlendshapes

    An array of Classifications objects.

    facialTransformationMatrixes

    An array of flattended matrices.

    timestampInMilliseconds

    The timestamp (in milliseconds) for this result.

    Return Value

    An instance of FaceLandmarkerResult initialized with the given array of detections and timestamp (in milliseconds).

  • Face blendshapes results. Defaults to an empty array if not enabled. Note: *Left and *Right blendshapes correspond to the subject's face, not the viewer. Passing a horizontally mirrored image will invert these outputs.

    Declaration

    Swift

    var faceBlendshapes: [Classifications] { get }
  • Detected face landmarks in normalized image coordinates.

    Declaration

    Swift

    var faceLandmarks: [[NormalizedLandmark]] { get }
  • Facial transformation 4x4 matrices. Defaults to an empty array if not enabled.

    Declaration

    Swift

    var facialTransformationMatrixes: [TransformMatrix] { get }