标准 TFlite 对象检测模型在 MLKit 中不起作用

1 tensorflow tensorflow-lite google-mlkit

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

 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).
Run Code Online (Sandbox Code Playgroud)

知道我可能做错了什么吗?

Don*_*hen 5

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

https://tfhub.dev/ml-kit/collections/image-classification/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