class_docstr: Base class for detectors.
docstr: Args:
      img (list[Tensor]): List of tensors of shape (1, C, H, W).
          Typically these should be mean centered and std scaled.
      img_metas (list[dict]): List of image info dict where each dict
          has: 'img_shape', 'scale_factor', 'flip', and may also contain
          'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'.
          For details on the values of these keys, see
          :class:`mmdet.datasets.pipelines.Collect`.
      kwargs (keyword arguments): Specific to concrete implementation.
docstr_tok: ["Args",":","img","(","list","[","Tensor","]",")",":","List","of","tensors","of","shape","(","1",",","C",",","H",",","W",")",".","Typically","these","should","be","mean","centered","and","std","scaled",".","img_metas","(","list","[","dict","]",")",":","List","of","image","info","dict","where","each","dict","has",":","'img_shape","'",",","'scale_factor","'",",","'flip","'",",","and","may","also","contain","'filename","'",",","'ori_shape","'",",","'pad_shape","'",",","and","'img_norm_cfg","'",".","For","details","on","the","values","of","these","keys",",","see",":","class",":","`","mmdet.datasets.pipelines.Collect","`",".","kwargs","(","keyword","arguments",")",":","Specific","to","concrete","implementation","."]
code: def forward_train(self, imgs, img_metas, **kwargs):
      """
      Args:
          img (list[Tensor]): List of tensors of shape (1, C, H, W).
              Typically these should be mean centered and std scaled.
          img_metas (list[dict]): List of image info dict where each dict
              has: 'img_shape', 'scale_factor', 'flip', and may also contain
              'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'.
              For details on the values of these keys, see
              :class:`mmdet.datasets.pipelines.Collect`.
          kwargs (keyword arguments): Specific to concrete implementation.
      """
      # NOTE the batched image size information may be useful, e.g.
      # in DETR, this is needed for the construction of masks, which is
      # then used for the transformer_head.
      batch_input_shape = tuple(imgs[0].size()[-2:])
      for img_meta in img_metas:
          img_meta["batch_input_shape"] = batch_input_shape
  
imports: from abc import ABCMeta, abstractmethod
  from collections import OrderedDict
  import mmcv
  import numpy
  import torch
  import torch.distributed
  import torch.nn
  from mmcv.runner import auto_fp16
  from mmcv.utils import print_log
  from mmdet.utils import get_root_logger
label_desc: Use image node_id 8 for calling the BaseDetector obj's underlying member method code with example usage: obj.forward_train(imgs, img_metas) without return types