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

Batch prediction #389

Closed
aniketmaurya opened this issue Mar 8, 2021 · 3 comments
Closed

Batch prediction #389

aniketmaurya opened this issue Mar 8, 2021 · 3 comments

Comments

@aniketmaurya
Copy link

aniketmaurya commented Mar 8, 2021

Hi! Is there any plan for batch inference or passing list of images/image path list in the readtext function?

I see that recognize takes batch_size arg but img_cv_grey seem to be single image only. How do I infer on a batch of image?

def recognize(self, img_cv_grey, horizontal_list=None, free_list=None,\
                  decoder = 'greedy', beamWidth= 5, batch_size = 1,\
                  workers = 0, allowlist = None, blocklist = None, detail = 1,\
                  rotation_info = None,\
                  paragraph = False,\
                  contrast_ths = 0.1,adjust_contrast = 0.5, filter_ths = 0.003,\
                  reformat=True):
@aniketmaurya aniketmaurya changed the title Batch prediction for readtext Batch prediction for readtext Mar 8, 2021
@aniketmaurya aniketmaurya changed the title Batch prediction for readtext Batch prediction Mar 8, 2021
@rkcosmos
Copy link
Contributor

It is currently processing images one-by-one. Adjusting batch_size may improve your GPU utilization. This means EasyOCR will process several text boxes (in the same images) at the same times.

@SamSamhuns
Copy link
Contributor

I have opened a PR #458 for this

@aniketmaurya
Copy link
Author

awesome! Thank you @SamSamhuns

@rkcosmos rkcosmos closed this as completed Mar 2, 2022
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

3 participants