class_docstr: Rand augmentation.
  
  This data augmentation is proposed in `RandAugment:
  Practical automated data augmentation with a reduced
  search space <https://arxiv.org/abs/1909.13719>`_.
  
  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:
      aug_space (List[List[Union[dict, ConfigDict]]]): The augmentation space
          of rand augmentation. Each augmentation transform in ``aug_space``
          is a specific transform, and is composed by several augmentations.
          When RandAugment is called, a random transform in ``aug_space``
          will be selected to augment images. Defaults to aug_space.
      aug_num (int): Number of augmentation to apply equentially.
          Defaults to 2.
      prob (list[float], optional): The probabilities associated with
          each augmentation. The length should be equal to the
          augmentation space and the sum should be 1. If not given,
          a uniform distribution will be assumed. Defaults to None.
  
  Examples:
      >>> aug_space = [
      >>>     dict(type='Sharpness'),
      >>>     dict(type='ShearX'),
      >>>     dict(type='Color'),
      >>>     ],
      >>> augmentation = RandAugment(aug_space)
      >>> 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: ["Rand","augmentation",".","This","data","augmentation","is","proposed","in","`","RandAugment",":","Practical","automated","data","augmentation","with","a","reduced","search","space","<","https",":","\/\/arxiv.org\/abs\/1909.13719",">","`","_",".","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",":","aug_space","(","List","[","List","[","Union","[","dict",",","ConfigDict","]","]","]",")",":","The","augmentation","space","of","rand","augmentation",".","Each","augmentation","transform","in","``","aug_space","``","is","a","specific","transform",",","and","is","composed","by","several","augmentations",".","When","RandAugment","is","called",",","a","random","transform","in","``","aug_space","``","will","be","selected","to","augment","images",".","Defaults","to","aug_space",".","aug_num","(","int",")",":","Number","of","augmentation","to","apply","equentially",".","Defaults","to","2.","prob","(","list","[","float","]",",","optional",")",":","The","probabilities","associated","with","each","augmentation",".","The","length","should","be","equal","to","the","augmentation","space","and","the","sum","should","be","1",".","If","not","given",",","a","uniform","distribution","will","be","assumed",".","Defaults","to","None",".","Examples",":",">",">",">","aug_space","=","[",">",">",">","dict","(","type='Sharpness","'",")",",",">",">",">","dict","(","type='ShearX","'",")",",",">",">",">","dict","(","type='Color","'",")",",",">",">",">","]",",",">",">",">","augmentation","=","RandAugment","(","aug_space",")",">",">",">","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__}("
          f"aug_space={self.aug_space}, "
          f"aug_num={self.aug_num}, "
          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 4 for calling the RandAugment obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str, self, str