params.py 639 字节
Newer Older
D
dyning 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# -*- 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"
W
WenmuZhou 已提交
16
    cfg.rec_model_dir = "./inference/ch_ppocr_mobile_v1.1_rec_infer/"
D
dyning 已提交
17 18 19 20

    cfg.rec_image_shape = "3, 32, 320"
    cfg.rec_char_type = 'ch'
    cfg.rec_batch_num = 30
L
licx 已提交
21 22
    cfg.max_text_length = 25

D
dyning 已提交
23 24 25
    cfg.rec_char_dict_path = "./ppocr/utils/ppocr_keys_v1.txt"
    cfg.use_space_char = True

M
MissPenguin 已提交
26
    cfg.use_zero_copy_run = False
W
WenmuZhou 已提交
27
    cfg.use_pdserving = False
M
MissPenguin 已提交
28 29

    return cfg