Args: crop_shape: (h, w) tuple or a int
(self, crop_shape)
| 42 | """ Crop the image at the center""" |
| 43 | |
| 44 | def __init__(self, crop_shape): |
| 45 | """ |
| 46 | Args: |
| 47 | crop_shape: (h, w) tuple or a int |
| 48 | """ |
| 49 | crop_shape = shape2d(crop_shape) |
| 50 | self._init(locals()) |
| 51 | |
| 52 | def get_transform(self, img): |
| 53 | orig_shape = img.shape |