Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created January 30, 2019 21:15
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/dd2c13d25fb43da5e8e434d6ce55bfc1 to your computer and use it in GitHub Desktop.
Save frogermcs/dd2c13d25fb43da5e8e434d6ce55bfc1 to your computer and use it in GitHub Desktop.
public List<Classification> recognizeImage(Bitmap bitmap) {
ByteBuffer byteBuffer = convertBitmapToByteBuffer(bitmap);
float[][] result = new float[1][MnistModelConfig.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