I would like to know if it is possible to draw bounding boxes using Tensorflow lite. I have been able to draw them using tensorflow-android in version 1.12 but I have no example for drawing bounding boxes in tensorflow lite.
In the code below you can see my way in tensorflow-android 1.12 to get the outputLocations which is working.
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);
It would be great if you could tell me how to get outputLocations using runInference() from trensorflow-lite instead.
如果您使用以下对象检测模型: http : //download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz输出张量已经具有输出位置,分数,类等。您可以遵循类似于Android的示例Java示例应用程序: https : //github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/android/app/src/main/java/org/tensorflow/demo/TFLiteObjectDetectionAPIModel.java
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.