ColorJitter#

class ColorJitter(brightness=0, contrast=0, saturation=0, hue=0, *, order=None)[source]#

Randomly change the brightness, contrast, saturation and hue of an image.

Parameters:
  • brightness – how much to jitter brightness. Chosen uniformly from [max(0, 1 - brightness), 1 + brightness] or the given [min, max]. Should be non negative numbers.

  • contrast – how much to jitter contrast. Chosen uniformly from [max(0, 1 - contrast), 1 + contrast] or the given [min, max]. Should be non negative numbers.

  • saturation – how much to jitter saturation. Chosen uniformly from [max(0, 1 - saturation), 1 + saturation] or the given [min, max]. Should be non negative numbers.

  • hue – how much to jitter hue. Chosen uniformly from [-hue, hue] or the given [min, max]. Should have 0<= hue <= 0.5 or -0.5 <= min <= max <= 0.5.

  • order – the same with VisionTransform.

apply(input)[source]#

Apply transform on single input data.