def _augment(self, img):
        shape = img.arr.shape[:2]
        box = Rect(0, 0, shape[1] - 1, shape[0] - 1)
        dist = self.perturb_ratio * np.sqrt(shape[0]*shape[1])
        newbox = perturb_BB(shape, box, dist,
                self.rng, self.max_aspect_ratio_diff)

        img.arr = newbox.roi(img.arr)
        if img.coords:
            raise NotImplementedError()
dataset/ETHPy150Open ppwwyyxx/tensorpack/tensorpack/dataflow/imgaug/crop.py/RandomCropRandomShape._augment/original