RandomSolarize#
- class torchaug.transforms.RandomSolarize(threshold, p=0.5, value_check=False)[source]#
Solarize the image randomly with a given probability by inverting all pixel values above a threshold.
The image is expected to be in […, 1 or 3, H, W] format, where … means it can have an arbitrary number of leading dimensions.
- Parameters:
threshold (
float) – all pixels equal or above this value are inverted.p (
float, optional) – probability of the image being solarized.