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

Method __init__

PATH/core/data/transforms/seg_aug_dev.py:159–175  ·  view source on GitHub ↗

Args: x0, y0, w, h (int): crop the image(s) by img[y0:y0+h, x0:x0+w]. orig_w, orig_h (int): optional, the original width and height before cropping. Needed to make this transform invertible.

(
        self,
        x0: int,
        y0: int,
        w: int,
        h: int,
        orig_w: Optional[int] = None,
        orig_h: Optional[int] = None,
    )

Source from the content-addressed store, hash-verified

157
158class CropTransform(Transform):
159 def __init__(
160 self,
161 x0: int,
162 y0: int,
163 w: int,
164 h: int,
165 orig_w: Optional[int] = None,
166 orig_h: Optional[int] = None,
167 ):
168 """
169 Args:
170 x0, y0, w, h (int): crop the image(s) by img[y0:y0+h, x0:x0+w].
171 orig_w, orig_h (int): optional, the original width and height
172 before cropping. Needed to make this transform invertible.
173 """
174 super().__init__()
175 self._set_attributes(locals())
176
177 def apply_image(self, img: np.ndarray) -> np.ndarray:
178 """

Callers

nothing calls this directly

Calls 2

_set_attributesMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected