自定义AutoML模型的Tensorflow Lite对象检测。

问题描述 投票:0回答:1

我喜欢测试TFLite的对象检测实例。

https:/github.comtensorflowexamplestreemasterliteexamplesobject_detectionandroid。

使用默认模型的例子效果很好,但我想测试从AutoML生成的自定义模型。但我想测试一个由AutoML生成的自定义模型。当我把 "detect.tflite "和 "labelmap fille "替换到"\src\main\assets "目录中并构建时,App在启动后崩溃。

我的Model很简单...只能检测到2个对象(老虎和狮子)。我的标签图文件包含以下内容。

???TigerLion

另外,我在 "build.gradle "中注释了"/apply from:'download_model.gradle'"这一行,以停止下载默认的Model,并从asset中使用我的自定义Model。

我在Android和这个ML领域都是新手。如果有谁能给我建议,我将会很高兴,因为使用自定义的AutoML模型,App启动后会崩溃。

先谢谢你。

Regards.

android tensorflow machine-learning tensorflow-lite automl
1个回答
0
投票

两个可能的错误日志可能是。

Cannot convert between a TensorFlowLite buffer with 1080000 bytes and a ByteBuffer with 270000 bytes. 修改TF_OD_API_INPUT_SIZE.

tflite ml google [1, 20, 4] and a Java object with shape [1, 10, 4]. 根据自定义模型修改NUM_DETECTIONS。

© www.soinside.com 2019 - 2024. All rights reserved.