class_docstr: Constructs a MobileViT feature extractor.
  
  This feature extractor inherits from [`FeatureExtractionMixin`] which contains most of the main methods. Users
  should refer to this superclass for more information regarding those methods.
  
  Args:
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the input to a certain `size`.
      size (`int` or `Tuple(int)`, *optional*, defaults to 288):
          Resize the input to the given size. If a tuple is provided, it should be (width, height). If only an
          integer is provided, then the input will be resized to match the shorter side. Only has an effect if
          `do_resize` is set to `True`.
      resample (`int`, *optional*, defaults to `PIL.Image.Resampling.BILINEAR`):
          An optional resampling filter. This can be one of `PIL.Image.Resampling.NEAREST`,
          `PIL.Image.Resampling.BOX`, `PIL.Image.Resampling.BILINEAR`, `PIL.Image.Resampling.HAMMING`,
          `PIL.Image.Resampling.BICUBIC` or `PIL.Image.Resampling.LANCZOS`. Only has an effect if `do_resize` is set
          to `True`.
      do_center_crop (`bool`, *optional*, defaults to `True`):
          Whether to crop the input at the center. If the input size is smaller than `crop_size` along any edge, the
          image is padded with 0's and then center cropped.
      crop_size (`int`, *optional*, defaults to 256):
          Desired output size when applying center-cropping. Only has an effect if `do_center_crop` is set to `True`.
      do_flip_channel_order (`bool`, *optional*, defaults to `True`):
          Whether to flip the color channels from RGB to BGR.
class_docstr_tok: ["Constructs","a","MobileViT","feature","extractor",".","This","feature","extractor","inherits","from","[","`","FeatureExtractionMixin","`","]","which","contains","most","of","the","main","methods",".","Users","should","refer","to","this","superclass","for","more","information","regarding","those","methods",".","Args",":","do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","input","to","a","certain","`","size","`",".","size","(","`","int","`","or","`","Tuple","(","int",")","`",",","*","optional","*",",","defaults","to","288",")",":","Resize","the","input","to","the","given","size",".","If","a","tuple","is","provided",",","it","should","be","(","width",",","height",")",".","If","only","an","integer","is","provided",",","then","the","input","will","be","resized","to","match","the","shorter","side",".","Only","has","an","effect","if","`","do_resize","`","is","set","to","`","True","`",".","resample","(","`","int","`",",","*","optional","*",",","defaults","to","`","PIL.Image.Resampling.BILINEAR","`",")",":","An","optional","resampling","filter",".","This","can","be","one","of","`","PIL.Image.Resampling.NEAREST","`",",","`","PIL.Image.Resampling.BOX","`",",","`","PIL.Image.Resampling.BILINEAR","`",",","`","PIL.Image.Resampling.HAMMING","`",",","`","PIL.Image.Resampling.BICUBIC","`","or","`","PIL.Image.Resampling.LANCZOS","`",".","Only","has","an","effect","if","`","do_resize","`","is","set","to","`","True","`",".","do_center_crop","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","crop","the","input","at","the","center",".","If","the","input","size","is","smaller","than","`","crop_size","`","along","any","edge",",","the","image","is","padded","with","0","'s","and","then","center","cropped",".","crop_size","(","`","int","`",",","*","optional","*",",","defaults","to","256",")",":","Desired","output","size","when","applying","center-cropping",".","Only","has","an","effect","if","`","do_center_crop","`","is","set","to","`","True","`",".","do_flip_channel_order","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","flip","the","color","channels","from","RGB","to","BGR","."]
code: def __init__(
      self,
      do_resize=True,
      size=288,
      resample=PILImageResampling.BILINEAR,
      do_center_crop=True,
      crop_size=256,
      do_flip_channel_order=True,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.do_resize = do_resize
      self.size = size
      self.resample = resample
      self.do_center_crop = do_center_crop
      self.crop_size = crop_size
      self.do_flip_channel_order = do_flip_channel_order
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/mobilevit/feature_extraction_mobilevit.py
imports: from typing import List, Optional, Tuple, Union
  import numpy
  from PIL import Image
  from transformers.image_utils import PILImageResampling
  from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
  from ...image_utils import ImageFeatureExtractionMixin, ImageInput, is_torch_tensor
  from ...utils import TensorType, is_torch_available, logging
label_desc: Use image node_id 1 to create a new MobileViTFeatureExtractor object from inherited base classes: FeatureExtractionMixin, ImageFeatureExtractionMixin with example: obj = MobileViTFeatureExtractor(do_resize, size, resample, do_center_crop, crop_size, do_flip_channel_order)