View source on GitHub |
Applies the RandAugment policy to images.
Inherits From: ImageAugment
tfm.vision.augment.RandAugment(
num_layers: int = 2,
magnitude: float = 10.0,
cutout_const: float = 40.0,
translate_const: float = 100.0,
magnitude_std: float = 0.0,
prob_to_apply: Optional[float] = None,
exclude_ops: Optional[List[str]] = None
)
RandAugment is from the paper https://arxiv.org/abs/1909.13719
Methods
build_for_detection
@classmethod
build_for_detection( num_layers: int = 2, magnitude: float = 10.0, cutout_const: float = 40.0, translate_const: float = 100.0, magnitude_std: float = 0.0, prob_to_apply: Optional[float] = None, exclude_ops: Optional[List[str]] = None )
Builds a RandAugment that modifies bboxes for geometric transforms.
distort
distort(
image: tf.Tensor
) -> tf.Tensor
See base class.
distort_with_boxes
distort_with_boxes(
image: tf.Tensor, bboxes: tf.Tensor
) -> Tuple[tf.Tensor, tf.Tensor]
See base class.