Constants.py 1.15 KB
Newer Older
liukaiwen's avatar
liukaiwen committed
1
2
3
4
5
6
7
8
9
10
"""
span维度自定义字段
"""
# span是否是跨页合并的
CROSS_PAGE = "cross_page"

"""
block维度自定义字段
"""
# block中lines是否被删除
11
12
13
LINES_DELETED = "lines_deleted"

# table recognition max time default value
14
15
16
17
18
19
20
21
22
23
24
25
TABLE_MAX_TIME_VALUE = 400

# pp_table_result_max_length
TABLE_MAX_LEN = 480

# table master structure dict
TABLE_MASTER_DICT = "table_master_structure_dict.txt"

# table master dir
TABLE_MASTER_DIR = "table_structure_tablemaster_infer/"

# pp detect model dir
liukaiwen's avatar
liukaiwen committed
26
DETECT_MODEL_DIR = "ch_PP-OCRv4_det_infer"
27
28

# pp rec model dir
liukaiwen's avatar
liukaiwen committed
29
REC_MODEL_DIR = "ch_PP-OCRv4_rec_infer"
30
31
32
33

# pp rec char dict path
REC_CHAR_DICT = "ppocr_keys_v1.txt"

34
35
36
37
38
39
# pp rec copy rec directory
PP_REC_DIRECTORY = ".paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer"

# pp rec copy det directory
PP_DET_DIRECTORY = ".paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer"

40

41
42
43
44
45
46
47
48
49
50
51
52
class MODEL_NAME:
    # pp table structure algorithm
    TABLE_MASTER = "tablemaster"
    # struct eqtable
    STRUCT_EQTABLE = "struct_eqtable"

    DocLayout_YOLO = "doclayout_yolo"

    LAYOUTLMv3 = "layoutlmv3"

    YOLO_V8_MFD = "yolo_v8_mfd"

53
54
55
    UniMerNet_v2_Small = "unimernet_small"

    RAPID_TABLE = "rapid_table"