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

Recognize more than one line at a time #20

Open
mikegerber opened this issue Dec 6, 2019 · 2 comments
Open

Recognize more than one line at a time #20

mikegerber opened this issue Dec 6, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mikegerber
Copy link
Collaborator

No description provided.

@mikegerber mikegerber added the enhancement New feature or request label Dec 6, 2019
@mikegerber mikegerber self-assigned this Dec 6, 2019
@mikegerber
Copy link
Collaborator Author

Related, from a private email between @kba and @andbue, copied with permission:

Hi Konstantin, ich hatte, als ich auf ocrd_calamari gestoßen bin, den Eindruck, dass predictor.predict_raw suboptimal ist, weil damit jede Zeile einzeln ins Netz geworfen wird, nicht eine komplette Batch. Eine größere Parallelisierung auf der GPU müsste eigentlich einen Geschwindigkeitsvorteil bieten, nach allem was ich darüber bisher gelesen habe. Jetzt habe ich allerdings in die Standardparameter von Calamari einen Blick geworfen und zu meinem Erstaunen festgestellt, dass dort auch eine batch_size von 1 festgelegt ist. Insofern macht das dann doch keinen Unterschied.

@bertsky
Copy link
Contributor

bertsky commented Aug 19, 2022

IIUC this is no more the case in Calamari 2 BTW. This uses https://github.com/Planet-AI-GmbH/tfaip/blob/516a1f176e979c0abeb305550be0682c25a059e3/tfaip/data/databaseparams.py#L64 by default. The new predict_raw will delegate to predict_pipeline with an ad-hoc config. (But perhaps we should set up predict_pipeline directly to have true parallelism between the PAGE pre-/post-processing on the CPU and the Tensorflow prediction on the GPU.)

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

No branches or pull requests

2 participants