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

What is the dimension of image that is passed to the model for prediction ? #230

Open
lordzuko opened this issue Jul 11, 2017 · 3 comments

Comments

@lordzuko
Copy link

What is the dimension of image that is passed to the model for prediction ?

@zuphilip
Copy link
Collaborator

The input text lines can have different sizes but they are normalized before training and prediction, see also https://github.com/tmbdev/ocropy/blob/master/doc/line-normalization.ipynb such that the height of the text lines (the model will see) is fixed to 48 pixels AFAIK.

@lordzuko
Copy link
Author

@zuphilip What about the width of image? Is there an upper limit which has been set, because AFAIK we can't pass variable dimension images to model, so what I can assume is since it is training on A4 size paper I can guess that the width of paper is the maximum width of image that is being input to the model? Please, Correct me if I am wrong.

@zuphilip
Copy link
Collaborator

Do you experience an error like "RecognitionError: input too large for LSTM model"? It seems that for the standard English model the N in https://github.com/tmbdev/ocropy/blob/f7b163c089d6db05a90bd52f6f60731ab4638b2d/ocrolib/lstm.py#L557 is set to 5000.

@zuphilip zuphilip changed the title What is the dimention of image that is passed to the model for prediction ? What is the dimension of image that is passed to the model for prediction ? Jul 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants