ultralytics/docs/macros/augmentation-args.md
Mohammed Yasin a155b3badd
Correct scale range in data augmentation guide (#22907)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
Co-authored-by: Onuralp SEZER <onuralp@ultralytics.com>
2025-12-12 14:00:36 +01:00

7.6 KiB

Argument Type Default Supported Tasks Range Description
hsv_h float {{ hsv_h }} detect, segment, pose, obb, classify 0.0 - 1.0 Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions.
hsv_s float {{ hsv_s }} detect, segment, pose, obb, classify 0.0 - 1.0 Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions.
hsv_v float {{ hsv_v }} detect, segment, pose, obb, classify 0.0 - 1.0 Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions.
degrees float {{ degrees }} detect, segment, pose, obb 0.0 - 180 Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations.
translate float {{ translate }} detect, segment, pose, obb 0.0 - 1.0 Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects.
scale float {{ scale }} detect, segment, pose, obb, classify 0 - 1 Scales the image by a gain factor, simulating objects at different distances from the camera.
shear float {{ shear }} detect, segment, pose, obb -180 - +180 Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles.
perspective float {{ perspective }} detect, segment, pose, obb 0.0 - 0.001 Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space.
flipud float {{ flipud }} detect, segment, pose, obb, classify 0.0 - 1.0 Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics.
fliplr float {{ fliplr }} detect, segment, pose, obb, classify 0.0 - 1.0 Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity.
bgr float {{ bgr }} detect, segment, pose, obb 0.0 - 1.0 Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering.
mosaic float {{ mosaic }} detect, segment, pose, obb 0.0 - 1.0 Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding.
mixup float {{ mixup }} detect, segment, pose, obb 0.0 - 1.0 Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability.
cutmix float {{ cutmix }} detect, segment, pose, obb 0.0 - 1.0 Combines portions of two images, creating a partial blend while maintaining distinct regions. Enhances model robustness by creating occlusion scenarios.
copy_paste float {{ copy_paste }} segment 0.0 - 1.0 Copies and pastes objects across images to increase object instances.
copy_paste_mode str {{ copy_paste_mode }} segment - Specifies the copy-paste strategy to use. Options include 'flip' and 'mixup'.
auto_augment str {{ auto_augment }} classify - Applies a predefined augmentation policy ('randaugment', 'autoaugment', or 'augmix') to enhance model performance through visual diversity.
erasing float {{ erasing }} classify 0.0 - 0.9 Randomly erases regions of the image during training to encourage the model to focus on less obvious features.
augmentations list {{ augmentations }} detect, segment, pose, obb - Custom Albumentations transforms for advanced data augmentation (Python API only). Accepts a list of transform objects for specialized augmentation needs.