Commit 7e88895f authored by tink2123's avatar tink2123
Browse files

add default value for distort

parent f6d6249c
...@@ -14,7 +14,7 @@ Global: ...@@ -14,7 +14,7 @@ Global:
character_type: ch character_type: ch
character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt character_dict_path: ./ppocr/utils/ppocr_keys_v1.txt
loss_type: ctc loss_type: ctc
distort: true distort: false
reader_yml: ./configs/rec/rec_chinese_reader.yml reader_yml: ./configs/rec/rec_chinese_reader.yml
pretrain_weights: pretrain_weights:
checkpoints: checkpoints:
......
...@@ -45,6 +45,7 @@ class LMDBReader(object): ...@@ -45,6 +45,7 @@ class LMDBReader(object):
self.use_tps = False self.use_tps = False
if "tps" in params: if "tps" in params:
self.ues_tps = True self.ues_tps = True
self.use_distort = False
if "distort" in params: if "distort" in params:
self.use_distort = params['distort'] and params['use_gpu'] self.use_distort = params['distort'] and params['use_gpu']
if not params['use_gpu']: if not params['use_gpu']:
...@@ -192,6 +193,7 @@ class SimpleReader(object): ...@@ -192,6 +193,7 @@ class SimpleReader(object):
self.use_tps = False self.use_tps = False
if "tps" in params: if "tps" in params:
self.use_tps = True self.use_tps = True
self.use_distort = False
if "distort" in params: if "distort" in params:
self.use_distort = params['distort'] and params['use_gpu'] self.use_distort = params['distort'] and params['use_gpu']
if not params['use_gpu']: if not params['use_gpu']:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment