bounding boxes, as well to resize the image to a given size in order to get the image input. The words and
normalized bounding boxes are then provided to [LayoutLMv2Tokenizer] or
[LayoutLMv2TokenizerFast], which converts them to token-level input_ids,
attention_mask, token_type_ids, bbox. Optionally, one can provide word labels to the processor,
which are turned into token-level labels.
[LayoutLMv2Processor] uses PyTesseract, a Python
wrapper around Google's Tesseract OCR engine, under the hood. Note that you can still use your own OCR engine of
choice, and provide the words and normalized boxes yourself. This requires initializing
[LayoutLMv2FeatureExtractor] with apply_ocr set to False.
In total, there are 5 use cases that are supported by the processor. Below, we list them all. Note that each of these
