FaceLandmark class

Predicts the full 468-point face mesh (x, y, z per point) for an aligned face crop. Coordinates are normalized before later mapping back to image space.

The underlying TFLite model (face_landmark.tflite) is sourced from Google's MediaPipe framework. See the official model card for architecture details, training data, and intended use cases: https://mediapipe.page.link/facemesh-mc (local copy: doc/model_cards/face_landmark_model_card.pdf)

Properties

hashCode → int
The hash code for this object.
no setterinherited
inputHeight → int
The model input height in pixels.
no setter
inputWidth → int
The model input width in pixels.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Mat faceCrop, {Float32List? buffer}) → Future<List<List<double>>>
Predicts the 468-point face mesh for an aligned face crop using cv.Mat.
callWithScore(Mat faceCrop, {Float32List? buffer}) → Future<({List<List<double>> landmarks, double? score})>
Returns the 468 3D landmark points in normalized coordinates plus the model's face-presence score in the range 0.0 to 1.0 (higher means more confident the crop contains a face). score is null when the model does not expose a presence output.
dispose() → void
Releases all TensorFlow Lite resources held by this model.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

create({InterpreterOptions? options, PerformanceConfig? performanceConfig}) → Future<FaceLandmark>
Creates and initializes a face landmark (mesh) model instance.
createCompiledFromBuffer(Uint8List modelBytes, {Set<Accelerator> accelerators = const {Accelerator.gpu, Accelerator.cpu}, Precision precision = Precision.fp32}) → Future<FaceLandmark>
Creates a face landmark model backed by LiteRT CompiledModel.
createFromBuffer(Uint8List modelBytes, {PerformanceConfig? performanceConfig}) → Future<FaceLandmark>
Creates a face landmark model from pre-loaded model bytes.