mediapipe_face_mesh library
Classes
- FaceBlendshapes
-
The 52 blendshape coefficients of one face, each in
[0, 1]. - FaceBlendshapesProcessor
- A post-processor that turns face landmarks into 52 ARKit-style blendshape coefficients.
- FaceDetection
- Single face detection in normalized image coordinates.
- FaceDetectionResult
- Result of a face detector inference.
- FaceDetectorProcessor
- High-level wrapper around the native MediaPipe Face Detection model.
- FaceLandmarkSmoother
- Smooths FaceMeshResult landmarks across consecutive frames with the official MediaPipe OneEuro configuration.
- FaceMeshBox
- Pixel-space bounding box used to derive a normalized ROI.
- FaceMeshFrame
-
A frame accepted by every
processmethod: FaceMeshImage (RGBA/BGRA) or FaceMeshNv21Image (NV21). - FaceMeshGeometry
- Estimated 3D geometry derived from a FaceMeshResult.
- FaceMeshHeadPose
- Estimated yaw, pitch, and roll angles for the head.
- FaceMeshImage
- Container that holds RGBA/BGRA pixels used as inference input.
- FaceMeshImagePlane
- Raw image plane data with stride metadata.
- FaceMeshInferencePipeline
- Runs face detection and face mesh inference as one flow.
- FaceMeshInferenceResult
- Result of running face detection and face mesh inference as one operation.
- FaceMeshInferenceStreamProcessor
- Turns a stream of frames into inference results by calling FaceMeshInferencePipeline.process on each one.
- FaceMeshIsolatePipeline
-
Runs a FaceMeshInferencePipeline in a worker isolate and exposes its
methods as
Futures. The calling isolate pays only for copying the frame in and the result out. - FaceMeshLandmark
- A single 3D landmark returned by MediaPipe.
- FaceMeshMeasurement
- A named face measurement in centimeters.
- FaceMeshMeasurements
- Common face measurements derived from the estimated metric landmarks.
- FaceMeshMetricPoint
- A 3D point in the estimated face metric space.
- FaceMeshMultiInferenceResult
- Result of running face detection and multi-face mesh inference together.
- FaceMeshNv21Image
- Holder for NV21 (Y + interleaved VU) camera buffers.
- FaceMeshProcessor
- High-level wrapper around the native MediaPipe Face Mesh graph.
- FaceMeshResult
- Aggregates the results of a single face mesh inference.
- FaceMeshTriangle
- Triangle made up of 3 face mesh landmarks.
- LandmarkSmoothingOptions
- Tuning parameters for OneEuro landmark smoothing.
- NormalizedRect
- Immutable normalized rectangle that MediaPipe uses as ROI input.
- OneEuroFilter
-
Dart port of MediaPipe's OneEuro filter
(
mediapipe/util/filtering/one_euro_filter.cc), itself an implementation of the 1€ filter by Casiez et al. - OneEuroLandmarksSmoother
-
Applies OneEuro smoothing to a full set of normalized landmarks, matching
the official
LandmarksSmoothingCalculatorOneEuro path (mediapipe/calculators/util/landmarks_smoothing_calculator_utils.cc). - TrackedFaceMesh
- A face mesh followed across frames by the multi-face flow.
Enums
- FaceBlendshape
- The 52 ARKit-style face blendshape categories predicted by the MediaPipe face blendshapes model.
- FaceDetectionModel
- Bundled MediaPipe face detector model variants.
- FaceMeshDelegate
- Delegate types supported by the native runtime.
- FaceMeshModel
- Bundled MediaPipe face mesh (landmark) model generations for FaceMeshProcessor.create.
- FaceMeshPixelFormat
- Pixel layout of a FaceMeshImage buffer.
Extensions
- FaceMeshResultGeometry on FaceMeshResult
- Distance and geometry helpers attached to FaceMeshResult.
- FaceMeshResultPixels on FaceMeshResult
- Pixel-space helpers attached to FaceMeshResult instances.
Constants
-
faceMeshIrisRefinedEyeLandmarkIndices
→ const Set<
int> -
Face Mesh landmark indices whose eye coordinates are refined beyond the base
mesh: by the separate iris model when
FaceMeshProcessor.create(enableIris: true)is used, or inside the mesh inference with FaceMeshModel.attention or FaceMeshModel.v2.
Typedefs
- FaceDetectionSelector = FaceDetection? Function(FaceDetectionResult result)
- Selects the detection that should be used for face mesh inference.
-
FaceMeshInferenceDetectorRoiResolver<
T> = NormalizedRect? Function(T frame) - Resolves a detector ROI for a high-level inference frame.
-
FaceMeshPipelineFactory<
T> = FutureOr< FaceMeshInferencePipeline> Function(T argument) - Builds the FaceMeshInferencePipeline that a FaceMeshIsolatePipeline runs. Called once inside the worker isolate with the argument given to FaceMeshIsolatePipeline.spawn.
-
FaceMeshRunResolver<
T> = bool Function(T frame) - Decides whether face mesh inference should run for a frame.
- SmoothablePoint = ({double x, double y, double z})
- A landmark position handled by OneEuroLandmarksSmoother.
Exceptions / Errors
- FaceMeshException
- Base exception thrown by this plugin when native calls fail.