A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://keras.io/api/layers/preprocessing_layers/image_augmentation/random_hue below:

RandomHue layer

RandomHue layer

[source]

RandomHue class
keras.layers.RandomHue(
    factor, value_range=(0, 255), data_format=None, seed=None, **kwargs
)

Randomly adjusts the hue on given images.

This layer will randomly increase/reduce the hue for the input RGB images.

The image hue is adjusted by converting the image(s) to HSV and rotating the hue channel (H) by delta. The image is then converted back to RGB.

Arguments

Example

(images, labels), _ = keras.datasets.cifar10.load_data()
random_hue = keras.layers.RandomHue(factor=0.5, value_range=[0, 1])
images = keras.ops.cast(images, "float32")
augmented_images_batch = random_hue(images[:8])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4