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

How do I perform Batch Inference for TSR? #177

Open
aashishpokharel opened this issue Apr 10, 2024 · 1 comment
Open

How do I perform Batch Inference for TSR? #177

aashishpokharel opened this issue Apr 10, 2024 · 1 comment

Comments

@aashishpokharel
Copy link

I have a pdf and have converted it to the images. Now I want to pass it through the TETR for Table Structure Recognition.
Is there a way to run Inference with batch size > 1 for TSR?
Can it be done using the inference.py or I need to run in the eval mode?

@NielsRogge
Copy link

NielsRogge commented May 8, 2024

Hi,

Batched inference is supported by default in the Transformers library as shown here. Just pass multiple images to the image processor, and multiple target sizes to the post_process_object_detection method.

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