未验证 提交 7e0c8aea 编写于 作者: X xiaoting 提交者: GitHub

revert eval mode (#9843)

* revert eval mode

* update hgnet config
上级 b3066812
......@@ -121,13 +121,9 @@ Eval:
img_mode: BGR
channel_first: false
- MultiLabelEncode:
max_text_length: 100
character_dict_path: ppocr/utils/ppocr_keys_v1.txt
use_space_char: True
gtc_encode: NRTRLabelEncode
- RecResizeImg:
image_shape: [3, 48, 320]
eval_mode: True
- KeepKeys:
keep_keys:
- image
......@@ -138,5 +134,5 @@ Eval:
loader:
shuffle: false
drop_last: false
batch_size_per_card: 1
batch_size_per_card: 128
num_workers: 4
......@@ -75,6 +75,7 @@ Train:
name: MultiScaleDataSet
ds_width: false
data_dir: ./train_data/
ext_op_transform_idx: 1
label_file_list:
- ./train_data/train_list.txt
transforms:
......@@ -99,16 +100,15 @@ Train:
sampler:
name: MultiScaleSampler
scales: [[320, 32], [320, 48], [320, 64]]
# divide_factor: to ensure the width and height dimensions can be devided by downsampling multiple
first_bs: &bs 128
fix_bs: false
divided_factor: [8, 16] # w, h
is_training: True
loader:
shuffle: true
batch_size_per_card: 128
batch_size_per_card: *bs
drop_last: true
num_workers: 4
num_workers: 8
Eval:
dataset:
name: SimpleDataSet
......@@ -120,13 +120,9 @@ Eval:
img_mode: BGR
channel_first: false
- MultiLabelEncode:
max_text_length: 100
character_dict_path: ppocr/utils/ppocr_keys_v1.txt
use_space_char: True
gtc_encode: NRTRLabelEncode
- RecResizeImg:
image_shape: [3, 48, 320]
eval_mode: True
- KeepKeys:
keep_keys:
- image
......
......@@ -73,7 +73,7 @@ def create_operators(op_param_list, global_config=None):
dict) and len(operator) == 1, "yaml format error"
op_name = list(operator)[0]
param = {} if operator[op_name] is None else operator[op_name]
if global_config is not None and "max_text_length" not in param:
if global_config is not None:
param.update(global_config)
op = eval(op_name)(**param)
ops.append(op)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册