tensorflow / tensorflow/models
Inference for AttentionOCR model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi there!
I am trying to understand Attention OCR repo and its inference.
I have seen its input/output details -

it says, it takes (32) as string. I don't get this. What does it mean?
In demo_inference.py, there is run method-
def run(checkpoint, batch_size, dataset_name, image_path_pattern):
images_placeholder, endpoints = create_model(batch_size,dataset_name)
images_data = load_images(image_path_pattern, batch_size,dataset_name)
session_creator = monitored_session.ChiefSessionCreator(checkpoint_filename_with_path=checkpoint)
with monitored_session.MonitoredSession(session_creator=session_creator) as sess:
predictions = sess.run(endpoints.predicted_text,feed_dict={images_placeholder: images_data})
return [pr_bytes.decode('utf-8') for pr_bytes in predictions.tolist()]
Here, it takes images_data which --

as batch_size is 1.
Please help me to know this better.
@leandroschelb
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to demo_inference.py, including run(), create_model(), and load_images(), plus linked input/output details. Start by reading that inference path and determine what the stated (32) string and batch_size=1 represent; done means documenting the input shape and its relationship to images_data clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100