(self, img: NdarrayOrTensor, randomize: bool = True)
| 2393 | raise NotImplementedError(f"Subclass {self.__class__.__name__} must implement this method.") |
| 2394 | |
| 2395 | def __call__(self, img: NdarrayOrTensor, randomize: bool = True) -> NdarrayOrTensor: |
| 2396 | img = convert_to_tensor(img, track_meta=get_track_meta()) |
| 2397 | if randomize: |
| 2398 | self.randomize(img.shape[1:]) |
| 2399 | |
| 2400 | if not self._do_transform: |
| 2401 | return img |
| 2402 | |
| 2403 | img_np, *_ = convert_data_type(img, np.ndarray) |
| 2404 | out = self._transform_holes(img=img_np) |
| 2405 | ret, *_ = convert_to_dst_type(src=out, dst=img) |
| 2406 | return ret |
| 2407 | |
| 2408 | |
| 2409 | class RandCoarseDropout(RandCoarseTransform): |
nothing calls this directly
no test coverage detected