我想在颤振应用程序中集成firebase自定义模型。我如何整合?

我想在颤振应用程序中集成firebase自定义模型。我如何整合?,firebase,flutter,Firebase,Flutter,我不知道在Firebase中将我的ML模型保存到哪里 请参阅下面的代码,并获取此错误: 断言失败:第259行位置12:“remoteModelName!=空的|| localModelName!=null”:不正确 这是按下按钮时的空白: Future runmodel() async { manager.registerLocalModelSource(FirebaseLocalModelSource( modelName: 'mobilenet_v10', asse

我不知道在Firebase中将我的ML模型保存到哪里

请参阅下面的代码,并获取此错误:

断言失败:第259行位置12:“remoteModelName!=空的|| localModelName!=null”:不正确

这是按下按钮时的空白:

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);}

在向管理器注册本地模型之后,请确保也为解释器定义localModelName

   await interpreter.run(
      localModelName: modelName,
      inputOutputOptions: io, 
      inputBytes: bytes
    );

希望这有帮助

您能提供一些示例代码和/或图像吗?问题似乎根本不包括解决问题的任何尝试。请编辑问题以显示您尝试了什么,并显示您遇到的具体障碍。有关更多信息,请参阅。是的,我可以上载图像,并上载我的尝试