COCOBoxToSegMask
- class hybrid_learning.datasets.custom.coco.keypoints_dataset.COCOBoxToSegMask(img_size=None, coco_handle=None, merge_masks=True, include_crowds=True)[source]
 Bases:
_ToSegMaskTurn the bounding box info from COCO annotations into a single binary segmentation mask. The reduction is the trivial logical AND, as masks are assumed to be binary. Output size:
(masks, height, width).Public Data Attributes:
Inherited from : py: class:_ToSegMask
settingsSettings to reproduce the instance.
Inherited from : py: class:Transform
IDENTITY_CLASSThe identity class or classes for composition / addition.
settingsSettings to reproduce the instance.
Public Methods:
to_masks(anns)Turn annotations into list of boolean masks.
Inherited from : py: class:_ToSegMask
to_masks(anns)Turn annotations into list of boolean masks.
apply_to(anns)Turn annotations into a single binary float tensor.
Inherited from : py: class:Transform
apply_to(anns)Turn annotations into a single binary float tensor.
Special Methods:
Inherited from : py: class:_ToSegMask
__init__([img_size, coco_handle, ...])Init.
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
selfwithother.__radd__(other)Return a flat composition of
otherandself.__call__(*inps)General call to the transformation.
- Parameters