LandmarkModelRunnerBase class
Generic face landmark regression model runner.
Runs an EfficientNetV2-based model that takes a cropped face image and outputs normalized (x,y) pairs for each landmark. The raw output is denormalized to original image coordinates using crop metadata.
Used by both cat (48 landmarks, 256px) and dog (46 landmarks, 384px) face landmark pipelines. Species-specific landmark types are created by the caller from the raw coordinate pairs.
Constructors
- LandmarkModelRunnerBase({required int inputSize, required int numLandmarks, required String modelPath, int poolSize = 1})
- Creates a landmark model runner.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputSize → int
-
Input spatial dimension (width and height).
final
- modelPath → String
-
Flutter asset path for the TFLite model.
final
- numLandmarks → int
-
Number of landmarks the model predicts.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Releases native resources.
-
initialize(
PerformanceConfig performanceConfig) → Future< void> - Initializes the model from Flutter assets.
-
initializeFromBuffer(
Uint8List bytes, PerformanceConfig performanceConfig) → Future< void> - Initializes the model from pre-loaded bytes (for isolate use).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
predictRaw(
Mat crop, CropMetadata meta) → Future< List< (double, double)> > - Runs landmark prediction and returns denormalized (x, y) coordinate pairs.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited