View source on GitHub |
Applies color jitter to an image, similarly to torchvision`s ColorJitter.
tfm.vision.preprocess_ops.color_jitter(
image: tf.Tensor,
brightness: Optional[float] = 0.0,
contrast: Optional[float] = 0.0,
saturation: Optional[float] = 0.0,
seed: Optional[int] = None
) -> tf.Tensor
Args | |
---|---|
image
|
tf.Tensor
Of shape [height, width, 3] and type uint8. |
brightness
|
float, optional
Magnitude for brightness jitter. Defaults to 0. |
contrast
|
float, optional
Magnitude for contrast jitter. Defaults to 0. |
saturation
|
float, optional
Magnitude for saturation jitter. Defaults to 0. |
seed
|
int, optional
Random seed. Defaults to None. |
Returns | |
---|---|
tf.Tensor
|
The augmented image of type uint8.
|