ISONoise
Targets:
image
volume
Image Types:uint8, float16, float32
Add camera-sensor-like noise scaling with intensity (high ISO), useful for low-light or
camera noise simulation. See color_shift_range and intensity_range.
This transform adds random noise to an image, mimicking the effect of using high ISO settings in digital photography. It simulates two main components of ISO noise:
- Color noise: random shifts in color hue
- Luminance noise: random variations in pixel intensity
Arguments
color_shift_rangetuple[float, float]
[0.01, 0.05]
Range for changing color hue. Values should be in the range [0, 1], where 1 represents a full 360° hue rotation. Default: (0.01, 0.05)
intensity_rangetuple[float, float]
[0.1, 0.5]
Range for the noise intensity. Higher values increase the strength of both color and luminance noise. Default: (0.1, 0.5)
pfloat
0.5
Probability of applying the transform. Default: 0.5
Examples
>>> import numpy as np
>>> import albumentations as A
>>> image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)
>>> transform = A.ISONoise(color_shift_range=(0.01, 0.05), intensity_range=(0.1, 0.5), p=0.5)
>>> result = transform(image=image)
>>> noisy_image = result["image"]Notes
- This transform only works with RGB images. It will raise a TypeError if applied to non-RGB images.
- The color shift is applied in the HSV color space, affecting the hue channel.
- Luminance noise is added to all channels independently.
- This transform can be useful for data augmentation in low-light scenarios or when training models to be robust against noisy inputs.
References
- ISO noise in digital photographyhttps://en.wikipedia.org/wiki/Image_noise#In_digital_cameras