table-transformer icon indicating copy to clipboard operation
table-transformer copied to clipboard

How do I perform Batch Inference for TSR?

Open aashishpokharel opened this issue 2 months ago • 1 comments

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?

aashishpokharel avatar Apr 10 '24 09:04 aashishpokharel

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.

NielsRogge avatar May 08 '24 17:05 NielsRogge