HueTransform

class paddle.vision.transforms. HueTransform ( value, keys=None ) [source]

Adjust hue of the image.

Parameters
  • value (float) – How much to adjust the hue. Can be any number between 0 and 0.5, 0 gives the original image

  • keys (list[str]|tuple[str], optional) – Same as BaseTransform. Default: None.

Examples

import numpy as np
from PIL import Image
from paddle.vision.transforms import HueTransform

transform = HueTransform(0.4)

fake_img = Image.fromarray((np.random.rand(224, 224, 3) * 255.).astype(np.uint8))

fake_img = transform(fake_img)