Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Input Image size #15

Open
saurabhiit2007 opened this issue Apr 12, 2023 · 3 comments
Open

Changing Input Image size #15

saurabhiit2007 opened this issue Apr 12, 2023 · 3 comments

Comments

@saurabhiit2007
Copy link

I am trying to reduce the image size from (2000, 80) [default] to (1000, 80) and have set LONG_LINES augmentation to False.
I am getting the following error.

tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: sequence_length(0) <= 250
[[node functional_3/ctc/CTCLoss (defined at easter_model.py:33) ]]
(1) Invalid argument: sequence_length(0) <= 250
[[node functional_3/ctc/CTCLoss (defined at easter_model.py:33) ]]
[[functional_3/ctc/CTCLoss/_154]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_11028]

Do I need to change something in the model to make it work? Please help. TIA

@kartikgill
Copy link
Owner

Hey @saurabhiit2007 ,
Thanks for trying our Easter.
For image_width=2000, compatible output shape is : 500
If you are reducing it to 1000, you should also change Output shape to 250.
Kindly try it out and let us know if anything doesn't work.

@saurabhiit2007
Copy link
Author

Thanks @kartikgill for your response.
Just for my understanding, does Output shape refers to the maximum number of characters that can be present in the input word/line? And if the input data is at word level then the input size can further be reduced with the corresponding change in the Output shape?
TIA

@kartikgill
Copy link
Owner

Hey @saurabhiit2007 ,

Output shape refers to maximum number of output character tokens from model. It should be strictly greater than you maximum output length. For more info read this - https://sid2697.github.io/Blog_Sid/algorithm/2019/11/04/Beam-search.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants