Apply cutout (https://arxiv.org/abs/1708.04552) to a video.
tfm.vision.augment.cutout_video(
image: tf.Tensor, replace: int = 0
) -> tf.Tensor
This operation applies a random size 3D mask of zeros to a random location
within image
. The mask is padded 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. The size of the mask is randomly
sampled uniformly from [0.25height, 0.5height], [0.25width, 0.5width],
and [1, 0.25*depth], which represent the height, width, and number of frames
of the input video tensor respectively.
Args |
image
|
A video Tensor of type uint8.
|
replace
|
What pixel value to fill in the image in the area that has the
cutout mask applied to it.
|
Returns |
An video Tensor that is of type uint8.
|