简体   繁体   中英

How to draw bounding boxes around classified objects using tensorflow lite?

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.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM