class
ImageClassificationAugment
extends
TransformsPresetImageClassificationAugment(crop_size: int, scale: tuple[float, float] = (0.08, 1.0), ratio: tuple[float, float] = (0.75, 1.3333333333333333), color_jitter: float = 0.4, hflip_prob: float = 0.5, auto_augment: str | None = None, random_erasing: float = 0.0, mean: tuple[float, ...] | None = None, std: tuple[float, ...] | None = None, interpolation: str | Interpolation = Interpolation.BILINEAR)Standard ImageNet classification training preset (augmentation).
Pipeline (stages 4–7 conditional, all share the same Normalize stats):
- RandomResizedCrop(crop_size, scale, ratio) 2. HorizontalFlip(p=hflip_prob) — skipped if hflip_prob = 0 3. AutoAugment / RandAugment / TAW — skipped if auto_augment = None 4. ColorJitter(brightness=contrast=...) — skipped if color_jitter = 0 5. Normalize(mean, std, max_pixel_value=1) 6. RandomErasing(p=random_erasing) — skipped if random_erasing = 0
Mirrors the reference-framework training recipe shipped with most
classification models. Setting auto_augment and/or
random_erasing reaches the strong-augmentation recipe used by
timm / torchvision references.
Parameters
crop_sizeintSquare crop fed to the model.
scaletuple of float= (0.08, 1.0)RandomResizedCrop scale range.ratiotuple of float= (0.75, 1.3333)RandomResizedCrop aspect-ratio range.color_jitterfloat= 0.4Brightness / contrast / saturation jitter strength. Zero
disables
ColorJitter entirely.hflip_probfloat= 0.5Horizontal-flip probability. Zero disables the flip.
auto_augmentstr or None= NoneAutoAugment-family policy. See
_parse_auto_augment
for accepted spec strings. None disables this stage —
recommended unless you already have a tuned recipe.random_erasingfloat= 0.0lucid.utils.transforms.RandomErasing probability
applied after Normalize (mirrors reference
ordering). 0.0 disables the stage.meantuple of float= NonePer-channel normalization stats; default ImageNet.
stdtuple of float= NonePer-channel normalization stats; default ImageNet.
No description.
Used by 1
Constructors
1dunder
__init__
→None__init__(crop_size: int, scale: tuple[float, float] = (0.08, 1.0), ratio: tuple[float, float] = (0.75, 1.3333333333333333), color_jitter: float = 0.4, hflip_prob: float = 0.5, auto_augment: str | None = None, random_erasing: float = 0.0, mean: tuple[float, ...] | None = None, std: tuple[float, ...] | None = None, interpolation: str | Interpolation = Interpolation.BILINEAR)