RandomErasing classkeras.layers.RandomErasing(
factor=1.0,
scale=(0.02, 0.33),
fill_value=None,
value_range=(0, 255),
seed=None,
data_format=None,
**kwargs
)
Random Erasing data augmentation technique.
Random Erasing is a data augmentation method where random patches of an image are erased (replaced by a constant value or noise) during training to improve generalization.
Note: This layer is safe to use inside a tf.data or grain pipeline
(independently of which backend you're using).
References
Arguments
factor controls the probability of applying the transformation.factor=0.0 ensures no erasing is applied.factor=1.0 means erasing is always applied.(min, max) is provided, a probability value
is sampled between min and max for each image.0.0 and the given float.
Default is 1.0.None to sample a random value
from a normal distribution. Default is None.[low, high]. This is
typically either [0, 1] or [0, 255] depending on how your
preprocessing pipeline is set up.