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 to reproduce the instance.
Inherited from : py: class:Transform
IDENTITY_CLASS
The identity class or classes for composition / addition.
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
withother
.__radd__
(other)Return a flat composition of
other
andself
.__call__
(*inputs)Apply the transformation to the tuple
(inp, target)
; the output again is a tuple.
- img_size
The target size of the annotation.