PP-StructureV3.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. pipeline_name: PP-StructureV3
  2. use_doc_preprocessor: True
  3. use_general_ocr: True
  4. use_seal_recognition: True
  5. use_table_recognition: True
  6. use_formula_recognition: True
  7. SubModules:
  8. LayoutDetection:
  9. module_name: layout_detection
  10. model_name: PP-DocLayout-L
  11. model_dir: null
  12. threshold:
  13. 0: 0.3 # paragraph_title
  14. 7: 0.3 # formula
  15. 16: 0.3 # seal
  16. layout_nms: True
  17. layout_unclip_ratio: 1.0
  18. layout_merge_bboxes_mode:
  19. 1: "large" # image
  20. 18: "large" # chart
  21. SubPipelines:
  22. DocPreprocessor:
  23. pipeline_name: doc_preprocessor
  24. use_doc_orientation_classify: True
  25. use_doc_unwarping: True
  26. SubModules:
  27. DocOrientationClassify:
  28. module_name: doc_text_orientation
  29. model_name: PP-LCNet_x1_0_doc_ori
  30. model_dir: null
  31. DocUnwarping:
  32. module_name: image_unwarping
  33. model_name: UVDoc
  34. model_dir: null
  35. GeneralOCR:
  36. pipeline_name: OCR
  37. text_type: general
  38. use_doc_preprocessor: False
  39. use_textline_orientation: True
  40. SubModules:
  41. TextDetection:
  42. module_name: text_detection
  43. model_name: PP-OCRv4_mobile_det
  44. model_dir: null
  45. limit_side_len: 960
  46. limit_type: max
  47. thresh: 0.3
  48. box_thresh: 0.6
  49. unclip_ratio: 2.0
  50. TextLineOrientation:
  51. module_name: textline_orientation
  52. model_name: PP-LCNet_x0_25_textline_ori
  53. model_dir: null
  54. batch_size: 1
  55. TextRecognition:
  56. module_name: text_recognition
  57. model_name: PP-OCRv4_server_rec_doc
  58. model_dir: null
  59. batch_size: 6
  60. score_thresh: 0.0
  61. TableRecognition:
  62. pipeline_name: table_recognition_v2
  63. use_layout_detection: False
  64. use_doc_preprocessor: False
  65. use_ocr_model: False
  66. SubModules:
  67. TableClassification:
  68. module_name: table_classification
  69. model_name: PP-LCNet_x1_0_table_cls
  70. model_dir: null
  71. WiredTableStructureRecognition:
  72. module_name: table_structure_recognition
  73. model_name: SLANeXt_wired
  74. model_dir: null
  75. WirelessTableStructureRecognition:
  76. module_name: table_structure_recognition
  77. model_name: SLANeXt_wireless
  78. model_dir: null
  79. WiredTableCellsDetection:
  80. module_name: table_cells_detection
  81. model_name: RT-DETR-L_wired_table_cell_det
  82. model_dir: null
  83. WirelessTableCellsDetection:
  84. module_name: table_cells_detection
  85. model_name: RT-DETR-L_wireless_table_cell_det
  86. model_dir: null
  87. SealRecognition:
  88. pipeline_name: seal_recognition
  89. use_layout_detection: False
  90. use_doc_preprocessor: False
  91. SubPipelines:
  92. SealOCR:
  93. pipeline_name: OCR
  94. text_type: seal
  95. use_doc_preprocessor: False
  96. use_textline_orientation: False
  97. SubModules:
  98. TextDetection:
  99. module_name: seal_text_detection
  100. model_name: PP-OCRv4_server_seal_det
  101. model_dir: null
  102. limit_side_len: 736
  103. limit_type: min
  104. thresh: 0.2
  105. box_thresh: 0.6
  106. unclip_ratio: 0.5
  107. TextRecognition:
  108. module_name: text_recognition
  109. model_name: PP-OCRv4_server_rec
  110. model_dir: null
  111. batch_size: 1
  112. score_thresh: 0
  113. FormulaRecognition:
  114. pipeline_name: formula_recognition
  115. use_layout_detection: False
  116. use_doc_preprocessor: False
  117. SubModules:
  118. FormulaRecognition:
  119. module_name: formula_recognition
  120. model_name: PP-FormulaNet-L
  121. model_dir: null
  122. batch_size: 5