MAITEImageClassificationAugmentation#
- class nrtk.interop.MAITEImageClassificationAugmentation(*, augment: PerturbImage, augment_id: str)#
Implementation of MAITE Image Classification Augmentation for NRTK perturbers.
Implementation of MAITE Augmentation for NRTK perturbers operating on a MAITE-protocol compliant Image Classification dataset.
- Attributes:
- augment: PerturbImage
Augmentations to apply to an image.
- name: str
Name of the augmentation. Will appear in metadata key.
Methods
- __call__(batch: tuple[Sequence[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Sequence[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Sequence[DatumMetadata]]) tuple[Sequence[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Sequence[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Sequence[DatumMetadata]]#
Return a batch of augmented images and metadata.
- __init__(*, augment: PerturbImage, augment_id: str) None#
Initialize augmentation wrapper.
- Args:
- augment:
PerturbImage implementation to apply to an image.
- augment_id:
Metadata ID for this augmentation.
- __subclasshook__()#
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).