Table of Contents

Class ImageAugmentationSettings

Namespace
AiDotNet.Augmentation
Assembly
AiDotNet.dll

Image-specific augmentation settings with industry-standard defaults.

public class ImageAugmentationSettings
Inheritance
ImageAugmentationSettings
Inherited Members

Remarks

For Beginners: These settings control how images are transformed during training. Defaults are based on best practices from Albumentations and torchvision.

Properties

BrightnessRange

Gets or sets the brightness adjustment range.

public double BrightnessRange { get; set; }

Property Value

double

Remarks

Default: 0.2 (+/- 20% brightness)

ContrastRange

Gets or sets the contrast adjustment range.

public double ContrastRange { get; set; }

Property Value

double

Remarks

Default: 0.2 (+/- 20% contrast)

EnableColorJitter

Gets or sets whether color jitter (brightness, contrast, saturation) is enabled.

public bool EnableColorJitter { get; set; }

Property Value

bool

Remarks

Default: true

Randomly adjusts color properties to simulate different lighting conditions.

EnableCutMix

Gets or sets whether CutMix is enabled.

public bool EnableCutMix { get; set; }

Property Value

bool

Remarks

Default: false

Cuts a patch from one image and pastes it onto another. Often better than MixUp.

EnableCutout

Gets or sets whether Cutout/CoarseDropout is enabled.

public bool EnableCutout { get; set; }

Property Value

bool

Remarks

Default: false

Randomly masks out rectangular regions. Good for regularization.

EnableFlips

Gets or sets whether horizontal flip is enabled.

public bool EnableFlips { get; set; }

Property Value

bool

Remarks

Default: true (probability 0.5)

Mirrors the image left-to-right. Good for most tasks except where orientation matters.

EnableGaussianBlur

Gets or sets whether Gaussian blur is enabled.

public bool EnableGaussianBlur { get; set; }

Property Value

bool

Remarks

Default: false

Applies blur to simulate out-of-focus images or motion blur.

EnableGaussianNoise

Gets or sets whether Gaussian noise is enabled.

public bool EnableGaussianNoise { get; set; }

Property Value

bool

Remarks

Default: true

Adds random noise to simulate sensor noise or low-light conditions.

EnableMixUp

Gets or sets whether MixUp is enabled.

public bool EnableMixUp { get; set; }

Property Value

bool

Remarks

Default: false

Blends two images together with interpolated labels. Powerful regularizer.

EnableRotation

Gets or sets whether rotation is enabled.

public bool EnableRotation { get; set; }

Property Value

bool

Remarks

Default: true

Rotates the image by a random angle within the specified range.

EnableVerticalFlip

Gets or sets whether vertical flip is enabled.

public bool EnableVerticalFlip { get; set; }

Property Value

bool

Remarks

Default: false

Mirrors the image top-to-bottom. Usually only useful for satellite/medical images.

MixUpAlpha

Gets or sets the MixUp alpha parameter.

public double MixUpAlpha { get; set; }

Property Value

double

Remarks

Default: 0.2

Controls the Beta distribution for mixing ratio. Lower = more original image.

NoiseStdDev

Gets or sets the standard deviation of Gaussian noise.

public double NoiseStdDev { get; set; }

Property Value

double

Remarks

Default: 0.01 (for normalized images [0,1])

RotationRange

Gets or sets the rotation range in degrees.

public double RotationRange { get; set; }

Property Value

double

Remarks

Default: 15.0 (degrees, +/- from horizontal)

For Beginners: A value of 15 means rotation between -15 and +15 degrees.

SaturationRange

Gets or sets the saturation adjustment range.

public double SaturationRange { get; set; }

Property Value

double

Remarks

Default: 0.2 (+/- 20% saturation)

Methods

GetConfiguration()

Gets the configuration as a dictionary.

public IDictionary<string, object> GetConfiguration()

Returns

IDictionary<string, object>