Commit ba11deed authored by Yuxin Wu's avatar Yuxin Wu

centerpaste paste to same-size background (fix #406)

parent 342cdc70
...@@ -69,7 +69,7 @@ class CenterPaste(ImageAugmentor): ...@@ -69,7 +69,7 @@ class CenterPaste(ImageAugmentor):
def _augment(self, img, _): def _augment(self, img, _):
img_shape = img.shape[:2] img_shape = img.shape[:2]
assert self.background_shape[0] > img_shape[0] and self.background_shape[1] > img_shape[1] assert self.background_shape[0] >= img_shape[0] and self.background_shape[1] >= img_shape[1]
background = self.background_filler.fill( background = self.background_filler.fill(
self.background_shape, img) self.background_shape, img)
......
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