Easter2 icon indicating copy to clipboard operation
Easter2 copied to clipboard

Changing Input Image size

Open saurabhiit2007 opened this issue 2 years ago • 3 comments

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

saurabhiit2007 avatar Apr 12 '23 14:04 saurabhiit2007

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.

kartikgill avatar Apr 15 '23 15:04 kartikgill

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

saurabhiit2007 avatar Apr 16 '23 00:04 saurabhiit2007

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

kartikgill avatar Apr 25 '23 06:04 kartikgill