omniloader.transforms¶
Configurable, per-sample transforms: normalization and augmentation.
This subpackage groups the transform pipeline used after unification:
base—Transform,Composeand shared helpers;normalize—Normalize,MinMaxNormalize,RobustNormalize,InstanceNormalize;augment—GaussianNoise,FeatureDropout,SpanMasking,TimeWarp,FeatureMasking;crop—RandomCrop,CenterCrop;mix—MixupCollator(collate-time);stats— statistics helpers for normalization.
Compose transforms with Compose, or build one from a list of config dicts
with build_transform().
Submodules¶
Attributes¶
Functions¶
|
Build a |
Package Contents¶
- omniloader.transforms.TRANSFORMS: dict[str, type[base.Transform]]¶
- omniloader.transforms.build_transform(configs: collections.abc.Sequence[collections.abc.Mapping[str, Any]], schema: omniloader.schema.spec.UnifiedSchema | None = None) base.Compose | None[source]¶
Build a
Composefrom a list of transform config dicts.Each config dict has a
name(a key ofTRANSFORMS) and the remaining keys are forwarded as keyword arguments. Schema-aware transforms receiveschemaautomatically when they declare no explicitkeys; stats-based normalizers read theirstatsfrom the config — either inline, or from a saved JSON file viastats_path(andunion_stats_pathforPerDatasetNormalize), loaded withload_stats(). This lets a config reference stats produced once byomniloader compute-statsinstead of inlining them.- Parameters:
configs – A list of transform specifications.
schema – The unified schema, injected into schema-aware transforms.
- Returns:
A
Compose, orNoneifconfigsis empty.- Raises:
ValueError – If a config names an unknown transform.