Expects a numpy array with shape HxWxC in uint8 format.
(self, image: np.ndarray)
| 24 | self.target_length = target_length |
| 25 | |
| 26 | def apply_image(self, image: np.ndarray) -> np.ndarray: |
| 27 | """ |
| 28 | Expects a numpy array with shape HxWxC in uint8 format. |
| 29 | """ |
| 30 | target_size = self.get_preprocess_shape(image.shape[0], image.shape[1], self.target_length) |
| 31 | return np.array(resize(to_pil_image(image), target_size)) |
| 32 | |
| 33 | def apply_coords(self, coords: np.ndarray, original_size: Tuple[int, ...]) -> np.ndarray: |
| 34 | """ |
nothing calls this directly
no test coverage detected