class_docstr: Auto augmentation.
  
  This data augmentation is proposed in `AutoAugment: Learning
  Augmentation Policies from Data <https://arxiv.org/abs/1805.09501>`_
  and in `Learning Data Augmentation Strategies for Object Detection
  <https://arxiv.org/pdf/1906.11172>`_.
  
  Required Keys:
  
  - img
  - gt_bboxes (BaseBoxes[torch.float32]) (optional)
  - gt_bboxes_labels (np.int64) (optional)
  - gt_masks (BitmapMasks | PolygonMasks) (optional)
  - gt_ignore_flags (bool) (optional)
  - gt_seg_map (np.uint8) (optional)
  
  Modified Keys:
  
  - img
  - img_shape
  - gt_bboxes
  - gt_bboxes_labels
  - gt_masks
  - gt_ignore_flags
  - gt_seg_map
  
  Added Keys:
  
  - homography_matrix
  
  Args:
      policies (List[List[Union[dict, ConfigDict]]]):
          The policies of auto augmentation.Each policy in ``policies``
          is a specific augmentation policy, and is composed by several
          augmentations. When AutoAugment is called, a random policy in
          ``policies`` will be selected to augment images.
          Defaults to policy_v0().
      prob (list[float], optional): The probabilities associated
          with each policy. The length should be equal to the policy
          number and the sum should be 1. If not given, a uniform
          distribution will be assumed. Defaults to None.
  
  Examples:
      >>> policies = [
      >>>     [
      >>>         dict(type='Sharpness', prob=0.0, level=8),
      >>>         dict(type='ShearX', prob=0.4, level=0,)
      >>>     ],
      >>>     [
      >>>         dict(type='Rotate', prob=0.6, level=10),
      >>>         dict(type='Color', prob=1.0, level=6)
      >>>     ]
      >>> ]
      >>> augmentation = AutoAugment(policies)
      >>> img = np.ones(100, 100, 3)
      >>> gt_bboxes = np.ones(10, 4)
      >>> results = dict(img=img, gt_bboxes=gt_bboxes)
      >>> results = augmentation(results)
class_docstr_tok: ["Auto","augmentation",".","This","data","augmentation","is","proposed","in","`","AutoAugment",":","Learning","Augmentation","Policies","from","Data","<","https",":","\/\/arxiv.org\/abs\/1805.09501",">","`","_","and","in","`","Learning","Data","Augmentation","Strategies","for","Object","Detection","<","https",":","\/\/arxiv.org\/pdf\/1906.11172",">","`","_",".","Required","Keys",":","-","img","-","gt_bboxes","(","BaseBoxes","[","torch.float32","]",")","(","optional",")","-","gt_bboxes_labels","(","np.int64",")","(","optional",")","-","gt_masks","(","BitmapMasks","|","PolygonMasks",")","(","optional",")","-","gt_ignore_flags","(","bool",")","(","optional",")","-","gt_seg_map","(","np.uint8",")","(","optional",")","Modified","Keys",":","-","img","-","img_shape","-","gt_bboxes","-","gt_bboxes_labels","-","gt_masks","-","gt_ignore_flags","-","gt_seg_map","Added","Keys",":","-","homography_matrix","Args",":","policies","(","List","[","List","[","Union","[","dict",",","ConfigDict","]","]","]",")",":","The","policies","of","auto","augmentation.Each","policy","in","``","policies","``","is","a","specific","augmentation","policy",",","and","is","composed","by","several","augmentations",".","When","AutoAugment","is","called",",","a","random","policy","in","``","policies","``","will","be","selected","to","augment","images",".","Defaults","to","policy_v0","(",")",".","prob","(","list","[","float","]",",","optional",")",":","The","probabilities","associated","with","each","policy",".","The","length","should","be","equal","to","the","policy","number","and","the","sum","should","be","1",".","If","not","given",",","a","uniform","distribution","will","be","assumed",".","Defaults","to","None",".","Examples",":",">",">",">","policies","=","[",">",">",">","[",">",">",">","dict","(","type='Sharpness","'",",","prob=0.0",",","level=8",")",",",">",">",">","dict","(","type='ShearX","'",",","prob=0.4",",","level=0",",",")",">",">",">","]",",",">",">",">","[",">",">",">","dict","(","type='Rotate","'",",","prob=0.6",",","level=10",")",",",">",">",">","dict","(","type='Color","'",",","prob=1.0",",","level=6",")",">",">",">","]",">",">",">","]",">",">",">","augmentation","=","AutoAugment","(","policies",")",">",">",">","img","=","np.ones","(","100",",","100",",","3",")",">",">",">","gt_bboxes","=","np.ones","(","10",",","4",")",">",">",">","results","=","dict","(","img=img",",","gt_bboxes=gt_bboxes",")",">",">",">","results","=","augmentation","(","results",")"]
code: def __repr__(self) -> str:
      return (
          f"{self.__class__.__name__}(policies={self.policies}, "
          f"prob={self.prob})"
      )
  
file_path: mmdetection/mmdet/datasets/transforms/augment_wrappers.py
imports: from typing import List, Optional, Union
  import numpy
  from mmcv.transforms import RandomChoice
  from mmcv.transforms.utils import cache_randomness
  from mmengine.config import ConfigDict
  from mmdet.registry import TRANSFORMS
label_desc: Use image node_id 2 for calling the AutoAugment obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str