Augmentation matrix

Setting an augmentation knob does not guarantee it reaches the pipeline. This page records how each trainable family treats each knob on TrainConfig, using the declarative table the library ships as its single source of truth.

The knobs

These are TrainConfig field names, not CLI spellings. The CLI maps its own aliases onto them, so --mosaic sets mosaic_prob.

KnobMeaning
mosaic_probProbability of building a 4-image mosaic sample
mixup_probProbability of blending in a second sample
hsv_probProbability of HSV color jitter
flip_probHorizontal-flip probability
degreesRandom-rotation range for the affine warp, in degrees
translateRandom-translation fraction for the affine warp
mosaic_scaleRandom-scale range for the affine warp
mixup_scaleJitter-scale range applied to the MixUp partner image
shearRandom-shear range for the affine warp, in degrees
perspectiveProjective warp magnitude for the affine warp
flipudVertical-flip probability
no_aug_epochsFinal epochs trained with strong augmentation disabled
auto_augmentClassification AutoAugment policy: randaugment, autoaugment or augmix
erasingClassification RandomErasing probability
mixupClassification batch-MixUp probability, with soft labels
cutmixClassification batch-CutMix probability, with soft labels

The last four are the classification pack. Detection families ignore them. mixup is an API-only knob: the CLI --mixup is the alias for the detection mixup_prob.

Ask the spec directly
from libreyolo.data.augment.spec import (    AUG_KNOBS,    aug_support,    ignored_aug_params,    uses_mosaic_gating,) print(sorted(AUG_KNOBS)) table = aug_support("yolo9")print(table["mixup_prob"].status, table["mixup_prob"].note) print(sorted(ignored_aug_params("dfine")))print(uses_mosaic_gating("yolo9"), uses_mosaic_gating("yolonas"))

The three statuses

StatusMeaning
usedThe knob reaches the family's train pipeline and changes samples
gated_by_mosaicThe knob applies only to samples that took the mosaic branch, so with mosaic_prob == 0 it never fires
ignoredThe knob never reaches the pipeline; setting it does nothing

ignored is the one worth checking before a run, because nothing fails. The CLI warns when an explicitly set training parameter is one the selected family ignores, and the trainer warns when mixup_prob > 0 cannot fire because the family gates MixUp on mosaic and mosaic_prob is zero.

Pipeline archetypes

Every covered family follows one of six pipelines, with a handful of per-family deviations listed below.

KnobYOLOX-styleYOLO-NASDETR-styleClassificationSemanticRestore
mosaic_probusedignoredignoredignoredignoredignored
mixup_probgatedusedignoredignoredignoredignored
hsv_probusedusedignoredignoredignoredignored
flip_probusedusedusedignoredignoredignored
degreesgatedusedignoredignoredignoredignored
translategatedusedignoredignoredignoredignored
mosaic_scalegatedusedignoredignoredignoredignored
mixup_scalegatedusedignoredignoredignoredignored
sheargatedusedignoredignoredignoredignored
perspectivegatedusedignoredignoredignoredignored
flipudusedusedignoredignoredignoredignored
no_aug_epochsusedusedusedusedusedused
auto_augmentignoredignoredignoredusedignoredignored
erasingignoredignoredignoredusedignoredignored
mixupignoredignoredignoredusedignoredignored
cutmixignoredignoredignoredusedignoredignored

In the YOLOX-style pipeline the per-sample preprocessing applies HSV jitter and flips, while the affine warp and MixUp run only inside the mosaic branch. YOLO-NAS instead runs a per-sample affine that is always on, ignores mosaic, and applies MixUp independently, reusing mosaic_scale as the affine scale range.

The DETR-style pipeline is a pass-through transform with no mosaic. Its photometric distortion, zoom-out and IoU-crop are recipe constants rather than configurable knobs, which is why hsv_prob and the geometry knobs never reach it. The classification pipeline uses an ImageFolder transform whose horizontal flip is a fixed 0.5 rather than flip_prob. Semantic scale jitter and HSV come from family class attributes rather than config knobs, and restoration flips are coupled input-and-target operations with a fixed 0.5 probability.

