提交 991e194e 编写于 作者: A andyjpaddle

add vl

上级 a3a09515
...@@ -3,12 +3,12 @@ Global: ...@@ -3,12 +3,12 @@ Global:
epoch_num: 8 epoch_num: 8
log_smooth_window: 200 log_smooth_window: 200
print_batch_step: 200 print_batch_step: 200
save_model_dir: /paddle/backup/visionlan/LA_v2 save_model_dir: ./output/rec/r45_visionlan
save_epoch_step: 1 save_epoch_step: 1
# evaluation is run every 2000 iterations # evaluation is run every 2000 iterations
eval_batch_step: [0, 2000] eval_batch_step: [0, 2000]
cal_metric_during_train: True cal_metric_during_train: True
pretrained_model: ./pretrained_model/LF_2_ocr pretrained_model:
checkpoints: checkpoints:
save_inference_dir: save_inference_dir:
use_visualdl: True use_visualdl: True
......
...@@ -157,17 +157,6 @@ class TextRecognizer(object): ...@@ -157,17 +157,6 @@ class TextRecognizer(object):
padding_im[:, :, 0:resized_w] = resized_image padding_im[:, :, 0:resized_w] = resized_image
return padding_im return padding_im
def resize_norm_img_svtr(self, img, image_shape):
imgC, imgH, imgW = image_shape
resized_image = cv2.resize(
img, (imgW, imgH), interpolation=cv2.INTER_LINEAR)
resized_image = resized_image.astype('float32')
resized_image = resized_image.transpose((2, 0, 1)) / 255
resized_image -= 0.5
resized_image /= 0.5
return resized_image
def resize_norm_img_vl(self, img, image_shape): def resize_norm_img_vl(self, img, image_shape):
imgC, imgH, imgW = image_shape imgC, imgH, imgW = image_shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册