未验证 提交 72d91eab 编写于 作者: T topduke 提交者: GitHub

update Blur to fix training time consumption (#9068)

* fix piecewise boundaries and droppath dtype

* fix tipc piecewise boundaries and droppath dtype

* update Blur to fix training time consumption
上级 dd02918b
......@@ -69,6 +69,8 @@ class BaseDataAugmentation(object):
self.jitter_prob = jitter_prob
self.blur_prob = blur_prob
self.hsv_aug_prob = hsv_aug_prob
# for GaussianBlur
self.fil = cv2.getGaussianKernel(ksize=5, sigma=1, ktype=cv2.CV_32F)
def __call__(self, data):
img = data['image']
......@@ -78,7 +80,8 @@ class BaseDataAugmentation(object):
img = get_crop(img)
if random.random() <= self.blur_prob:
img = blur(img)
# GaussianBlur
img = cv2.sepFilter2D(img, -1, self.fil, self.fil)
if random.random() <= self.hsv_aug_prob:
img = hsv_aug(img)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册