From cafea5dcbe57973211d889964135d4c19d208ad2 Mon Sep 17 00:00:00 2001 From: xmy0916 <863299715@qq.com> Date: Wed, 20 Jan 2021 20:06:07 +0800 Subject: [PATCH] fix char dict --- .../rec/multi_language/generate_multi_language_configs.py | 1 + .../rec/multi_language/rec_multi_language_lite_train.yml | 2 +- ppocr/utils/dict/german_dict.txt | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configs/rec/multi_language/generate_multi_language_configs.py b/configs/rec/multi_language/generate_multi_language_configs.py index b0a87af3..4319482b 100644 --- a/configs/rec/multi_language/generate_multi_language_configs.py +++ b/configs/rec/multi_language/generate_multi_language_configs.py @@ -77,6 +77,7 @@ class ArgsParser(ArgumentParser): global_config['Global']['save_model_dir'] = './output/rec_{}_lite'.format(type[0]) global_config['Train']['dataset']['label_file_list'] = ["train_data/{}_train.txt".format(type[0])] global_config['Eval']['dataset']['label_file_list'] = ["train_data/{}_val.txt".format(type[0])] + global_config['Global']['character_type'] = type[0] assert( os.path.isfile(os.path.join(project_path,global_config['Global']['character_dict_path'])) ),"Loss default dictionary file {}_dict.txt.You can download it from \ diff --git a/configs/rec/multi_language/rec_multi_language_lite_train.yml b/configs/rec/multi_language/rec_multi_language_lite_train.yml index 729dedd4..c42a3d1a 100644 --- a/configs/rec/multi_language/rec_multi_language_lite_train.yml +++ b/configs/rec/multi_language/rec_multi_language_lite_train.yml @@ -17,7 +17,7 @@ Global: # for data or label process character_dict_path: # Set the language of training, if set, select the default dictionary file - character_type: ch + character_type: max_text_length: 25 infer_mode: False use_space_char: True diff --git a/ppocr/utils/dict/german_dict.txt b/ppocr/utils/dict/german_dict.txt index 6c4f7df8..5e121af2 100644 --- a/ppocr/utils/dict/german_dict.txt +++ b/ppocr/utils/dict/german_dict.txt @@ -137,7 +137,7 @@ z Ṡ ‘ € -店 -旺 -潮 -酒 +© +ª +« +¬ -- GitLab