提交 c83320a1 编写于 作者: J jiangjiajun

modify transforms

上级 5a30599d
......@@ -156,7 +156,6 @@ class Compose(DetTransform):
if not isinstance(augmenters, list):
raise Exception(
"augmenters should be list type in func add_augmenters()")
assert mode == 'train', "There should be exists augmenters while on train mode"
self.transforms = augmenters + self.transforms.transforms
......
......@@ -108,6 +108,12 @@ class Compose(SegTransform):
outputs = (im, im_info)
return outputs
def add_augmenters(self, augmenters):
if not isinstance(augmenters, list):
raise Exception(
"augmenters should be list type in func add_augmenters()")
self.transforms = augmenters + self.transforms.transforms
class RandomHorizontalFlip(SegTransform):
"""以一定的概率对图像进行水平翻转。当存在标注图像时,则同步进行翻转。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册