class
GaussNoise
extends
PhotometricTransform[NoiseParam]GaussNoise(var_limit: tuple[float, float] = (10.0, 50.0), mean: float = 0.0, p: float = 0.5)Additive Gaussian noise (Albumentations GaussNoise).
var_limit is on the 0-255 scale (matching Albumentations).
Parameters
pfloat= 1.0Probability of applying the transform; otherwise the input
passes through unchanged.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.GaussNoise(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for GaussNoise.
Parameters
imgTensorImage tensor; not inspected, carried through for dispatch.
Returns
NoiseParamCarries std — the per-pixel Gaussian standard deviation
on the unit [0, 1] scale.
Notes
var_limit is on the 0-255 scale (Albumentations
convention); the sampled variance is square-rooted and
divided by 255 so it can be added directly to the unit-scale
image.