emedvedev / attention-ocr

A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
MIT License
1.08k stars 256 forks source link

Documentation for input/output tensors #162

Closed thhart closed 4 years ago

thhart commented 4 years ago

I want to integrate the model programmatically, how to receive more detailed information from the output model. How are the tensors named and structured in the graph to receive information like this (if available):

input:

image data bytes

output:

bounding box location score/probability single character location

maxpaynestory commented 4 years ago

Also interested to know about output tensors.

maxpaynestory commented 4 years ago

I guess the output tensors are

probability output

taken from tensorflow model server rest api results.

maxpaynestory commented 4 years ago

Here is what people are using

image_tensor = detection_graph.get_tensor_by_name('input_image_as_bytes:0')
prediction_result = detection_graph.get_tensor_by_name('prediction:0')
allProbs = detection_graph.get_tensor_by_name('probability:0')