class_docstr: Constructs a DETR 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:
      format (`str`, *optional*, defaults to `"coco_detection"`):
          Data format of the annotations. One of "coco_detection" or "coco_panoptic".
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the input to a certain `size`.
      size (`int`, *optional*, defaults to 800):
          Resize the input to the given size. Only has an effect if `do_resize` is set to `True`. If size is a
          sequence like `(width, height)`, output size will be matched to this. If size is an int, smaller edge of
          the image will be matched to this number. i.e, if `height > width`, then image will be rescaled to `(size *
          height / width, size)`.
      max_size (`int`, *optional*, defaults to 1333):
          The largest size an image dimension can have (otherwise it's capped). Only has an effect if `do_resize` is
          set to `True`.
      do_normalize (`bool`, *optional*, defaults to `True`):
          Whether or not to normalize the input with mean and standard deviation.
      image_mean (`int`, *optional*, defaults to `[0.485, 0.456, 0.406]`):
          The sequence of means for each channel, to be used when normalizing images. Defaults to the ImageNet mean.
      image_std (`int`, *optional*, defaults to `[0.229, 0.224, 0.225]`):
          The sequence of standard deviations for each channel, to be used when normalizing images. Defaults to the
          ImageNet std.
code: def __init__(
      self,
      format="coco_detection",
      do_resize=True,
      size=800,
      max_size=1333,
      do_normalize=True,
      image_mean=None,
      image_std=None,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.format = self._is_valid_format(format)
      self.do_resize = do_resize
      self.size = size
      self.max_size = max_size
      self.do_normalize = do_normalize
      self.image_mean = (
          image_mean
          if image_mean is not None
          else [0.485, 0.456, 0.406]
      )  # ImageNet mean
      self.image_std = (
          image_std if image_std is not None else [0.229, 0.224, 0.225]
      )
  
imports: import io
  import pathlib
  import warnings
  from collections import defaultdict
  from typing import Dict, List, Optional, Set, Tuple, Union
  import numpy
  from PIL import Image
  from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
  from ...image_utils import ImageFeatureExtractionMixin, is_torch_tensor
  from ...utils import TensorType, is_torch_available, logging
label_desc: Use image node_id 1 to create a new DetrFeatureExtractor object from inherited base classes: FeatureExtractionMixin, ImageFeatureExtractionMixin with example: obj = DetrFeatureExtractor(format, do_resize, size, max_size, do_normalize, image_mean, image_std)