Gaussian noise models random image corruption, such as low-light or high-ISO camera noise. It can also expand an image dataset by creating noisy variants. section 3.1.3 section 9.1.2
A JAX-based augmentation follows a short sequence:
- Create a PRNG key from a seed, then generate a noise tensor with the image’s shape using jax.random.normal(). section 9.1.2
- Scale and shift the standard Gaussian values when a different noise range is useful; 0.5 + 0.1*std_noise is one example. section 9.1.2
- Add the noise tensor to the image, then normalize the result if its values leave the [0.0, 1.0] range. section 9.1.2
Listing 9.5 Generating the random tensor
seed = 42 #1 key = jax.random.PRNGKey(seed) #2 std_noise = jax.random.normal(key, image.shape) #3 std_noise.min(), std_noise.max() #4 >>> (Array(-4.170905, dtype=float32), Array(4.259979, dtype=float32)) noise = 0.5 + 0.1*std_noise #5 noise.min(), noise.max() #6 >>> (Array(0.08290949, dtype=float32), Array(0.92599785, dtype=float32)) plt.imshow(noise)
The listing shows seeded JAX generation, image-shaped output, observed Gaussian values, and explicit scaling. section 9.1.2
Noisy image augmentation
For an image shaped (200, 200, 3), generate standard Gaussian noise, transform it with noise = 0.5 + 0.1*std_noise, and compute new_image = image + noise. The resulting values may exceed [0.0, 1.0], so min–max normalization restores that range. A separate scikit-image example uses random_noise(img, mode='gaussian'). section 9.1.2 section 3.1.3


