Commit bbe7a12b authored by Yuxin Wu's avatar Yuxin Wu

remove FixedCrop

parent 66d5ce80
...@@ -9,7 +9,7 @@ from ...utils.argtools import shape2d ...@@ -9,7 +9,7 @@ from ...utils.argtools import shape2d
from six.moves import range from six.moves import range
import numpy as np import numpy as np
__all__ = ['RandomCrop', 'CenterCrop', 'FixedCrop', __all__ = ['RandomCrop', 'CenterCrop',
'perturb_BB', 'RandomCropAroundBox', 'RandomCropRandomShape'] 'perturb_BB', 'RandomCropAroundBox', 'RandomCropRandomShape']
...@@ -64,24 +64,6 @@ class CenterCrop(ImageAugmentor): ...@@ -64,24 +64,6 @@ class CenterCrop(ImageAugmentor):
raise NotImplementedError() raise NotImplementedError()
class FixedCrop(ImageAugmentor):
""" Crop a rectangle at a given location"""
def __init__(self, rect):
"""
Args:
rect(Rect): min included, max excluded.
"""
self._init(locals())
def _augment(self, img, _):
return img[self.rect.y0: self.rect.y1 + 1,
self.rect.x0: self.rect.x1 + 1]
def _fprop_coord(self, coord, param):
raise NotImplementedError()
def perturb_BB(image_shape, bb, max_perturb_pixel, def perturb_BB(image_shape, bb, max_perturb_pixel,
rng=None, max_aspect_ratio_diff=0.3, rng=None, max_aspect_ratio_diff=0.3,
max_try=100): max_try=100):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment