JATICClassificationAugmentation
- class nrtk.interop.maite.interop.image_classification.augmentation.JATICClassificationAugmentation(augment: PerturbImage, augment_id: str)
Implementation of JATIC Augmentation for NRTK perturbers.
Implementation of JATIC Augmentation for NRTK perturbers operating on a MAITE-protocol compliant Image Classification dataset.
Parameters
- augmentPerturbImage
Augmentations to apply to an image.
- name: str
Name of the augmentation. Will appear in metadata key.
Methods
Checks if the necessary dependency (MAITE) is available.
- __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[NRTKDatumMetadata]]
Apply augmentations to the given data batch.
- __init__(augment: PerturbImage, augment_id: str) None
Initialize augmentation wrapper.
- __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).
- classmethod is_usable() bool
Checks if the necessary dependency (MAITE) is available.
- Returns:
bool: True MAITE is available; False otherwise.