constants.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. """span维度自定义字段."""
  2. # span是否是跨页合并的
  3. CROSS_PAGE = 'cross_page'
  4. """
  5. block维度自定义字段
  6. """
  7. # block中lines是否被删除
  8. LINES_DELETED = 'lines_deleted'
  9. # table recognition max time default value
  10. TABLE_MAX_TIME_VALUE = 400
  11. # pp_table_result_max_length
  12. TABLE_MAX_LEN = 480
  13. # table master structure dict
  14. TABLE_MASTER_DICT = 'table_master_structure_dict.txt'
  15. # table master dir
  16. TABLE_MASTER_DIR = 'table_structure_tablemaster_infer/'
  17. # pp detect model dir
  18. DETECT_MODEL_DIR = 'ch_PP-OCRv4_det_infer'
  19. # pp rec model dir
  20. REC_MODEL_DIR = 'ch_PP-OCRv4_rec_infer'
  21. # pp rec char dict path
  22. REC_CHAR_DICT = 'ppocr_keys_v1.txt'
  23. # pp rec copy rec directory
  24. PP_REC_DIRECTORY = '.paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer'
  25. # pp rec copy det directory
  26. PP_DET_DIRECTORY = '.paddleocr/whl/det/ch/ch_PP-OCRv4_det_infer'
  27. class MODEL_NAME:
  28. # pp table structure algorithm
  29. TABLE_MASTER = 'tablemaster'
  30. # struct eqtable
  31. STRUCT_EQTABLE = 'struct_eqtable'
  32. DocLayout_YOLO = 'doclayout_yolo'
  33. LAYOUTLMv3 = 'layoutlmv3'
  34. YOLO_V8_MFD = 'yolo_v8_mfd'
  35. UniMerNet_v2_Small = 'unimernet_small'
  36. RAPID_TABLE = 'rapid_table'
  37. YOLO_V11_LangDetect = 'yolo_v11n_langdetect'
  38. PARSE_TYPE_TXT = 'txt'
  39. PARSE_TYPE_OCR = 'ocr'