RandomAdjustSharpness¶
- class torchaug.transforms.RandomAdjustSharpness(sharpness_factor, p=0.5, batch_inplace=False, batch_transform=False)[source]¶
Adjust the sharpness of the image or video with a given probability.
The input is expected to have […, 1 or 3, H, W] shape, where … means an arbitrary number of leading dimensions.
- Parameters:
sharpness_factor (
float) – How much to adjust the sharpness. Can be any non-negative number. 0 gives a blurred image, 1 gives the original image while 2 increases the sharpness by a factor of 2.p (
float, optional) – probability of the image being sharpened. Default:0.5batch_inplace (
bool, optional) – whether to apply the batch transform in-place. Does not prevent functionals to make copy but can reduce time and memory consumption. Default:Falsebatch_transform (
bool, optional) – whether to apply the transform in batch mode. Default:False