ConstantsAugmentation

class lib.training.data.augmentation.ConstantsAugmentation(color: ConstantsColor, transform: ConstantsTransform, warp: ConstantsWarp)

Bases: object

Dataclass for holding constants for Image Augmentation.

Parameters:
color

The constants for adjusting color/contrast in an image

Type:

lib.training.data.augmentation.ConstantsColor

transform

The constants for image transformation

Type:

lib.training.data.augmentation.ConstantsTransform

warp

The constants for image warping

Type:

lib.training.data.augmentation.ConstantsWarp

Dataclass should be initialized using its :func:`from_config` method

Example

>>> constants = ConstantsAugmentation.from_config(processing_size=256,
...                                               batch_size=16)

Methods Summary

from_config(processing_size, batch_size)

Create a new dataclass instance from user config

Methods Documentation

classmethod from_config(processing_size: int, batch_size: int) ConstantsAugmentation

Create a new dataclass instance from user config

Parameters:
  • processing_size (int) – The size of image to augment the data for

  • batch_size (int) – The batch size that augmented data is being prepared for

Return type:

ConstantsAugmentation

color: ConstantsColor = <dataclasses._MISSING_TYPE object>

The constants for adjusting color/contrast in an image

classmethod from_config(processing_size: int, batch_size: int) ConstantsAugmentation

Create a new dataclass instance from user config

Parameters:
  • processing_size (int) – The size of image to augment the data for

  • batch_size (int) – The batch size that augmented data is being prepared for

Return type:

ConstantsAugmentation

transform: ConstantsTransform = <dataclasses._MISSING_TYPE object>

The constants for image transformation

warp: ConstantsWarp = <dataclasses._MISSING_TYPE object>

The constants for image warping