Free data from transforms
A cat rotated ten degrees is still a cat. Image augmentation applies random, label preserving transforms each epoch so the model sees endless variations and generalizes better. It is one of the cheapest ways to fight overfitting.
Common transforms
- Geometric flips, rotations, crops, and scaling teach invariance to position and orientation.
- Color brightness, contrast, hue, and saturation jitter teach robustness to lighting.
- Erasing random occlusion forces the model to use the whole object, not one patch.
- Blur and noise mimic sensor and compression artifacts.
The pipeline
Keep labels valid
The golden rule is that the transform must not change the label. A vertical flip is fine for natural scenes but wrong for digits where six becomes nine. For detection, boxes must transform with the image.
Practical notes
- Augment on the fly so each epoch sees fresh variants.
- Too aggressive augmentation can blur the signal and slow convergence.
- Validation data is usually left unaugmented for honest evaluation.
Key idea
Image augmentation applies random label preserving transforms each epoch to expand effective data and reduce overfitting. Choose transforms that respect the label and leave validation clean.