add default value for distort

This commit is contained in:
tink2123 2020-07-06 16:54:50 +08:00
parent f6d6249c93
commit 7e88895f7b
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@ Global:
character_type: ch
character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt
loss_type: ctc
distort: true
distort: false
reader_yml: ./configs/rec/rec_chinese_reader.yml
pretrain_weights:
checkpoints:

View File

@ -45,6 +45,7 @@ class LMDBReader(object):
self.use_tps = False
if "tps" in params:
self.ues_tps = True
self.use_distort = False
if "distort" in params:
self.use_distort = params['distort'] and params['use_gpu']
if not params['use_gpu']:
@ -192,6 +193,7 @@ class SimpleReader(object):
self.use_tps = False
if "tps" in params:
self.use_tps = True
self.use_distort = False
if "distort" in params:
self.use_distort = params['distort'] and params['use_gpu']
if not params['use_gpu']: