tfm.vision.augment.cutout
Stay organized with collections
Save and categorize content based on your preferences.
Apply cutout (https://arxiv.org/abs/1708.04552) to image.
tfm.vision.augment.cutout(
image: tf.Tensor, pad_size: int, replace: int = 0
) -> tf.Tensor
This operation applies a (2pad_size x 2pad_size) mask of zeros to
a random location within image. The pixel values filled in will be of the
value replace. The location where the mask will be applied is randomly
chosen uniformly over the whole image.
Args | |
|---|---|
image
|
An image Tensor of type uint8. |
pad_size
|
Specifies how big the zero mask that will be generated is that is applied to the image. The mask will be of size (2pad_size x 2pad_size). |
replace
|
What pixel value to fill in the image in the area that has the cutout mask applied to it. |
Returns | |
|---|---|
| An image Tensor that is of type uint8. |