Augmentation#

class augraphy.base.augmentation.Augmentation(p=0.5, numba_jit=1)[source]#

Bases: object

The base class which all pipeline augmentations inherit from.

Parameters:
  • p (float, optional) – The probability that this augmentation will be run when executed as part of a pipeline.

  • numba_jit (int, optional) – The flag to enable numba jit to speed up the processing in the augmentation.

should_run()[source]#

Determines whether or not the augmentation should be applied by callers.

Returns:

True if the probability given was no smaller than the random sample on the unit interval.

Return type:

bool

Overview#

Augmentation is the base class for all augmentations.