class_docstr: Constructs a LayoutLMv3 image processor.
  
  Args:
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the image's (height, width) dimensions to `(size["height"], size["width"])`. Can be
          overridden by `do_resize` in `preprocess`.
      size (`Dict[str, int]` *optional*, defaults to `{"height": 224, "width": 224}`):
          Size of the image after resizing. Can be overridden by `size` in `preprocess`.
      resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`):
          Resampling filter to use if resizing the image. Can be overridden by `resample` in `preprocess`.
      do_rescale (`bool`, *optional*, defaults to `True`):
          Whether to rescale the image's pixel values by the specified `rescale_value`. Can be overridden by
          `do_rescale` in `preprocess`.
      rescale_factor (`float`, *optional*, defaults to 1 / 255):
          Value by which the image's pixel values are rescaled. Can be overridden by `rescale_factor` in
          `preprocess`.
      do_normalize (`bool`, *optional*, defaults to `True`):
          Whether to normalize the image. Can be overridden by the `do_normalize` parameter in the `preprocess`
          method.
      image_mean (`Iterable[float]` or `float`, *optional*, defaults to `IMAGENET_STANDARD_MEAN`):
          Mean to use if normalizing the image. This is a float or list of floats the length of the number of
          channels in the image. Can be overridden by the `image_mean` parameter in the `preprocess` method.
      image_std (`Iterable[float]` or `float`, *optional*, defaults to `IMAGENET_STANDARD_STD`):
          Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
          number of channels in the image. Can be overridden by the `image_std` parameter in the `preprocess` method.
      apply_ocr (`bool`, *optional*, defaults to `True`):
          Whether to apply the Tesseract OCR engine to get words + normalized bounding boxes. Can be overridden by
          the `apply_ocr` parameter in the `preprocess` method.
      ocr_lang (`str`, *optional*):
          The language, specified by its ISO code, to be used by the Tesseract OCR engine. By default, English is
          used. Can be overridden by the `ocr_lang` parameter in the `preprocess` method.
      tesseract_config (`str`, *optional*):
          Any additional custom configuration flags that are forwarded to the `config` parameter when calling
          Tesseract. For example: '--psm 6'. Can be overridden by the `tesseract_config` parameter in the
          `preprocess` method.
class_docstr_tok: ["Constructs","a","LayoutLMv3","image","processor",".","Args",":","do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","image","'s","(","height",",","width",")","dimensions","to","`","(","size","[","``","height","''","]",",","size","[","``","width","''","]",")","`",".","Can","be","overridden","by","`","do_resize","`","in","`","preprocess","`",".","size","(","`","Dict","[","str",",","int","]","`","*","optional","*",",","defaults","to","`","{","``","height","''",":","224",",","``","width","''",":","224","}","`",")",":","Size","of","the","image","after","resizing",".","Can","be","overridden","by","`","size","`","in","`","preprocess","`",".","resample","(","`","PILImageResampling","`",",","*","optional","*",",","defaults","to","`","PILImageResampling.BILINEAR","`",")",":","Resampling","filter","to","use","if","resizing","the","image",".","Can","be","overridden","by","`","resample","`","in","`","preprocess","`",".","do_rescale","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","rescale","the","image","'s","pixel","values","by","the","specified","`","rescale_value","`",".","Can","be","overridden","by","`","do_rescale","`","in","`","preprocess","`",".","rescale_factor","(","`","float","`",",","*","optional","*",",","defaults","to","1","\/","255",")",":","Value","by","which","the","image","'s","pixel","values","are","rescaled",".","Can","be","overridden","by","`","rescale_factor","`","in","`","preprocess","`",".","do_normalize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","normalize","the","image",".","Can","be","overridden","by","the","`","do_normalize","`","parameter","in","the","`","preprocess","`","method",".","image_mean","(","`","Iterable","[","float","]","`","or","`","float","`",",","*","optional","*",",","defaults","to","`","IMAGENET_STANDARD_MEAN","`",")",":","Mean","to","use","if","normalizing","the","image",".","This","is","a","float","or","list","of","floats","the","length","of","the","number","of","channels","in","the","image",".","Can","be","overridden","by","the","`","image_mean","`","parameter","in","the","`","preprocess","`","method",".","image_std","(","`","Iterable","[","float","]","`","or","`","float","`",",","*","optional","*",",","defaults","to","`","IMAGENET_STANDARD_STD","`",")",":","Standard","deviation","to","use","if","normalizing","the","image",".","This","is","a","float","or","list","of","floats","the","length","of","the","number","of","channels","in","the","image",".","Can","be","overridden","by","the","`","image_std","`","parameter","in","the","`","preprocess","`","method",".","apply_ocr","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","apply","the","Tesseract","OCR","engine","to","get","words","+","normalized","bounding","boxes",".","Can","be","overridden","by","the","`","apply_ocr","`","parameter","in","the","`","preprocess","`","method",".","ocr_lang","(","`","str","`",",","*","optional","*",")",":","The","language",",","specified","by","its","ISO","code",",","to","be","used","by","the","Tesseract","OCR","engine",".","By","default",",","English","is","used",".","Can","be","overridden","by","the","`","ocr_lang","`","parameter","in","the","`","preprocess","`","method",".","tesseract_config","(","`","str","`",",","*","optional","*",")",":","Any","additional","custom","configuration","flags","that","are","forwarded","to","the","`","config","`","parameter","when","calling","Tesseract",".","For","example",":","'","--","psm","6","'",".","Can","be","overridden","by","the","`","tesseract_config","`","parameter","in","the","`","preprocess","`","method","."]
code: def __init__(
      self,
      do_resize: bool = True,
      size: Dict[str, int] = None,
      resample: PILImageResampling = PILImageResampling.BILINEAR,
      do_rescale: bool = True,
      rescale_value: float = 1 / 255,
      do_normalize: bool = True,
      image_mean: Union[float, Iterable[float]] = None,
      image_std: Union[float, Iterable[float]] = None,
      apply_ocr: bool = True,
      ocr_lang: Optional[str] = None,
      tesseract_config: Optional[str] = "",
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      size = size if size is not None else {"height": 224, "width": 224}
      size = get_size_dict(size)
  
      self.do_resize = do_resize
      self.size = size
      self.resample = resample
      self.do_rescale = do_rescale
      self.rescale_factor = rescale_value
      self.do_normalize = do_normalize
      self.image_mean = (
          image_mean
          if image_mean is not None
          else IMAGENET_STANDARD_MEAN
      )
      self.image_std = (
          image_std if image_std is not None else IMAGENET_STANDARD_STD
      )
      self.apply_ocr = apply_ocr
      self.ocr_lang = ocr_lang
      self.tesseract_config = tesseract_config
  
file_path: transformers/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py
imports: from typing import Dict, Iterable, Optional, Union
  import numpy
  from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  from ...image_transforms import resize, to_channel_dimension_format, to_pil_image
  from ...image_utils import IMAGENET_STANDARD_MEAN, IMAGENET_STANDARD_STD, ChannelDimension, ImageInput, PILImageResampling, infer_channel_dimension_format, is_scaled_image, make_list_of_images, to_numpy_array, valid_images
  from ...utils import TensorType, is_pytesseract_available, is_vision_available, logging, requires_backends
label_desc: Use image node_id 1 to create a new LayoutLMv3ImageProcessor object from inherited base classes: BaseImageProcessor with example: obj = LayoutLMv3ImageProcessor(do_resize, size, resample, do_rescale, rescale_value, do_normalize, image_mean, image_std, apply_ocr, ocr_lang, tesseract_config)