Commit 1df9e4a3 authored by Yuxin Wu's avatar Yuxin Wu

rename fprop_coord to augment_coords (#334)

parent b7ad58ec
...@@ -62,8 +62,8 @@ class Augmentor(object): ...@@ -62,8 +62,8 @@ class Augmentor(object):
class ImageAugmentor(Augmentor): class ImageAugmentor(Augmentor):
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
return coord return coords
class AugmentorList(ImageAugmentor): class AugmentorList(ImageAugmentor):
......
...@@ -39,7 +39,7 @@ class RandomCrop(ImageAugmentor): ...@@ -39,7 +39,7 @@ class RandomCrop(ImageAugmentor):
h0, w0 = param h0, w0 = param
return img[h0:h0 + self.crop_shape[0], w0:w0 + self.crop_shape[1]] return img[h0:h0 + self.crop_shape[0], w0:w0 + self.crop_shape[1]]
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
...@@ -60,7 +60,7 @@ class CenterCrop(ImageAugmentor): ...@@ -60,7 +60,7 @@ class CenterCrop(ImageAugmentor):
w0 = int((orig_shape[1] - self.crop_shape[1]) * 0.5) w0 = int((orig_shape[1] - self.crop_shape[1]) * 0.5)
return img[h0:h0 + self.crop_shape[0], w0:w0 + self.crop_shape[1]] return img[h0:h0 + self.crop_shape[0], w0:w0 + self.crop_shape[1]]
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
...@@ -127,7 +127,7 @@ class RandomCropAroundBox(ImageAugmentor): ...@@ -127,7 +127,7 @@ class RandomCropAroundBox(ImageAugmentor):
def _augment(self, img, newbox): def _augment(self, img, newbox):
return newbox.roi(img) return newbox.roi(img)
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
......
...@@ -100,5 +100,5 @@ class GaussianDeform(ImageAugmentor): ...@@ -100,5 +100,5 @@ class GaussianDeform(ImageAugmentor):
grid = self.grid + np.dot(self.gws, v) grid = self.grid + np.dot(self.gws, v)
return np_sample(img, grid) return np_sample(img, grid)
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
...@@ -46,7 +46,7 @@ class Flip(ImageAugmentor): ...@@ -46,7 +46,7 @@ class Flip(ImageAugmentor):
ret = img ret = img
return ret return ret
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
...@@ -166,5 +166,5 @@ class Transpose(ImageAugmentor): ...@@ -166,5 +166,5 @@ class Transpose(ImageAugmentor):
ret = ret[:, :, np.newaxis] ret = ret[:, :, np.newaxis]
return ret return ret
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
...@@ -78,7 +78,7 @@ class CenterPaste(ImageAugmentor): ...@@ -78,7 +78,7 @@ class CenterPaste(ImageAugmentor):
background[y0:y0 + img_shape[0], x0:x0 + img_shape[1]] = img background[y0:y0 + img_shape[0], x0:x0 + img_shape[1]] = img
return background return background
def _fprop_coord(self, coord, param): def _augment_coords(self, coords, param):
raise NotImplementedError() raise NotImplementedError()
......
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