Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created February 22, 2019 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/50482aeb5af34a724aa7c574a859e779 to your computer and use it in GitHub Desktop.
Save frogermcs/50482aeb5af34a724aa7c574a859e779 to your computer and use it in GitHub Desktop.
public List<Classification> recognizeImage(Bitmap bitmap) {
ByteBuffer byteBuffer = convertBitmapToByteBuffer(bitmap);
float[][] result = new float[1][GtsrbModelConfig.OUTPUT_LABELS.size()];
interpreter.run(byteBuffer, result);
return getSortedResult(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment