GaussianBlur¶
- class torchvision.transforms.v2.GaussianBlur(kernel_size: Union[int, Sequence[int]], sigma: Union[int, float, Sequence[float]] = (0.1, 2.0))[source]¶
[BETA] Blurs image with randomly chosen Gaussian blur.
Warning
The GausssianBlur transform is in Beta stage, and while we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes.
If the input is a Tensor, it is expected to have […, C, H, W] shape, where … means an arbitrary number of leading dimensions.
- Parameters:
kernel_size (int or sequence) – Size of the Gaussian kernel.
sigma (float or tuple of python:float (min, max)) – Standard deviation to be used for creating kernel to perform blurring. If float, sigma is fixed. If it is tuple of float (min, max), sigma is chosen uniformly at random to lie in the given range.