params.py 625 Bytes
Newer Older
dyning's avatar
dyning committed
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"
16
    cfg.rec_model_dir = "./inference/ch_PP-OCRv2_rec_infer/"
dyning's avatar
dyning committed
17
18
19
20

    cfg.rec_image_shape = "3, 32, 320"
    cfg.rec_char_type = 'ch'
    cfg.rec_batch_num = 30
21
22
    cfg.max_text_length = 25

dyning's avatar
dyning committed
23
24
25
    cfg.rec_char_dict_path = "./ppocr/utils/ppocr_keys_v1.txt"
    cfg.use_space_char = True

WenmuZhou's avatar
WenmuZhou committed
26
    cfg.use_pdserving = False
WenmuZhou's avatar
WenmuZhou committed
27
    cfg.use_tensorrt = False
MissPenguin's avatar
MissPenguin committed
28
29

    return cfg