augmentations
darts_segmentation.training.augmentations
¶
Augmentations for segmentation tasks.
Augmentation
module-attribute
¶
Augmentation = typing.Literal[
"HorizontalFlip",
"VerticalFlip",
"RandomRotate90",
"Blur",
"RandomBrightnessContrast",
"MultiplicativeNoise",
"Posterize",
]
get_augmentation
¶
get_augmentation(
augment: list[
darts_segmentation.training.augmentations.Augmentation
]
| None,
) -> albumentations.Compose | None
Get augmentations for segmentation tasks.
Parameters:
-
augment
(list[darts_segmentation.training.augmentations.Augmentation] | None
) –List of augmentations to apply. If None or emtpy, no augmentations are applied. If not empty, augmentations are applied in the order they are listed. Available augmentations: - HorizontalFlip - VerticalFlip - RandomRotate90 - Blur - RandomBrightnessContrast - MultiplicativeNoise
Raises:
-
ValueError
–If an unknown augmentation is provided.
Returns:
-
albumentations.Compose | None
–A.Compose | None: A Compose object containing the augmentations. If no augmentations are provided, returns None.