class_docstr: Implement Detr
class_docstr_tok: ["Implement","Detr"]
docstr: Normalize, pad and batch the input images.
docstr_tok: ["Normalize",",","pad","and","batch","the","input","images","."]
code: def preprocess_image(self, batched_inputs):
      """
      Normalize, pad and batch the input images.
      """
      images = [
          self.normalizer(x["image"].to(self.device))
          for x in batched_inputs
      ]
      images = ImageList.from_tensors(images)
      return images
  
imports: import logging
  import math
  from typing import List
  import numpy
  import torch
  import torch.distributed
  import torch.nn.functional
  from scipy.optimize import linear_sum_assignment
  from torch import nn
  from detectron2.layers import ShapeSpec
  from detectron2.modeling import META_ARCH_REGISTRY, build_backbone, detector_postprocess
  from detectron2.structures import Boxes, ImageList, Instances, BitMasks, PolygonMasks
  from detectron2.utils.logger import log_first_n
  from fvcore.nn import giou_loss, smooth_l1_loss
  from models.backbone import Joiner
  from models.detr import DETR, SetCriterion
  from models.matcher import HungarianMatcher
  from models.position_encoding import PositionEmbeddingSine
  from models.transformer import Transformer
  from models.segmentation import DETRsegm, PostProcessPanoptic, PostProcessSegm
  from util.box_ops import box_cxcywh_to_xyxy, box_xyxy_to_cxcywh
  from util.misc import NestedTensor
  from datasets.coco import convert_coco_poly_to_mask
label_desc: Use image node_id 5 for calling the Detr obj's underlying member method code with example usage: obj.preprocess_image(batched_inputs) and returns: images