【发布时间】:2019-01-21 21:42:20
【问题描述】:
我想知道是否可以使用 Tensorflow lite 绘制边界框。我已经能够在 1.12 版中使用 tensorflow-android 绘制它们,但我没有在 tensorflow lite 中绘制边界框的示例。
在下面的代码中,您可以看到我在 tensorflow-android 1.12 中获取正在工作的 outputLocations 的方式。
inferenceInterface.run(outputNames, logStats);
LOGGER.d("End Section run " + System.currentTimeMillis());
Trace.endSection();
// Copy the output Tensor back into the output array.
Trace.beginSection("fetch");
LOGGER.d("Begin Section fetch " + System.currentTimeMillis());
outputLocations = new float[MAX_RESULTS * 4];
outputScores = new float[MAX_RESULTS];
outputClasses = new float[MAX_RESULTS];
outputNumDetections = new float[1];
inferenceInterface.fetch(outputNames[0], outputLocations);
如果您能告诉我如何使用 runInference() 从 trensorflow-lite 获取 outputLocations,那就太好了。
【问题讨论】:
-
您找到解决方案了吗?
标签: android tensorflow tensorflow-lite