class_docstr: Constructs a Flava image processor.
  
  Args:
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by the
          `do_resize` parameter in `preprocess`.
      size (`Dict[str, int]` *optional*, defaults to `{"height": 224, "width": 224}`):
          Size of the image after resizing. Can be overridden by the `size` parameter in `preprocess`.
      resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BICUBIC`):
          Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in
          `preprocess`.
      do_center_crop (`bool`, *optional*, defaults to `True`):
          Whether to center crop the images. Can be overridden by the `do_center_crop` parameter in `preprocess`.
      crop_size (`Dict[str, int]` *optional*, defaults to `{"height": 224, "width": 224}`):
          Size of image after the center crop `(crop_size["height"], crop_size["width"])`. Can be overridden by the
          `crop_size` parameter in `preprocess`.
      do_rescale (`bool`, *optional*, defaults to `True`):
          Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale`
          parameter in `preprocess`.
      rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
          Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in
          `preprocess`.
      do_normalize (`bool`, *optional*, defaults to `True`):
          Whether to normalize the image. Can be overridden by the `do_normalize` parameter in `preprocess`.
      image_mean (`float` or `List[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 (`float` or `List[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.
      return_image_mask (`bool`, *optional*, defaults to `False`):
          Whether to return the image mask. Can be overridden by the `return_image_mask` parameter in `preprocess`.
      input_size_patches (`int`, *optional*, defaults to 14):
          Number of patches in the image in height and width direction. 14x14 = 196 total patches. Can be overridden
          by the `input_size_patches` parameter in `preprocess`.
      total_mask_patches (`int`, *optional*, defaults to 75):
          Total number of patches that should be masked. Can be overridden by the `total_mask_patches` parameter in
          `preprocess`.
      mask_group_min_patches (`int`, *optional*, defaults to 16):
          Minimum number of patches that should be masked. Can be overridden by the `mask_group_min_patches`
          parameter in `preprocess`.
      mask_group_max_patches (`int`, *optional*):
          Maximum number of patches that should be masked. Can be overridden by the `mask_group_max_patches`
          parameter in `preprocess`.
      mask_group_min_aspect_ratio (`float`, *optional*, defaults to 0.3):
          Minimum aspect ratio of the mask window. Can be overridden by the `mask_group_min_aspect_ratio` parameter
          in `preprocess`.
      mask_group_max_aspect_ratio (`float`, *optional*):
          Maximum aspect ratio of the mask window. Can be overridden by the `mask_group_max_aspect_ratio` parameter
          in `preprocess`.
      codebook_do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the input for codebook to a certain. Can be overridden by the `codebook_do_resize`
          parameter in `preprocess`. `codebook_size`.
      codebook_size (`Dict[str, int]`, *optional*, defaults to `{"height": 224, "width": 224}`):
          Resize the input for codebook to the given size. Can be overridden by the `codebook_size` parameter in
          `preprocess`.
      codebook_resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.LANCZOS`):
          Resampling filter to use if resizing the codebook image. Can be overridden by the `codebook_resample`
          parameter in `preprocess`.
      codebook_do_center_crop (`bool`, *optional*, defaults to `True`):
          Whether to crop the input for codebook at the center. If the input size is smaller than
          `codebook_crop_size` along any edge, the image is padded with 0's and then center cropped. Can be
          overridden by the `codebook_do_center_crop` parameter in `preprocess`.
      codebook_crop_size (`Dict[str, int]`, *optional*, defaults to `{"height": 224, "width": 224}`):
          Desired output size for codebook input when applying center-cropping. Can be overridden by the
          `codebook_crop_size` parameter in `preprocess`.
      codebook_do_rescale (`bool`, *optional*, defaults to `True`):
          Whether to rescale the input for codebook by the specified scale `codebook_rescale_factor`. Can be
          overridden by the `codebook_do_rescale` parameter in `preprocess`.
      codebook_rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
          Defines the scale factor to use if rescaling the codebook image. Can be overridden by the
          `codebook_rescale_factor` parameter in `preprocess`.
      codebook_do_map_pixels (`bool`, *optional*, defaults to `True`):
          Whether to map the pixel values of the codebook input to (1 - 2e)x + e. Can be overridden by the
          `codebook_do_map_pixels` parameter in `preprocess`.
      codebook_do_normalize (`bool`, *optional*, defaults to `True`):
          Whether or not to normalize the input for codebook with `codebook_image_mean` and `codebook_image_std`. Can
          be overridden by the `codebook_do_normalize` parameter in `preprocess`.
      codebook_image_mean (`Optional[Union[float, Iterable[float]]]`, *optional*, defaults to `[0, 0, 0]`):
          The sequence of means for each channel, to be used when normalizing images for codebook. Can be overridden
          by the `codebook_image_mean` parameter in `preprocess`.
      codebook_image_std (`Optional[Union[float, Iterable[float]]]`, *optional*, defaults to `[0.5, 0.5, 0.5]`):
          The sequence of standard deviations for each channel, to be used when normalizing images for codebook. Can
          be overridden by the `codebook_image_std` parameter in `preprocess`.
class_docstr_tok: ["Constructs","a","Flava","image","processor",".","Args",":","do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","image","'s","(","height",",","width",")","dimensions","to","the","specified","`","size","`",".","Can","be","overridden","by","the","`","do_resize","`","parameter","in","`","preprocess","`",".","size","(","`","Dict","[","str",",","int","]","`","*","optional","*",",","defaults","to","`","{","``","height","''",":","224",",","``","width","''",":","224","}","`",")",":","Size","of","the","image","after","resizing",".","Can","be","overridden","by","the","`","size","`","parameter","in","`","preprocess","`",".","resample","(","`","PILImageResampling","`",",","*","optional","*",",","defaults","to","`","PILImageResampling.BICUBIC","`",")",":","Resampling","filter","to","use","if","resizing","the","image",".","Can","be","overridden","by","the","`","resample","`","parameter","in","`","preprocess","`",".","do_center_crop","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","center","crop","the","images",".","Can","be","overridden","by","the","`","do_center_crop","`","parameter","in","`","preprocess","`",".","crop_size","(","`","Dict","[","str",",","int","]","`","*","optional","*",",","defaults","to","`","{","``","height","''",":","224",",","``","width","''",":","224","}","`",")",":","Size","of","image","after","the","center","crop","`","(","crop_size","[","``","height","''","]",",","crop_size","[","``","width","''","]",")","`",".","Can","be","overridden","by","the","`","crop_size","`","parameter","in","`","preprocess","`",".","do_rescale","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","rescale","the","image","by","the","specified","scale","`","rescale_factor","`",".","Can","be","overridden","by","the","`","do_rescale","`","parameter","in","`","preprocess","`",".","rescale_factor","(","`","int","`","or","`","float","`",",","*","optional","*",",","defaults","to","`","1\/255","`",")",":","Scale","factor","to","use","if","rescaling","the","image",".","Can","be","overridden","by","the","`","rescale_factor","`","parameter","in","`","preprocess","`",".","do_normalize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","normalize","the","image",".","Can","be","overridden","by","the","`","do_normalize","`","parameter","in","`","preprocess","`",".","image_mean","(","`","float","`","or","`","List","[","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","(","`","float","`","or","`","List","[","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",".","return_image_mask","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","to","return","the","image","mask",".","Can","be","overridden","by","the","`","return_image_mask","`","parameter","in","`","preprocess","`",".","input_size_patches","(","`","int","`",",","*","optional","*",",","defaults","to","14",")",":","Number","of","patches","in","the","image","in","height","and","width","direction",".","14x14","=","196","total","patches",".","Can","be","overridden","by","the","`","input_size_patches","`","parameter","in","`","preprocess","`",".","total_mask_patches","(","`","int","`",",","*","optional","*",",","defaults","to","75",")",":","Total","number","of","patches","that","should","be","masked",".","Can","be","overridden","by","the","`","total_mask_patches","`","parameter","in","`","preprocess","`",".","mask_group_min_patches","(","`","int","`",",","*","optional","*",",","defaults","to","16",")",":","Minimum","number","of","patches","that","should","be","masked",".","Can","be","overridden","by","the","`","mask_group_min_patches","`","parameter","in","`","preprocess","`",".","mask_group_max_patches","(","`","int","`",",","*","optional","*",")",":","Maximum","number","of","patches","that","should","be","masked",".","Can","be","overridden","by","the","`","mask_group_max_patches","`","parameter","in","`","preprocess","`",".","mask_group_min_aspect_ratio","(","`","float","`",",","*","optional","*",",","defaults","to","0.3",")",":","Minimum","aspect","ratio","of","the","mask","window",".","Can","be","overridden","by","the","`","mask_group_min_aspect_ratio","`","parameter","in","`","preprocess","`",".","mask_group_max_aspect_ratio","(","`","float","`",",","*","optional","*",")",":","Maximum","aspect","ratio","of","the","mask","window",".","Can","be","overridden","by","the","`","mask_group_max_aspect_ratio","`","parameter","in","`","preprocess","`",".","codebook_do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","input","for","codebook","to","a","certain",".","Can","be","overridden","by","the","`","codebook_do_resize","`","parameter","in","`","preprocess","`",".","`","codebook_size","`",".","codebook_size","(","`","Dict","[","str",",","int","]","`",",","*","optional","*",",","defaults","to","`","{","``","height","''",":","224",",","``","width","''",":","224","}","`",")",":","Resize","the","input","for","codebook","to","the","given","size",".","Can","be","overridden","by","the","`","codebook_size","`","parameter","in","`","preprocess","`",".","codebook_resample","(","`","PILImageResampling","`",",","*","optional","*",",","defaults","to","`","PILImageResampling.LANCZOS","`",")",":","Resampling","filter","to","use","if","resizing","the","codebook","image",".","Can","be","overridden","by","the","`","codebook_resample","`","parameter","in","`","preprocess","`",".","codebook_do_center_crop","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","crop","the","input","for","codebook","at","the","center",".","If","the","input","size","is","smaller","than","`","codebook_crop_size","`","along","any","edge",",","the","image","is","padded","with","0","'s","and","then","center","cropped",".","Can","be","overridden","by","the","`","codebook_do_center_crop","`","parameter","in","`","preprocess","`",".","codebook_crop_size","(","`","Dict","[","str",",","int","]","`",",","*","optional","*",",","defaults","to","`","{","``","height","''",":","224",",","``","width","''",":","224","}","`",")",":","Desired","output","size","for","codebook","input","when","applying","center-cropping",".","Can","be","overridden","by","the","`","codebook_crop_size","`","parameter","in","`","preprocess","`",".","codebook_do_rescale","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","rescale","the","input","for","codebook","by","the","specified","scale","`","codebook_rescale_factor","`",".","Can","be","overridden","by","the","`","codebook_do_rescale","`","parameter","in","`","preprocess","`",".","codebook_rescale_factor","(","`","int","`","or","`","float","`",",","*","optional","*",",","defaults","to","`","1\/255","`",")",":","Defines","the","scale","factor","to","use","if","rescaling","the","codebook","image",".","Can","be","overridden","by","the","`","codebook_rescale_factor","`","parameter","in","`","preprocess","`",".","codebook_do_map_pixels","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","map","the","pixel","values","of","the","codebook","input","to","(","1","-","2e",")","x","+","e.","Can","be","overridden","by","the","`","codebook_do_map_pixels","`","parameter","in","`","preprocess","`",".","codebook_do_normalize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","or","not","to","normalize","the","input","for","codebook","with","`","codebook_image_mean","`","and","`","codebook_image_std","`",".","Can","be","overridden","by","the","`","codebook_do_normalize","`","parameter","in","`","preprocess","`",".","codebook_image_mean","(","`","Optional","[","Union","[","float",",","Iterable","[","float","]","]","]","`",",","*","optional","*",",","defaults","to","`","[","0",",","0",",","0","]","`",")",":","The","sequence","of","means","for","each","channel",",","to","be","used","when","normalizing","images","for","codebook",".","Can","be","overridden","by","the","`","codebook_image_mean","`","parameter","in","`","preprocess","`",".","codebook_image_std","(","`","Optional","[","Union","[","float",",","Iterable","[","float","]","]","]","`",",","*","optional","*",",","defaults","to","`","[","0.5",",","0.5",",","0.5","]","`",")",":","The","sequence","of","standard","deviations","for","each","channel",",","to","be","used","when","normalizing","images","for","codebook",".","Can","be","overridden","by","the","`","codebook_image_std","`","parameter","in","`","preprocess","`","."]
code: def map_pixels(self, image: np.ndarray) -> np.ndarray:
      return (1 - 2 * LOGIT_LAPLACE_EPS) * image + LOGIT_LAPLACE_EPS
  
imports: import math
  import random
  from functools import lru_cache
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  from ...image_transforms import resize, to_channel_dimension_format
  from ...image_utils import OPENAI_CLIP_MEAN, OPENAI_CLIP_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_vision_available, logging
label_desc: Use image node_id 5 for calling the FlavaImageProcessor obj's underlying member method code with example usage: obj.map_pixels(image) and returns: unknown