keras_cv.layers.RandomSaturation(factor, seed=None, **kwargs)
Randomly adjusts the saturation on given images.
This layer will randomly increase/reduce the saturation for the input RGB
images. At inference time, the output will be identical to the input.
Call the layer with
training=True to adjust the saturation of the input.
factorcontrols the extent to which the image saturation is impacted.
factor=0.5makes this layer perform a no-op operation.
factor=0.0makes the image to be fully grayscale.
factor=1.0makes the image to be fully saturated. Values should be between
1.0. If a tuple is used, a
factoris sampled between the two values for every image augmented. If a single float is used, a value between
0.0and the passed float is sampled. In order to ensure the value is always the same, please pass a tuple with two identical floats: