MAITEObjectDetectionAugmentation#
- class nrtk.interop.MAITEObjectDetectionAugmentation(*, augment: PerturbImage, augment_id: str)#
Implementation of MAITE Object Detection Augmentation for NRTK perturbers.
Implementation of MAITE Augmentation for NRTK perturbers operating on a MAITE-protocol compliant Object Detection dataset.
Given a set of ground truth labels alongside an image and image metadata, MAITEObjectDetectionAugmentation will properly scale the labels in accordance with the change in the image scale due to applied pertubation. At this time MAITEObjectDetectionAugmentation does not support any other augmentation to the labels such as cropping, translation, or rotation.
- Attributes:
- augmentationsSequence[Augmentation] | None
Optional task-specific sequence of MAITE augmentations to be applied on a given batch.
- metadata: AugmentationMetadata
Metadata for this augmentation.
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[ObjectDetectionTarget], 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[ObjectDetectionTarget], 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 perform.
- 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).