From 742cb9a3c62766268861c0831d8914184136ffa2 Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Tue, 15 Sep 2020 10:19:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B3=A8=E9=87=8A=E5=92=8C?= =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=8D=E7=94=A8=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/doc_ch/angle_class.md | 2 +- doc/doc_en/angle_class_en.md | 2 +- ppocr/data/cls/dataset_traversal.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/doc_ch/angle_class.md b/doc/doc_ch/angle_class.md index e884d5ef..b2118661 100644 --- a/doc/doc_ch/angle_class.md +++ b/doc/doc_ch/angle_class.md @@ -77,7 +77,7 @@ PaddleOCR提供了多种数据增强方式,如果您希望在训练时加入 默认的扰动方式有:颜色空间转换(cvtColor)、模糊(blur)、抖动(jitter)、噪声(Gasuss noise)、随机切割(random crop)、透视(perspective)、颜色反转(reverse),随机数据增强(RandAugment)。 训练过程中除随机数据增强外每种扰动方式以50%的概率被选择,具体代码实现请参考: -[randaugment.py.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/cls/randaugment.py) +[randaugment.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/cls/randaugment.py) [img_tools.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/rec/img_tools.py) *由于OpenCV的兼容性问题,扰动操作暂时只支持linux* diff --git a/doc/doc_en/angle_class_en.md b/doc/doc_en/angle_class_en.md index 91af20a4..c7fff3a1 100644 --- a/doc/doc_en/angle_class_en.md +++ b/doc/doc_en/angle_class_en.md @@ -78,7 +78,7 @@ PaddleOCR provides a variety of data augmentation methods. If you want to add di The default perturbation methods are: cvtColor, blur, jitter, Gasuss noise, random crop, perspective, color reverse, RandAugment. Except for RandAugment, each disturbance method is selected with a 50% probability during the training process. For specific code implementation, please refer to: -[randaugment.py.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/cls/randaugment.py) +[randaugment.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/cls/randaugment.py) [img_tools.py](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/ppocr/data/rec/img_tools.py) diff --git a/ppocr/data/cls/dataset_traversal.py b/ppocr/data/cls/dataset_traversal.py index c465bf9d..01f8c89c 100755 --- a/ppocr/data/cls/dataset_traversal.py +++ b/ppocr/data/cls/dataset_traversal.py @@ -122,8 +122,6 @@ class SimpleReader(object): img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) if self.use_distort: - # if random.randint(1, 100)>= 50: - # img = random_crop(img) img = warp(img, 10) img = self.randaug(img) norm_img = resize_norm_img(img, self.image_shape) -- GitLab