class_docstr: Merge augmented detection results, only bboxes corresponding score under
  flipping and multi-scale resizing can be processed now.
  
  Examples:
      >>> tta_model = dict(
      >>>     type='DetTTAModel',
      >>>     tta_cfg=dict(nms=dict(
      >>>                     type='nms',
      >>>                     iou_threshold=0.5),
      >>>                     max_per_img=100))
      >>>
      >>> tta_pipeline = [
      >>>     dict(type='LoadImageFromFile',
      >>>          backend_args=None),
      >>>     dict(
      >>>         type='TestTimeAug',
      >>>         transforms=[[
      >>>             dict(type='Resize',
      >>>                  scale=(1333, 800),
      >>>                  keep_ratio=True),
      >>>         ], [
      >>>             dict(type='RandomFlip', prob=1.),
      >>>             dict(type='RandomFlip', prob=0.)
      >>>         ], [
      >>>             dict(
      >>>                 type='PackDetInputs',
      >>>                 meta_keys=('img_id', 'img_path', 'ori_shape',
      >>>                         'img_shape', 'scale_factor', 'flip',
      >>>                         'flip_direction'))
      >>>         ]])]
class_docstr_tok: ["Merge","augmented","detection","results",",","only","bboxes","corresponding","score","under","flipping","and","multi-scale","resizing","can","be","processed","now",".","Examples",":",">",">",">","tta_model","=","dict","(",">",">",">","type='DetTTAModel","'",",",">",">",">","tta_cfg=dict","(","nms=dict","(",">",">",">","type='nms","'",",",">",">",">","iou_threshold=0.5",")",",",">",">",">","max_per_img=100",")",")",">",">",">",">",">",">","tta_pipeline","=","[",">",">",">","dict","(","type='LoadImageFromFile","'",",",">",">",">","backend_args=None",")",",",">",">",">","dict","(",">",">",">","type='TestTimeAug","'",",",">",">",">","transforms=","[","[",">",">",">","dict","(","type='Resize","'",",",">",">",">","scale=","(","1333",",","800",")",",",">",">",">","keep_ratio=True",")",",",">",">",">","]",",","[",">",">",">","dict","(","type='RandomFlip","'",",","prob=1",".",")",",",">",">",">","dict","(","type='RandomFlip","'",",","prob=0",".",")",">",">",">","]",",","[",">",">",">","dict","(",">",">",">","type='PackDetInputs","'",",",">",">",">","meta_keys=","(","'img_id","'",",","'img_path","'",",","'ori_shape","'",",",">",">",">","'img_shape","'",",","'scale_factor","'",",","'flip","'",",",">",">",">","'flip_direction","'",")",")",">",">",">","]","]",")","]"]
code: def __init__(self, tta_cfg=None, **kwargs):
      super().__init__(**kwargs)
      self.tta_cfg = tta_cfg
  
file_path: mmdetection/mmdet/models/test_time_augs/det_tta.py
imports: from typing import List, Tuple
  import torch
  from mmcv.ops import batched_nms
  from mmengine.model import BaseTTAModel
  from mmengine.registry import MODELS
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.structures import DetDataSample
  from mmdet.structures.bbox import bbox_flip
label_desc: Use image node_id 1 to create a new DetTTAModel object from inherited base classes: BaseTTAModel with example: obj = DetTTAModel(tta_cfg)