class_docstr: Trident roi head.
  
  Args:
      num_branch (int): Number of branches in TridentNet.
      test_branch_idx (int): In inference, all 3 branches will be used
          if `test_branch_idx==-1`, otherwise only branch with index
          `test_branch_idx` will be used.
docstr: Test det bboxes with test time augmentation.
docstr_tok: ["Test","det","bboxes","with","test","time","augmentation","."]
code: def aug_test_bboxes(
      self, feats, img_metas, proposal_list, rcnn_test_cfg
  ):
      """Test det bboxes with test time augmentation."""
      aug_bboxes = []
      aug_scores = []
      for x, img_meta in zip(feats, img_metas):
          # only one image in the batch
          img_shape = img_meta[0]["img_shape"]
          scale_factor = img_meta[0]["scale_factor"]
          flip = img_meta[0]["flip"]
          flip_direction = img_meta[0]["flip_direction"]
  
          trident_bboxes, trident_scores = [], []
          for branch_idx in range(len(proposal_list)):
              proposals = bbox_mapping(
                  proposal_list[0][:, :4],
                  img_shape,
                  scale_factor,
                  flip,
                  flip_direction,
              )
              rois = bbox2roi([proposals])
              bbox_results = self._bbox_forward(x, rois)
              bboxes, scores = self.bbox_head.get_bboxes(
                  rois,
                  bbox_results["cls_score"],
                  bbox_results["bbox_pred"],
                  img_shape,
                  scale_factor,
                  rescale=False,
                  cfg=None,
              )
              trident_bboxes.append(bboxes)
              trident_scores.append(scores)
  
          aug_bboxes.append(torch.cat(trident_bboxes, 0))
          aug_scores.append(torch.cat(trident_scores, 0))
      # after merging, bboxes will be rescaled to the original image size
      merged_bboxes, merged_scores = merge_aug_bboxes(
          aug_bboxes, aug_scores, img_metas, rcnn_test_cfg
      )
      det_bboxes, det_labels = multiclass_nms(
          merged_bboxes,
          merged_scores,
          rcnn_test_cfg.score_thr,
          rcnn_test_cfg.nms,
          rcnn_test_cfg.max_per_img,
      )
      return det_bboxes, det_labels
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/trident_roi_head.py
imports: import torch
  from mmcv.ops import batched_nms
  from mmdet.core import bbox2result, bbox2roi, bbox_mapping, merge_aug_bboxes, multiclass_nms
  from mmdet.models.roi_heads.standard_roi_head import StandardRoIHead
  from ..builder import HEADS
label_desc: Use image node_id 3 for calling the TridentRoIHead obj's underlying member method code with example usage: obj.aug_test_bboxes(feats, img_metas, proposal_list, rcnn_test_cfg) and returns: det_bboxes,  det_labels