From 5492c10afe6a0b6a626ac9d3b82e7e73e2289663 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Sun, 24 Apr 2022 19:52:29 +0800 Subject: [PATCH] fix comments --- configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml | 4 ++-- configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml | 3 +-- ppocr/modeling/heads/det_db_head.py | 2 +- ppocr/modeling/necks/db_fpn.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml index 6eb3c9ed..3b5ab51b 100644 --- a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml +++ b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml @@ -4,12 +4,11 @@ Global: epoch_num: 500 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: ./output/ch_PP-OCR_V3/ + save_model_dir: ./output/ch_PP-OCR_v3_det/ save_epoch_step: 100 eval_batch_step: - 0 - 400 - load_static_weights: false cal_metric_during_train: false pretrained_model: null checkpoints: null @@ -137,6 +136,7 @@ Train: img_mode: BGR channel_first: false - DetLabelEncode: null + - CopyPaste: - IaaAugment: augmenter_args: - type: Fliplr diff --git a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml index 1d53d062..696e8a21 100644 --- a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml +++ b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml @@ -4,12 +4,11 @@ Global: epoch_num: 500 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: ./output/ch_PP-OCR_V3/ + save_model_dir: ./output/ch_PP-OCR_V3_det/ save_epoch_step: 100 eval_batch_step: - 0 - 400 - load_static_weights: false cal_metric_during_train: false pretrained_model: null checkpoints: null diff --git a/ppocr/modeling/heads/det_db_head.py b/ppocr/modeling/heads/det_db_head.py index 997d68e0..2d94555a 100644 --- a/ppocr/modeling/heads/det_db_head.py +++ b/ppocr/modeling/heads/det_db_head.py @@ -66,7 +66,7 @@ class Head(nn.Layer): self.conv3 = nn.Conv2DTranspose( in_channels=in_channels // 4, out_channels=1, - kernel_size=kernel_size[1], + kernel_size=kernel_size[2], stride=2, weight_attr=ParamAttr( initializer=paddle.nn.initializer.KaimingUniform()), diff --git a/ppocr/modeling/necks/db_fpn.py b/ppocr/modeling/necks/db_fpn.py index be66a65f..c78f1104 100644 --- a/ppocr/modeling/necks/db_fpn.py +++ b/ppocr/modeling/necks/db_fpn.py @@ -20,7 +20,7 @@ import paddle from paddle import nn import paddle.nn.functional as F from paddle import ParamAttr - +import os __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../../..'))) -- GitLab