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 6eb3c9edd6778a07248a2b20a8a78b24b7318c2f..3b5ab51b6967efbcfaf0f50599164e2545cc1b89 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 1d53d062dafeb414d109d48bc741dd2a1efbb63c..696e8a2168511f683d12e9cc2e57d61003e2de95 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 997d68e0f05db5ba2d7787af543cc3141eb94803..2d94555aeb9ef61c25a014fd4c20f468292ee90c 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 be66a65fcc8efa573cd6227833080d5a3586297a..c78f11040d49c854f880fc44b4c03d91e8123303 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__, '../../..')))