createFromBuffer static method
Future<FaceLandmark>
createFromBuffer(
- Uint8List modelBytes, {
- PerformanceConfig? performanceConfig,
Creates a face landmark model from pre-loaded model bytes.
This is primarily used by FaceDetector to initialize models in a background isolate where asset loading is not available.
The modelBytes parameter should contain the raw TFLite model file contents.
Implementation
static Future<FaceLandmark> createFromBuffer(
Uint8List modelBytes, {
PerformanceConfig? performanceConfig,
}) => _createWithLoader(
load: (opts) => Interpreter.fromBuffer(modelBytes, options: opts),
performanceConfig: performanceConfig,
useIsolateInterpreter: false,
);