call method
Predicts the 468-point face mesh for an aligned face crop using cv.Mat.
Accepts a cv.Mat directly, providing better performance by avoiding image format conversions.
The faceCrop parameter should contain an aligned, cropped face as cv.Mat.
The Mat is NOT disposed by this method - caller is responsible for disposal.
The optional buffer parameter allows reusing a pre-allocated Float32List
for the tensor conversion to reduce GC pressure.
Returns a list of 468 3D landmark points in normalized coordinates.
This is the stable, backward-compatible entry point. Use callWithScore if you also need the model's face-presence confidence.
Example:
final faceCropMat = cv.imdecode(bytes, cv.IMREAD_COLOR);
final meshPoints = await faceLandmark.call(faceCropMat);
faceCropMat.dispose();
Implementation
Future<List<List<double>>> call(
cv.Mat faceCrop, {
Float32List? buffer,
}) async => (await callWithScore(faceCrop, buffer: buffer)).landmarks;