The lightly.transforms package provides additional augmentations.
Contains implementations of Gaussian blur and random rotations which are not part of torchvisions transforms.
GaussianBlur(kernel_size: float, prob: float = 0.5, scale: float = 0.2)¶
Implementation of random Gaussian blur.
Utilizes the built-in ImageFilter method from PIL to apply a Gaussian blur to the input image with a certain probability. The blur is further randomized as the kernel size is chosen randomly around a mean specified by the user.
Mean kernel size for the Gaussian blur.
Probability with which the blur is applied.
Fraction of the kernel size which is used for upper and lower limits of the randomized kernel size.