class documentation
class AugmentationEngine(ABC):
Known subclasses: luxonis_ml.data.augmentations.AlbumentationsEngine
Constructor: AugmentationEngine(height, width, targets, n_classes, ...)
Undocumented
| Method | __init__ |
Initialize augmentation pipeline from configuration. |
| Method | apply |
Apply the augmentation pipeline to the data. |
| Property | batch |
The batch size required by the augmentation pipeline. |
@abstractmethod
def __init__(self, height: int, width: int, targets: Mapping[ str, str], n_classes: Mapping[ str, int], source_names: list[ str], config: Iterable[ Params], keep_aspect_ratio: bool, is_validation_pipeline: bool | None = None, pipeline_stage: Literal[ 'train', 'val', 'test'] | None = None, min_bbox_visibility: float = 0.0, seed: int | None = None, bbox_area_threshold: float = 0.0004):
¶
overridden in
luxonis_ml.data.augmentations.AlbumentationsEngineInitialize augmentation pipeline from configuration.
| Parameters | |
height:int | Target image height. |
width:int | Target image width. |
targets:Mapping[ | Task names mapped to task types, such as {"detection/boundingbox": "bbox"}. |
nMapping[ | Number of associated classes for each task, such as {"cars/boundingbox": 2}. |
sourcelist[ | Source names expected in loader images. |
config:Iterable[ | Augmentation configuration. Each item describes one augmentation; interpretation is engine-specific. |
keepbool | Whether to preserve image aspect ratio while resizing. |
isbool | None | Optional backward-compatible train-versus-eval hint.
Deprecated since version 0.5.0: use pipeline_stage instead.
|
pipelineLiteral[ | Optional explicit pipeline stage. When provided, it takes precedence over is_validation_pipeline. |
minfloat | Minimum fraction of the original bounding box that must remain visible after augmentation. |
seed:int | None | Optional random seed for reproducible augmentation. |
bboxfloat | Minimum normalized area for bounding boxes to remain valid. The default removes very small boxes and their associated keypoints. |
overridden in
luxonis_ml.data.augmentations.AlbumentationsEngineApply the augmentation pipeline to the data.
| Parameters | |
inputlist[ | Loader outputs to augment. The number of items must match the engine's batch size. |
| Returns | |
LoaderMultiOutput | Augmented loader output. |
overridden in
luxonis_ml.data.augmentations.AlbumentationsEngineThe batch size required by the augmentation pipeline.
The batch size is the number of images requested by the augmentation pipeline in case of batch-based augmentations.
For example, if the augmentation pipeline contains the MixUp augmentation, the batch size should be 2.
If the pipeline requires MixUp and also Mosaic4 augmentations, the batch size should be 8 = (2⋅4).