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

revert eval mode (#9843)

* revert eval mode

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