class_docstr: YOLOV3Head Paper link: https://arxiv.org/abs/1804.02767.
  
  Args:
      num_classes (int): The number of object classes (w/o background)
      in_channels (List[int]): Number of input channels per scale.
      out_channels (List[int]): The number of output channels per scale
          before the final 1x1 layer. Default: (1024, 512, 256).
      anchor_generator (dict): Config dict for anchor generator
      bbox_coder (dict): Config of bounding box coder.
      featmap_strides (List[int]): The stride of each scale.
          Should be in descending order. Default: (32, 16, 8).
      one_hot_smoother (float): Set a non-zero value to enable label-smooth
          Default: 0.
      conv_cfg (dict): Config dict for convolution layer. Default: None.
      norm_cfg (dict): Dictionary to construct and config norm layer.
          Default: dict(type='BN', requires_grad=True)
      act_cfg (dict): Config dict for activation layer.
          Default: dict(type='LeakyReLU', negative_slope=0.1).
      loss_cls (dict): Config of classification loss.
      loss_conf (dict): Config of confidence loss.
      loss_xy (dict): Config of xy coordinate loss.
      loss_wh (dict): Config of wh coordinate loss.
      train_cfg (dict): Training config of YOLOV3 head. Default: None.
      test_cfg (dict): Testing config of YOLOV3 head. Default: None.
class_docstr_tok: ["YOLOV3Head","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1804.02767",".","Args",":","num_classes","(","int",")",":","The","number","of","object","classes","(","w\/o","background",")","in_channels","(","List","[","int","]",")",":","Number","of","input","channels","per","scale",".","out_channels","(","List","[","int","]",")",":","The","number","of","output","channels","per","scale","before","the","final","1x1","layer",".","Default",":","(","1024",",","512",",","256",")",".","anchor_generator","(","dict",")",":","Config","dict","for","anchor","generator","bbox_coder","(","dict",")",":","Config","of","bounding","box","coder",".","featmap_strides","(","List","[","int","]",")",":","The","stride","of","each","scale",".","Should","be","in","descending","order",".","Default",":","(","32",",","16",",","8",")",".","one_hot_smoother","(","float",")",":","Set","a","non-zero","value","to","enable","label-smooth","Default",":","0.","conv_cfg","(","dict",")",":","Config","dict","for","convolution","layer",".","Default",":","None",".","norm_cfg","(","dict",")",":","Dictionary","to","construct","and","config","norm","layer",".","Default",":","dict","(","type='BN","'",",","requires_grad=True",")","act_cfg","(","dict",")",":","Config","dict","for","activation","layer",".","Default",":","dict","(","type='LeakyReLU","'",",","negative_slope=0.1",")",".","loss_cls","(","dict",")",":","Config","of","classification","loss",".","loss_conf","(","dict",")",":","Config","of","confidence","loss",".","loss_xy","(","dict",")",":","Config","of","xy","coordinate","loss",".","loss_wh","(","dict",")",":","Config","of","wh","coordinate","loss",".","train_cfg","(","dict",")",":","Training","config","of","YOLOV3","head",".","Default",":","None",".","test_cfg","(","dict",")",":","Testing","config","of","YOLOV3","head",".","Default",":","None","."]
docstr: Transform network output for a batch into bbox predictions.
  
  Args:
      pred_maps (list[Tensor]): Raw predictions for a batch of images.
      img_metas (list[dict]): Meta information of each image, e.g.,
          image size, scaling factor, etc.
      cfg (mmcv.Config | None): Test / postprocessing configuration,
          if None, test_cfg would be used. Default: None.
      rescale (bool): If True, return boxes in original image space.
          Default: False.
      with_nms (bool): If True, do nms before return boxes.
          Default: True.
  
  Returns:
      list[tuple[Tensor, Tensor]]: Each item in result_list is 2-tuple.
          The first item is an (n, 5) tensor, where the first 4 columns
          are bounding box positions (tl_x, tl_y, br_x, br_y) and the
          5-th column is a score between 0 and 1. The second item is a
          (n,) tensor where each item is the predicted class label of the
          corresponding box.
docstr_tok: ["Transform","network","output","for","a","batch","into","bbox","predictions",".","Args",":","pred_maps","(","list","[","Tensor","]",")",":","Raw","predictions","for","a","batch","of","images",".","img_metas","(","list","[","dict","]",")",":","Meta","information","of","each","image",",","e.g.",",","image","size",",","scaling","factor",",","etc",".","cfg","(","mmcv.Config","|","None",")",":","Test","\/","postprocessing","configuration",",","if","None",",","test_cfg","would","be","used",".","Default",":","None",".","rescale","(","bool",")",":","If","True",",","return","boxes","in","original","image","space",".","Default",":","False",".","with_nms","(","bool",")",":","If","True",",","do","nms","before","return","boxes",".","Default",":","True",".","Returns",":","list","[","tuple","[","Tensor",",","Tensor","]","]",":","Each","item","in","result_list","is","2-tuple",".","The","first","item","is","an","(","n",",","5",")","tensor",",","where","the","first","4","columns","are","bounding","box","positions","(","tl_x",",","tl_y",",","br_x",",","br_y",")","and","the","5-th","column","is","a","score","between","0","and","1",".","The","second","item","is","a","(","n",",",")","tensor","where","each","item","is","the","predicted","class","label","of","the","corresponding","box","."]
code: def get_bboxes(
      self, pred_maps, img_metas, cfg=None, rescale=False, with_nms=True
  ):
      """Transform network output for a batch into bbox predictions.
  
      Args:
          pred_maps (list[Tensor]): Raw predictions for a batch of images.
          img_metas (list[dict]): Meta information of each image, e.g.,
              image size, scaling factor, etc.
          cfg (mmcv.Config | None): Test / postprocessing configuration,
              if None, test_cfg would be used. Default: None.
          rescale (bool): If True, return boxes in original image space.
              Default: False.
          with_nms (bool): If True, do nms before return boxes.
              Default: True.
  
      Returns:
          list[tuple[Tensor, Tensor]]: Each item in result_list is 2-tuple.
              The first item is an (n, 5) tensor, where the first 4 columns
              are bounding box positions (tl_x, tl_y, br_x, br_y) and the
              5-th column is a score between 0 and 1. The second item is a
              (n,) tensor where each item is the predicted class label of the
              corresponding box.
      """
      result_list = []
      num_levels = len(pred_maps)
      for img_id in range(len(img_metas)):
          pred_maps_list = [
              pred_maps[i][img_id].detach() for i in range(num_levels)
          ]
          scale_factor = img_metas[img_id]["scale_factor"]
          proposals = self._get_bboxes_single(
              pred_maps_list, scale_factor, cfg, rescale, with_nms
          )
          result_list.append(proposals)
      return result_list
  
imports: import warnings
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, normal_init
  from mmcv.runner import force_fp32
  from mmdet.core import build_anchor_generator, build_assigner, build_bbox_coder, build_sampler, images_to_levels, multi_apply, multiclass_nms
  from ..builder import HEADS, build_loss
  from .base_dense_head import BaseDenseHead
  from .dense_test_mixins import BBoxTestMixin
label_desc: Use image node_id 7 for calling the YOLOV3Head obj's underlying member method code with example usage: obj.get_bboxes(pred_maps, img_metas, cfg, rescale, with_nms) and returns: result_list