MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / transform

Method transform

PATH/core/data/transforms/seg_transforms_dev.py:663–674  ·  view source on GitHub ↗

In-place transform all attributes of this class. By "in-place", it means after calling this method, accessing an attribute such as ``self.image`` will return transformed data.

(self, tfm: Transform)

Source from the content-addressed store, hash-verified

661 self.sem_seg = sem_seg
662
663 def transform(self, tfm: Transform) -> None:
664 """
665 In-place transform all attributes of this class.
666
667 By "in-place", it means after calling this method, accessing an attribute such
668 as ``self.image`` will return transformed data.
669 """
670 self.image = tfm.apply_image(self.image)
671 if self.boxes is not None:
672 self.boxes = tfm.apply_box(self.boxes)
673 if self.sem_seg is not None:
674 self.sem_seg = tfm.apply_segmentation(self.sem_seg)
675
676 def apply_augmentations(
677 self, augmentations: List[Union[Augmentation, Transform]]

Callers 15

__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45
ShearXFunction · 0.45
ShearYFunction · 0.45
TranslateXFunction · 0.45
TranslateXabsFunction · 0.45
TranslateYFunction · 0.45
TranslateYabsFunction · 0.45
_read_oneMethod · 0.45
_read_oneMethod · 0.45
read_oneMethod · 0.45

Calls 3

apply_boxMethod · 0.80
apply_imageMethod · 0.45
apply_segmentationMethod · 0.45

Tested by

no test coverage detected