Inference for AttentionOCR model
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
Hi @kumariko Any idea for this isuue?
@kumariko This model trained on TF1.x version. Still model can be exported to saved format. Can we use TF2.x for model and training. Pls reply.
pls update on this.
@kumariko This model trained on TF1.x version. Still model can be exported to saved format. Can we use TF2.x for model and training. Pls reply.
You should be able to use TF2.x for training and inference
@kumariko This model trained on TF1.x version. Still model can be exported to saved format. Can we use TF2.x for model and training. Pls reply.
You should be able to use TF2.x for training and inference
Same issue with TF2.x inferencing. Input details are not clear
@neso613 Could you please try with TF v2.8.0 and let us know if it is still an issue ? Thanks!
@neso613 Could you please try with TF v2.8.0 and let us know if it is still an issue ? Thanks!
sure , I'll do and keep the forum updated thanks
Hi @sushreebarsa I have upgraded TF version to 2.8 but still no success

@neso613 Could you please confirm if you are using the same type of normalization which was used in training? In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
@neso613 Could you please confirm if you are using the same type of normalization which was used in training? In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!
Yes