标准 TFlite 对象检测模型在 MLKit 中不起作用 [英] Standard TFlite object detection model not working in MLKit

查看:36
本文介绍了标准 TFlite 对象检测模型在 MLKit 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在 MLKit 中使用 预训练的 TFLite 对象检测模型,我收到以下错误:

<块引用>

 CalculatorGraph::Run() 在运行中失败:Calculator::Open() 用于节点BoxClassifierCalculator";失败:#vk 输出索引 0 的意外维度数:得到 3D,预期为 2D(BxN,B=1)或 4D(BxHxWxN,B=1,W=1,H=1).

知道我做错了什么吗?

解决方案

ML Kit 目前还不支持自定义对象检测模型.ML Kit 目前只允许开发者使用自定义图像分类模型.此处列出了与 ML Kit 兼容的所有 TFLite 模型:

https://tfhub.dev/ml-kit/collections/image-分类/1

如果你想做物体检测,可以试试ML Kit的物体检测API:https://developers.google.com/ml-kit/vision/object-detection

如果你想使用自定义对象检测模型,你可以试试TFLite任务库:

https://www.tensorflow.org/lite/inference_with_metadata/task_library/overview.

If I use the Pre-Trained TFLite Object detection model in MLKit, I get the following error:

 CalculatorGraph::Run() failed in Run: 
    Calculator::Open() for node "BoxClassifierCalculator" failed: #vk Unexpected number of dimensions for output index 0: got 3D, expected either 2D (BxN with B=1) or 4D (BxHxWxN with B=1, W=1, H=1).

Any Idea what I might be doing wrong?

解决方案

ML Kit does not currently support custom object detection model yet. ML Kit currently only allows developers to use custom image classification models. All TFLite models that are compatible with ML Kit are listed here:

https://tfhub.dev/ml-kit/collections/image-classification/1

If you want to do object detection, you can try out ML Kit's Object Detection API: https://developers.google.com/ml-kit/vision/object-detection

If you want to use a custom object detection model, you can try TFLite task library:

https://www.tensorflow.org/lite/inference_with_metadata/task_library/overview.

这篇关于标准 TFlite 对象检测模型在 MLKit 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