Created
September 19, 2019 00:43
-
-
Save truongsinh/d570a4469d09916e857d81dd52b919ce to your computer and use it in GitHub Desktop.
Parse raw bytes to approximately corresponding type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.tensorflow.org/lite/models/object_detection/overview | |
final outputTensors = localInterpreter.getOutputTensors(); | |
final outputLocationsTensor = outputTensors[0]; | |
// shape 1, 10, 4; | |
Float32List outputLocations = | |
outputLocationsTensor.data.buffer.asFloat32List(); | |
final outputClassesTensor = outputTensors[1]; | |
// shape 1, 10 | |
Float32List outputClasses = outputClassesTensor.data.buffer.asFloat32List(); | |
final outputScoresTensor = outputTensors[2]; | |
// shape 1, 10 | |
Float32List outputScores = outputScoresTensor.data.buffer.asFloat32List(); | |
final numDetectionsTensor = outputTensors[3]; | |
// shape 1 | |
double numDetections = numDetectionsTensor.data.buffer.asFloat32List().single; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment