PaddleOCR/deploy/hubserving/ocr_rec/params.py

30 lines
625 B
Python
Raw Permalink Normal View History

2020-07-12 16:05:28 +08:00
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Config(object):
pass
def read_params():
cfg = Config()
#params for text recognizer
cfg.rec_algorithm = "CRNN"
cfg.rec_model_dir = "./inference/ch_PP-OCRv2_rec_infer/"
2020-07-12 16:05:28 +08:00
cfg.rec_image_shape = "3, 32, 320"
cfg.rec_char_type = 'ch'
cfg.rec_batch_num = 30
cfg.max_text_length = 25
2020-07-12 16:05:28 +08:00
cfg.rec_char_dict_path = "./ppocr/utils/ppocr_keys_v1.txt"
cfg.use_space_char = True
2020-12-01 17:46:50 +08:00
cfg.use_pdserving = False
2021-01-04 12:11:21 +08:00
cfg.use_tensorrt = False
2020-08-26 13:01:51 +08:00
return cfg