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