Implementations#

Image Perturbation#

Photometric Perturbers#

Photometric perturbers modify the visual appearance of images by adjusting color, brightness, contrast, sharpness, blur, and noise properties.

Blur#

Blur perturbers apply various blurring effects using cv2.

AverageBlurPerturber

Applies average blurring to the image stimulus.

GaussianBlurPerturber

Applies Gaussian blurring to the image stimulus.

MedianBlurPerturber

Applies median blurring to the image stimulus.

Enhance#

Enhancement perturbers adjust image properties using PIL.

BrightnessPerturber

Adjusts image stimulus brightness.

ColorPerturber

Adjusts image stimulus color balance.

ContrastPerturber

Adjusts image stimulus contrast.

SharpnessPerturber

Adjusts image stimulus sharpness.

Noise#

Noise perturbers add random noise patterns using skimage.

GaussianNoisePerturber

Adds Gaussian-distributed additive noise to image stimulus.

PepperNoisePerturber

Adds pepper noise to image stimulus.

SaltAndPepperNoisePerturber

Adds salt & pepper noise to image stimulus.

SaltNoisePerturber

Adds salt noise to image stimulus.

SpeckleNoisePerturber

Adds multiplicative noise to image stimulus.

Geometric Perturbers#

Geometric perturbers alter the spatial positioning and orientation of images through transformations such as rotation, scaling, cropping, and translation.

RandomCropPerturber

RandomCropPerturber randomly crops an image and adjusts bounding boxes accordingly.

RandomRotationPerturber

RandomRotationPerturber applies a Rotation transformation from Albumentations.

RandomScalePerturber

RandomScalePerturber applies a Scale transformation from Albumentations.

RandomTranslationPerturber

RandomTranslationPerturber randomly translates an image and adjusts bounding boxes accordingly.

Environment Perturbers#

Environment perturbers simulate atmospheric and weather-related effects that occur in real-world imaging conditions.

HazePerturber

HazePerturber applies haze using Shree Nayar weathering.

WaterDropletPerturber

Implements the physics-based, photorealistic water/rain droplet model.

Optical Perturbers#

Optical perturbers simulate physics-based sensor and optical effects.

CircularAperturePerturber

Applies OTF-based image perturbation using a circular aperture model.

DefocusPerturber

Implements image perturbation using defocus and Optical Transfer Function (OTF).

DetectorPerturber

Implements OTF-based image perturbation using detector specifications and atmospheric conditions.

JitterPerturber

Implements image perturbation using jitter and Optical Transfer Function (OTF).

PybsmPerturber

Implements image perturbation using pyBSM sensor and scenario configurations.

RadialDistortionPerturber

RadialDistortionPerturber applies a radial distortion to an image.

TurbulenceAperturePerturber

Implements OTF-based image perturbation with turbulence and aperture effects.

Generative Perturbers#

Generative perturbers use AI models to transform images through learned representations.

DiffusionPerturber

Diffusion-based implementation of the PerturbImage interface for prompt-guided perturbations.

Utility Perturbers#

Utility perturbers enable composition of multiple perturbations or provide integration with third-party augmentation libraries.

AlbumentationsPerturber

AlbumentationsPerturber applies a BasicTransform from Albumentations.

ComposePerturber

Composes multiple image perturbations by applying a list of perturbers sequentially to an input image.

Utility Components#

Utility functions that support perturbation operations.

load_default_config

Load default sensor and scenario configurations for a given configuration type.

Perturbation Factory#

Perturbation factories generate collections of perturbers with varying parameter values, enabling systematic exploration of perturbation parameter spaces.

PerturberLinspaceFactory

Simple PerturbImageFactory implementation to step through the given range of values.

PerturberMultivariateFactory

Base factory for creating PerturbImage instances with customizable parameters.

PerturberOneStepFactory

Simple PerturbImageFactory implementation to return a factory with one perturber.

PerturberStepFactory

Simple PerturbImageFactory implementation to step through the given range of values.