ColorJitter<T>
Models & Types ยท AiDotNet.Augmentation.Image
Applies random combinations of brightness, contrast, saturation, and hue adjustments.
Inheritance: AugmentationBase<T, ImageTensor<T>> โ ColorJitter<T>
For Beginners
Think of this as applying multiple photo filters randomly. Just like how the same scene looks different when photographed with different phones or in different lighting, ColorJitter creates these natural variations automatically. This is one of the most commonly used augmentations for image classification.
How It Works
ColorJitter is a powerful composite augmentation that randomly adjusts multiple color properties in a single operation. This simulates the wide variety of color variations that occur in real-world photography due to different cameras, lighting, and environments.
When to use:
- General image classification tasks
- When training data comes from a single camera/source but deployment varies
- To make models robust to different lighting and camera settings
When NOT to use:
- Color is the primary classification feature
- Medical/scientific imaging with calibrated color
- Tasks where specific color accuracy is required
Constructors
| Constructor | Summary |
|---|---|
ColorJitter(double brightnessRange, double contrastRange, double saturationRange, double hueRange, double probability) |
Creates a new color jitter augmentation. |
Properties
| Property | Summary |
|---|---|
double BrightnessRange { get; } |
Gets the brightness adjustment range (0.0 = no change possible). |
double ContrastRange { get; } |
Gets the contrast adjustment range (0.0 = no change possible). |
double HueRange { get; } |
Gets the hue adjustment range in degrees (0.0 = no change possible). |
double SaturationRange { get; } |
Gets the saturation adjustment range (0.0 = no change possible). |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |