Constants.py 1.1 KB

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