ColorΒΆ

ColorJitter([brightness, contrast, ...])

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

Grayscale([num_output_channels, batch_transform])

Convert images or videos to grayscale.

RandomAdjustSharpness(sharpness_factor[, p, ...])

Adjust the sharpness of the image or video with a given probability.

RandomAutocontrast([p, batch_inplace, ...])

Autocontrast the pixels of the given image or video with a given probability.

RandomChannelPermutation([p, batch_inplace, ...])

Randomly permute the channels of an image or video.

RandomColorJitter([brightness, contrast, ...])

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

RandomEqualize([p, batch_inplace, ...])

Equalize the histogram of the given image or video with a given probability.

RandomGrayscale([p, batch_inplace, ...])

Randomly convert image or videos to grayscale with a probability of p.

RandomInvert([p, batch_inplace, batch_transform])

Inverts the colors of the given image or video with a given probability.

RandomPhotometricDistort([brightness, ...])

Randomly distorts the image or video as used in SSD: Single Shot MultiBox Detector.

RandomPosterize(bits[, p, batch_inplace, ...])

Posterize the image or video with a given probability by reducing the number of bits for each color channel.

RandomSolarize(threshold[, p, ...])

Solarize the image or video with a given probability by inverting all pixel values above a threshold.

RGB()

Convert images or videos to RGB (if they are already not RGB).