class_docstr: CornerNet.
  
  This detector is the implementation of the paper `CornerNet: Detecting
  Objects as Paired Keypoints <https://arxiv.org/abs/1808.01244>`_ .
docstr: Augment testing of CornerNet.
  
  Args:
      imgs (list[Tensor]): Augmented images.
      img_metas (list[list[dict]]): Meta information of each image, e.g.,
          image size, scaling factor, etc.
      rescale (bool): If True, return boxes in original image space.
          Default: False.
  
  Note:
      ``imgs`` must including flipped image pairs.
  
  Returns:
      list[list[np.ndarray]]: BBox results of each image and classes.
          The outer list corresponds to each image. The inner list
          corresponds to each class.
docstr_tok: ["Augment","testing","of","CornerNet",".","Args",":","imgs","(","list","[","Tensor","]",")",":","Augmented","images",".","img_metas","(","list","[","list","[","dict","]","]",")",":","Meta","information","of","each","image",",","e.g.",",","image","size",",","scaling","factor",",","etc",".","rescale","(","bool",")",":","If","True",",","return","boxes","in","original","image","space",".","Default",":","False",".","Note",":","``","imgs","``","must","including","flipped","image","pairs",".","Returns",":","list","[","list","[","np.ndarray","]","]",":","BBox","results","of","each","image","and","classes",".","The","outer","list","corresponds","to","each","image",".","The","inner","list","corresponds","to","each","class","."]
code: def aug_test(self, imgs, img_metas, rescale=False):
      """Augment testing of CornerNet.
  
      Args:
          imgs (list[Tensor]): Augmented images.
          img_metas (list[list[dict]]): Meta information of each image, e.g.,
              image size, scaling factor, etc.
          rescale (bool): If True, return boxes in original image space.
              Default: False.
  
      Note:
          ``imgs`` must including flipped image pairs.
  
      Returns:
          list[list[np.ndarray]]: BBox results of each image and classes.
              The outer list corresponds to each image. The inner list
              corresponds to each class.
      """
      img_inds = list(range(len(imgs)))
  
      assert (
          img_metas[0][0]["flip"] + img_metas[1][0]["flip"]
      ), "aug test must have flipped image pair"
      aug_results = []
      for ind, flip_ind in zip(img_inds[0::2], img_inds[1::2]):
          img_pair = torch.cat([imgs[ind], imgs[flip_ind]])
          x = self.extract_feat(img_pair)
          outs = self.bbox_head(x)
          bbox_list = self.bbox_head.get_bboxes(
              *outs, [img_metas[ind], img_metas[flip_ind]], False, False
          )
          aug_results.append(bbox_list[0])
          aug_results.append(bbox_list[1])
  
      bboxes, labels = self.merge_aug_results(aug_results, img_metas)
      bbox_results = bbox2result(
          bboxes, labels, self.bbox_head.num_classes
      )
  
      return [bbox_results]
  
file_path: insightface/detection/scrfd/mmdet/models/detectors/cornernet.py
imports: import torch
  from mmdet.core import bbox2result, bbox_mapping_back
  from ..builder import DETECTORS
  from .single_stage import SingleStageDetector
label_desc: Use image node_id 3 for calling the CornerNet obj's underlying member method code with example usage: obj.aug_test(imgs, img_metas, rescale) and returns: list