PP-StructureV3.yaml 6.6 KB

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