This data augmentation tool adds gaussian noise to the training images such the testing becomes robust against these noises.
Gaussian noise is a statistical noise having probability density function equal to normal distribution. Normal distribution is characterized by its mean and variance.
This defines the range of variance for the gaussian distribution. The amount of noise present in the image is directly proportional to the variance.
The mean of the gaussian distribution tells us the point at which the value of the distribution is highest.
import albumentations as albufrom PIL import Imageimport numpy as nptransform =albu.GaussianNoise(var_limit=(10,50),mean=0,p=0.5)image = np.array(Image.open('/some/image/file/path'))image = transform(image=image)['image']# Now the image is transformed and ready to be accepted by the model