Shortcuts

BaseAugTransform

class mmcls.datasets.transforms.BaseAugTransform(magnitude_level=10, magnitude_range=None, magnitude_std=0.0, total_level=10, prob=0.5, random_negative_prob=0.5)[source]

The base class of augmentation transform for RandAugment.

This class provides several common attributions and methods to support the magnitude level mapping and magnitude level randomness in RandAugment.

Parameters
  • magnitude_level (int | float) – Magnitude level.

  • magnitude_range (Sequence[number], optional) – For augmentation have magnitude argument, maybe “magnitude”, “angle” or other, you can specify the magnitude level mapping range to generate the magnitude argument. For example, assume total_level is 10, magnitude_level=3 specify magnitude is 3 if magnitude_range=(0, 10) while specify magnitude is 7 if magnitude_range=(10, 0). Defaults to None.

  • magnitude_std (Number | str) –

    Deviation of magnitude noise applied.

    • If positive number, the magnitude obeys normal distribution \(\mathcal{N}(magnitude, magnitude_std)\).

    • If 0 or negative number, magnitude remains unchanged.

    • If str “inf”, the magnitude obeys uniform distribution \(Uniform(min, magnitude)\).

    Defaults to 0.

  • total_level (int | float) – Total level for the magnitude. Defaults to 10.

  • prob (float) – The probability for performing transformation therefore should be in range [0, 1]. Defaults to 0.5.

  • random_negative_prob (float) – The probability that turns the magnitude negative, which should be in range [0,1]. Defaults to 0.

extra_repr()[source]

Extra repr string when auto-generating magnitude is enabled.

Read the Docs v: 1.x
Versions
master
latest
1.x
dev-1.x
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.