提交 12ea4ee9 编写于 作者: T tink2123

rename output dir

上级 ed4b2708
Global: Global:
algorithm: CRNN algorithm: CRNN
use_gpu: true use_gpu: true
epoch_num: 300 epoch_num: 3000
log_smooth_window: 20 log_smooth_window: 20
print_batch_step: 10 print_batch_step: 10
save_model_dir: output_ic15 save_model_dir: ./output/rec
save_epoch_step: 3 save_epoch_step: 300
eval_batch_step: 2000 eval_batch_step: 500
train_batch_size_per_card: 256 train_batch_size_per_card: 256
test_batch_size_per_card: 256 test_batch_size_per_card: 256
image_shape: [3, 32, 100] image_shape: [3, 32, 100]
...@@ -37,6 +37,6 @@ Loss: ...@@ -37,6 +37,6 @@ Loss:
Optimizer: Optimizer:
function: ppocr.optimizer,AdamDecay function: ppocr.optimizer,AdamDecay
base_lr: 0.001 base_lr: 0.0001
beta1: 0.9 beta1: 0.9
beta2: 0.999 beta2: 0.999
...@@ -184,6 +184,9 @@ class SimpleReader(object): ...@@ -184,6 +184,9 @@ class SimpleReader(object):
substr = label_infor.decode('utf-8').strip("\n").split("\t") substr = label_infor.decode('utf-8').strip("\n").split("\t")
img_path = self.img_set_dir + "/" + substr[0] img_path = self.img_set_dir + "/" + substr[0]
img = cv2.imread(img_path) img = cv2.imread(img_path)
if img.shape[-1]==1 or len(list(img.shape))==2:
print("this is a gry")
img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
if img is None: if img is None:
logger.info("{} does not exist!".format(img_path)) logger.info("{} does not exist!".format(img_path))
continue continue
......
...@@ -64,7 +64,7 @@ class CharacterOps(object): ...@@ -64,7 +64,7 @@ class CharacterOps(object):
[sum(text_lengths)] = [text_index_0 + text_index_1 + ... + text_index_(n - 1)] [sum(text_lengths)] = [text_index_0 + text_index_1 + ... + text_index_(n - 1)]
length: length of each text. [batch_size] length: length of each text. [batch_size]
""" """
if self.character_type == "en": if self.character_type == "en" or text.encode( 'UTF-8' ).isalpha():
text = text.lower() text = text.lower()
text_list = [] text_list = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册