nvidia.dali.experimental.dynamic.gaussian_blur#
- nvidia.dali.experimental.dynamic.gaussian_blur(input, /, *, batch_size=None, device=None, dtype=None, sigma=None, window_size=None)#
Applies a Gaussian Blur to the input.
Gaussian blur is calculated by applying a convolution with a Gaussian kernel, which can be parameterized with windows_size and
sigma. If only the sigma is specified, the radius of the Gaussian kernel defaults toceil(3 * sigma), so the kernel window size is2 * ceil(3 * sigma) + 1.If only the window size is provided, the sigma is calculated by using the following formula:
radius = (window_size - 1) / 2 sigma = (radius - 1) * 0.3 + 0.8
The sigma and kernel window size can be specified as one value for all data axes or a value per data axis.
When specifying the sigma or window size per axis, the axes are provided same as layouts, from outermost to innermost.
Note
The channel
Cand frameFdimensions are not considered data axes. If channels are present, only channel-first or channel-last inputs are supported.For example, with
HWCinput, you can providesigma=1.0orsigma=(1.0, 2.0)because there are two data axes, H and W.The same input can be provided as per-sample tensors.
This operator allows sequence inputs and supports volumetric data.
- Supported backends
‘cpu’
‘gpu’
- Parameters:
input¶ (Tensor/Batch) – Input to the operator.
- Keyword Arguments:
dtype¶ (
nvidia.dali.types.DALIDataType, optional) –Output data type.
Supported type: FLOAT. If not set, the input type is used.
sigma¶ (float or list of float or Tensor/Batch of float, optional, default = [0.0]) –
Sigma value for the Gaussian Kernel.
Supports
per-frameinputs.window_size¶ (int or list of int or Tensor/Batch of int, optional, default = [0]) –
The diameter of the kernel.
Supports
per-frameinputs.