no_aug_epochs is honored everywhere, though what it turns off differs: mosaic and MixUp for YOLOX-style, the affine and MixUp for YOLO-NAS, the strong photometric and crop augmentations plus the learning-rate tail for DETR-style, and the scheduler tail for the rest.

Families by archetype

ArchetypeFamilies
YOLOX-styleyolox, yolo7, yolo9, yolo9_e2e, yolo9_p2, rtmdet, picodet, rtdetr, rtdetrv2, fomo
YOLO-NASyolonas
DETR-styledfine, domedetr, deim, deimv2, rtdetrv4, rfdetr, ec, dinov2
Classificationresnet, convnext, mobilenetv4, efficientnetv2
Semanticsegformer
Restorenafnet

Twenty-five families are covered. A family outside this list returns an empty ignored set, so no warning is emitted for it.

Deviations

FamilyDifference from its archetype
rtmdetflipud ignored: its transform has no vertical flip
picodetflipud ignored
rtdetrflipud ignored
rtdetrv2flipud ignored
fomoperspective and flipud ignored
echsv_prob, degrees and translate used, for task="pose" only; detect and segment use fixed photometric recipes
dinov2The classification pack is used, for task="classify" only

ec and dinov2 are multi-task families, so a knob is marked ignored only when every one of the family's trainable tasks ignores it. That keeps the CLI warning from ever being wrong for one task while right for another.

Dome-DETR inherits D-FINE's transforms unchanged. The one thing it cannot take is multi-scale training, which its config disables rather than the augmentation spec.

Family-specific knobs

Some families carry augmentation knobs on their own TrainConfig subclass rather than on the base. The CLI does not expose these; set them through the Python API.

FamilyKnobMeaning
yolo9, yolo9_e2e, yolo9_p2copy_pasteCopy-paste instance augmentation probability, task="segment" only
yolo9, yolo9_e2e, yolo9_p2copy_paste_modeCopy-paste source: flip mirrors the same sample, mixup uses a second sample
yolo9, yolo9_e2e, yolo9_p2rot90Random 90-degree rotation probability
rfdetrcopy_pasteCopy-paste probability for task="segment", flip mode only
rfdetrcopy_paste_modeCopy-paste source mode for task="segment"
rfdetrcrop_resize_probRandom crop-resize probability in the native pipeline
dfinecrop_resize_probRandom crop-resize probability, task="segment"
eccrop_resize_probRandom crop-resize probability, task="segment"
ec, yolonasbrightness_contrast_probBrightness and contrast jitter probability, task="pose"
ec, yolonasaffine_probKeypoint-aware affine probability, task="pose"

rot90 applies to detect and OBB on yolo9.

Querying the spec

HelperReturns
aug_support(family)The knob-to-Support table, or None for an unknown family
ignored_aug_params(family)The set of knob names the family ignores; empty for an unknown family
uses_mosaic_gating(family)Whether the family's MixUp only fires on mosaic samples
display_name(family)The human-facing family name used in warnings
mixup_gating_warning(family, mosaic_prob, mixup_prob)The warning text when MixUp can never fire, else None

A Support is a named tuple of status and note, where the note explains why a knob is ignored or gated for that family.

The mosaic gate

For a YOLOX-style family, mixup_prob=0.5 with mosaic_prob=0 disables MixUp entirely, because MixUp applies only to mosaic samples. That combination is easy to reach when turning mosaic off late in training. The trainer logs a warning naming the family, and mixup_gating_warning is the pure function behind it.

Knob list, statuses, archetypes, per-family deviations and helper functions read from libreyolo/data/augment/spec.py at v1.5.0. That table is pinned to the real pipelines by tests/unit/test_augment_spec.py.