rename output dir

This commit is contained in:
tink2123 2020-05-13 17:03:29 +08:00
parent ed4b270815
commit 12ea4ee9c2
3 changed files with 9 additions and 6 deletions

View File

@ -1,12 +1,12 @@
Global:
algorithm: CRNN
use_gpu: true
epoch_num: 300
epoch_num: 3000
log_smooth_window: 20
print_batch_step: 10
save_model_dir: output_ic15
save_epoch_step: 3
eval_batch_step: 2000
save_model_dir: ./output/rec
save_epoch_step: 300
eval_batch_step: 500
train_batch_size_per_card: 256
test_batch_size_per_card: 256
image_shape: [3, 32, 100]
@ -37,6 +37,6 @@ Loss:
Optimizer:
function: ppocr.optimizer,AdamDecay
base_lr: 0.001
base_lr: 0.0001
beta1: 0.9
beta2: 0.999

View File

@ -184,6 +184,9 @@ class SimpleReader(object):
substr = label_infor.decode('utf-8').strip("\n").split("\t")
img_path = self.img_set_dir + "/" + substr[0]
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:
logger.info("{} does not exist!".format(img_path))
continue

View File

@ -64,7 +64,7 @@ class CharacterOps(object):
[sum(text_lengths)] = [text_index_0 + text_index_1 + ... + text_index_(n - 1)]
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_list = []