createFromBuffer static method
Future<FaceBlendshapesModel>
createFromBuffer(
- Uint8List modelBytes, {
- InterpreterOptions? options,
Creates the model from pre-loaded model bytes.
Used by FaceDetector to initialize the model inside its background
isolate, where asset loading is unavailable. Inference runs directly via
_itp.invoke() (no nested isolate) since the caller is already off the
UI thread and the model is trivially cheap.
Implementation
static Future<FaceBlendshapesModel> createFromBuffer(
Uint8List modelBytes, {
InterpreterOptions? options,
}) async {
final Interpreter itp = Interpreter.fromBuffer(
modelBytes,
options: options,
);
return _finishInterpreter(itp);
}