From f6d6249c93ad4e750d1d8d7ec4905bd5f1580825 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Mon, 6 Jul 2020 16:50:33 +0800 Subject: [PATCH] change name for jitter --- ppocr/data/rec/img_tools.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ppocr/data/rec/img_tools.py b/ppocr/data/rec/img_tools.py index cc8911564..a8fa988ef 100755 --- a/ppocr/data/rec/img_tools.py +++ b/ppocr/data/rec/img_tools.py @@ -119,9 +119,9 @@ def blur(img): return img -def doudong(img): +def jitter(img): """ - doudong + jitter """ w, h, _ = img.shape if h > 10 and w > 10: @@ -198,7 +198,7 @@ class Config: self.affine = False self.reverse = True self.noise = True - self.dou = False + self.jitter = True self.blur = True self.color = True @@ -323,8 +323,8 @@ def warp(img, ang): tp = random.randint(1, 100) if tp >= 50: new_img = cvtColor(new_img) - if config.dou: - new_img = doudong(new_img) + if config.jitter: + new_img = jitter(new_img) if config.noise: tp = random.randint(1, 100) if tp >= 50: