rename output dir

revert-162-develop
tink2123 5 years ago
parent ed4b270815
commit 12ea4ee9c2

@ -1,12 +1,12 @@
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:
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):
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):
[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 = []

Loading…
Cancel
Save