flow_inference

Flow Inference - TrOCR inference and evaluation package.

Modules

configure_dataset_card

Build Hugging Face dataset README files for dataset card in inference result repositories.

create_trocr_dataset

Provide a PyTorch dataset wrapper for TrOCR inference records.

data_handling

Handle Hugging Face dataset download, conversion, update, and upload workflows.

evaluation

Evaluate OCR/HTR inference results stored in Hugging Face datasets.

image_processing

Load, normalize, resize, and process images for TrOCR inference.

infer_textlines

Run batched TrOCR inference on line-level image records.

inference

Run the end-to-end TrOCR inference workflow for Hugging Face datasets.

model_handling

Load TrOCR models and processors for inference.

status

Track and log progress for inference jobs.

utils

Utility modules for flow-inference.

voyant_export

Export OCR/HTR inference results as Voyant-compatible text archives.

write_inference_to_raw_xml

Write line-level inference results back into raw XML datasets.

xml_processing

Utilities for inserting inferred text into PAGE XML documents.