PadAndScaleAnnotatedImg

class hybrid_learning.datasets.custom.coco.keypoints_dataset.PadAndScaleAnnotatedImg(img_size)[source]

Bases: TupleTransforms

Pickleable wrapper to pad and scale both an image and its COCO annotation to a target size. See pad_and_scale_annotation().

Public Data Attributes:

settings

Settings to reproduce the instance.

Inherited from : py: class:Transform

IDENTITY_CLASS

The identity class or classes for composition / addition.

settings

Settings to reproduce the instance.

Public Methods:

apply_to(img_t, anns)

Pad and rescale both image and annotations.

Inherited from : py: class:TupleTransforms

apply_to(img_t, anns)

Pad and rescale both image and annotations.

Inherited from : py: class:Transform

apply_to(img_t, anns)

Pad and rescale both image and annotations.

Special Methods:

__init__(img_size)

Init.

Inherited from : py: class:TupleTransforms

__init__(img_size)

Init.

__call__(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.

Inherited from : py: class:Transform

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

__copy__()

Return a shallow copy of self using settings.

__add__(other)

Return a flat composition of self with other.

__radd__(other)

Return a flat composition of other and self.

__call__(*inputs)

Apply the transformation to the tuple (inp, target); the output again is a tuple.


Parameters

img_size (Tuple[int, int]) –

__init__(img_size)[source]

Init. Set the identity transformation for this class.

Parameters

img_size (Tuple[int, int]) –

apply_to(img_t, anns)[source]

Pad and rescale both image and annotations.

Parameters
img_size

The target size of the annotation.

property settings: Dict[str, Any]

Settings to reproduce the instance.