flow_inference.infer_textlines

Run batched TrOCR inference on line-level image records.

This module prepares Hugging Face-style records for PyTorch batching, runs a TrOCR-compatible model on processed line images, decodes generated token IDs, and returns predictions together with their source metadata.

Classes

InferenceHandler(model, processor, device)

Run TrOCR inference for line-level OCR/HTR records.