PP-StructureV3.yaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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. use_chart_recognition: True
  8. use_region_detection: True
  9. pretty_markdown: True
  10. SubModules:
  11. LayoutDetection:
  12. module_name: layout_detection
  13. model_name: PP-DocLayout-L
  14. model_dir: null
  15. threshold:
  16. 0: 0.3 # paragraph_title
  17. 1: 0.5 # image
  18. 2: 0.5 # text
  19. 3: 0.5 # number
  20. 4: 0.5 # abstract
  21. 5: 0.5 # content
  22. 6: 0.5 # figure_title
  23. 7: 0.3 # formula
  24. 8: 0.5 # table
  25. 9: 0.5 # table_title
  26. 10: 0.5 # reference
  27. 11: 0.5 # doc_title
  28. 12: 0.5 # footnote
  29. 13: 0.5 # header
  30. 14: 0.5 # algorithm
  31. 15: 0.5 # footer
  32. 16: 0.3 # seal
  33. 17: 0.5 # chart_title
  34. 18: 0.5 # chart
  35. 19: 0.5 # formula_number
  36. 20: 0.5 # header_image
  37. 21: 0.5 # footer_image
  38. 22: 0.5 # aside_text
  39. layout_nms: True
  40. layout_unclip_ratio:
  41. 0: [1.0, 1.0] # paragraph_title
  42. 1: [1.0, 1.0] # image
  43. 2: [1.0, 1.0] # text
  44. 3: [1.0, 1.0] # number
  45. 4: [1.0, 1.0] # abstract
  46. 5: [1.0, 1.0] # content
  47. 6: [1.0, 1.0] # figure_title
  48. 7: [1.0, 1.0] # formula
  49. 8: [1.0, 1.0] # table
  50. 9: [1.0, 1.0] # table_title
  51. 10: [1.0, 1.0] # reference
  52. 11: [1.0, 1.0] # doc_title
  53. 12: [1.0, 1.0] # footnote
  54. 13: [1.0, 1.0] # header
  55. 14: [1.0, 1.0] # algorithm
  56. 15: [1.0, 1.0] # footer
  57. 16: [1.0, 1.0] # seal
  58. 17: [1.0, 1.0] # chart_title
  59. 18: [1.0, 1.0] # chart
  60. 19: [1.0, 1.0] # formula_number
  61. 20: [1.0, 1.0] # header_image
  62. 21: [1.0, 1.0] # footer_image
  63. 22: [1.0, 1.0] # aside_text
  64. layout_merge_bboxes_mode:
  65. 0: "large" # paragraph_title
  66. 1: "large" # image
  67. 2: "union" # text
  68. 3: "union" # number
  69. 4: "union" # abstract
  70. 5: "union" # content
  71. 6: "union" # figure_title
  72. 7: "large" # formula
  73. 8: "union" # table
  74. 9: "union" # table_title
  75. 10: "union" # reference
  76. 11: "union" # doc_title
  77. 12: "union" # footnote
  78. 13: "union" # header
  79. 14: "union" # algorithm
  80. 15: "union" # footer
  81. 16: "union" # seal
  82. 17: "union" # chart_title
  83. 18: "large" # chart
  84. 19: "union" # formula_number
  85. 20: "union" # header_image
  86. 21: "union" # footer_image
  87. 22: "union" # aside_text
  88. ChartRecognition:
  89. module_name: chart_recognition
  90. model_name: PP-Chart2Table
  91. model_dir: null
  92. batch_size: 1
  93. SubPipelines:
  94. DocPreprocessor:
  95. pipeline_name: doc_preprocessor
  96. use_doc_orientation_classify: True
  97. use_doc_unwarping: True
  98. SubModules:
  99. DocOrientationClassify:
  100. module_name: doc_text_orientation
  101. model_name: PP-LCNet_x1_0_doc_ori
  102. model_dir: null
  103. DocUnwarping:
  104. module_name: image_unwarping
  105. model_name: UVDoc
  106. model_dir: null
  107. GeneralOCR:
  108. pipeline_name: OCR
  109. text_type: general
  110. use_doc_preprocessor: False
  111. use_textline_orientation: True
  112. SubModules:
  113. TextDetection:
  114. module_name: text_detection
  115. model_name: PP-OCRv4_server_det
  116. model_dir: null
  117. limit_side_len: 736
  118. limit_type: min
  119. thresh: 0.3
  120. box_thresh: 0.6
  121. unclip_ratio: 1.5
  122. TextLineOrientation:
  123. module_name: textline_orientation
  124. model_name: PP-LCNet_x0_25_textline_ori
  125. model_dir: null
  126. batch_size: 1
  127. TextRecognition:
  128. module_name: text_recognition
  129. model_name: PP-OCRv4_server_rec_doc
  130. model_dir: null
  131. batch_size: 6
  132. score_thresh: 0.0
  133. TableRecognition:
  134. pipeline_name: table_recognition_v2
  135. use_layout_detection: False
  136. use_doc_preprocessor: False
  137. use_ocr_model: False
  138. SubModules:
  139. TableClassification:
  140. module_name: table_classification
  141. model_name: PP-LCNet_x1_0_table_cls
  142. model_dir: null
  143. WiredTableStructureRecognition:
  144. module_name: table_structure_recognition
  145. model_name: SLANeXt_wired
  146. model_dir: null
  147. WirelessTableStructureRecognition:
  148. module_name: table_structure_recognition
  149. model_name: SLANet_plus
  150. model_dir: null
  151. WiredTableCellsDetection:
  152. module_name: table_cells_detection
  153. model_name: RT-DETR-L_wired_table_cell_det
  154. model_dir: null
  155. WirelessTableCellsDetection:
  156. module_name: table_cells_detection
  157. model_name: RT-DETR-L_wireless_table_cell_det
  158. model_dir: null
  159. SubPipelines:
  160. GeneralOCR:
  161. pipeline_name: OCR
  162. text_type: general
  163. use_doc_preprocessor: False
  164. use_textline_orientation: True
  165. SubModules:
  166. TextDetection:
  167. module_name: text_detection
  168. model_name: PP-OCRv4_server_det
  169. model_dir: null
  170. limit_side_len: 736
  171. limit_type: min
  172. thresh: 0.3
  173. box_thresh: 0.4
  174. unclip_ratio: 2.0
  175. TextLineOrientation:
  176. module_name: textline_orientation
  177. model_name: PP-LCNet_x0_25_textline_ori
  178. model_dir: null
  179. batch_size: 1
  180. TextRecognition:
  181. module_name: text_recognition
  182. model_name: PP-OCRv4_server_rec_doc
  183. model_dir: null
  184. batch_size: 6
  185. score_thresh: 0.0
  186. SealRecognition:
  187. pipeline_name: seal_recognition
  188. use_layout_detection: False
  189. use_doc_preprocessor: False
  190. SubPipelines:
  191. SealOCR:
  192. pipeline_name: OCR
  193. text_type: seal
  194. use_doc_preprocessor: False
  195. use_textline_orientation: False
  196. SubModules:
  197. TextDetection:
  198. module_name: seal_text_detection
  199. model_name: PP-OCRv4_server_seal_det
  200. model_dir: null
  201. limit_side_len: 736
  202. limit_type: min
  203. thresh: 0.2
  204. box_thresh: 0.6
  205. unclip_ratio: 0.5
  206. TextRecognition:
  207. module_name: text_recognition
  208. model_name: PP-OCRv4_server_rec
  209. model_dir: null
  210. batch_size: 1
  211. score_thresh: 0
  212. FormulaRecognition:
  213. pipeline_name: formula_recognition
  214. use_layout_detection: False
  215. use_doc_preprocessor: False
  216. SubModules:
  217. FormulaRecognition:
  218. module_name: formula_recognition
  219. model_name: PP-FormulaNet-L
  220. model_dir: null
  221. batch_size: 5