【发布时间】:2022-12-14 03:07:47
【问题描述】:
我第一次尝试在 flutter 上使用 firebase 机器学习,我已经很容易地在自定义模型部分上传 .tflite 文件,然后很好地使用远程模型,我唯一不明白的问题是我是否更新模型并想添加更多标签 我理想情况下也使用远程 .txt 文件,但我如何将其上传到机器学习部分,因为我只能找到说明如何使用模型文件本身的文档。
FirebaseModelDownloader.instance
.getModel(
"Breed-Detector",
FirebaseModelDownloadType.localModel,
FirebaseModelDownloadConditions(
iosAllowsCellularAccess: true,
iosAllowsBackgroundDownloading: false,
androidChargingRequired: false,
androidWifiRequired: false,
androidDeviceIdleRequired: false,
))
.then((customModel) async {
final localModelPath = customModel.file;
// ...
Tflite.close();
String res;
res = (await Tflite.loadModel(
model: localModelPath.toString(), labels: "assets/labels.txt"))!;
那么我如何将远程 labels.txt 与远程模型一起使用而不是使用远程模型并且必须在本地存储标签
【问题讨论】: