[英]I want integrate the firebase custom model in flutter app. how i integrate?
我不知道在哪里保存我的 ML model 到 Firebase
請參閱下面的代碼並得到一個錯誤:
斷言失敗:第 259 行第 12 行:'remoteModelName:= null || localModelName.= null': 不正確。
這是 on press 的空白:
Future runmodel() async {
manager.registerLocalModelSource(FirebaseLocalModelSource(
modelName: 'mobilenet_v10',
assetFilePath: 'assets/mobilenet_v2.tflite'));
var imageBytes = (await rootBundle.load('assets/download.jpg')).buffer;
img.Image image = img.decodeJpg(imageBytes.asUint8List());
image = img.copyResize(image, height: 224, width: 224);
var results = await interpreter.run();
print(results);}
將本地 model 注冊到管理器后,請務必為解釋器定義 localModelName。
await interpreter.run(
localModelName: modelName,
inputOutputOptions: io,
inputBytes: bytes
);
希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.