PP-StructureV3.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. pipeline_name: PP-StructureV3
  2. batch_size: 8
  3. use_doc_preprocessor: True
  4. use_seal_recognition: True
  5. use_table_recognition: True
  6. use_formula_recognition: True
  7. use_chart_recognition: False
  8. use_region_detection: True
  9. SubModules:
  10. LayoutDetection:
  11. module_name: layout_detection
  12. model_name: PP-DocLayout_plus-L
  13. model_dir: null
  14. batch_size: 8
  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. RegionDetection:
  94. module_name: layout_detection
  95. model_name: PP-DocBlockLayout
  96. model_dir: null
  97. layout_nms: True
  98. layout_merge_bboxes_mode: "small"
  99. SubPipelines:
  100. DocPreprocessor:
  101. pipeline_name: doc_preprocessor
  102. batch_size: 8
  103. use_doc_orientation_classify: True
  104. use_doc_unwarping: True
  105. SubModules:
  106. DocOrientationClassify:
  107. module_name: doc_text_orientation
  108. model_name: PP-LCNet_x1_0_doc_ori
  109. model_dir: null
  110. batch_size: 8
  111. DocUnwarping:
  112. module_name: image_unwarping
  113. model_name: UVDoc
  114. model_dir: null
  115. GeneralOCR:
  116. pipeline_name: OCR
  117. batch_size: 8
  118. text_type: general
  119. use_doc_preprocessor: False
  120. use_textline_orientation: True
  121. SubModules:
  122. TextDetection:
  123. module_name: text_detection
  124. model_name: PP-OCRv5_server_det
  125. model_dir: null
  126. limit_side_len: 736
  127. limit_type: min
  128. max_side_limit: 4000
  129. thresh: 0.3
  130. box_thresh: 0.6
  131. unclip_ratio: 1.5
  132. TextLineOrientation:
  133. module_name: textline_orientation
  134. model_name: PP-LCNet_x0_25_textline_ori
  135. model_dir: null
  136. batch_size: 8
  137. TextRecognition:
  138. module_name: text_recognition
  139. model_name: PP-OCRv5_server_rec
  140. model_dir: null
  141. batch_size: 8
  142. score_thresh: 0.0
  143. TableRecognition:
  144. pipeline_name: table_recognition_v2
  145. use_layout_detection: False
  146. use_doc_preprocessor: False
  147. use_ocr_model: False
  148. SubModules:
  149. TableClassification:
  150. module_name: table_classification
  151. model_name: PP-LCNet_x1_0_table_cls
  152. model_dir: null
  153. WiredTableStructureRecognition:
  154. module_name: table_structure_recognition
  155. model_name: SLANeXt_wired
  156. model_dir: null
  157. WirelessTableStructureRecognition:
  158. module_name: table_structure_recognition
  159. model_name: SLANet_plus
  160. model_dir: null
  161. WiredTableCellsDetection:
  162. module_name: table_cells_detection
  163. model_name: RT-DETR-L_wired_table_cell_det
  164. model_dir: null
  165. WirelessTableCellsDetection:
  166. module_name: table_cells_detection
  167. model_name: RT-DETR-L_wireless_table_cell_det
  168. model_dir: null
  169. TableOrientationClassify:
  170. module_name: doc_text_orientation
  171. model_name: PP-LCNet_x1_0_doc_ori
  172. model_dir: null
  173. SubPipelines:
  174. GeneralOCR:
  175. pipeline_name: OCR
  176. text_type: general
  177. use_doc_preprocessor: False
  178. use_textline_orientation: True
  179. SubModules:
  180. TextDetection:
  181. module_name: text_detection
  182. model_name: PP-OCRv5_server_det
  183. model_dir: null
  184. limit_side_len: 736
  185. limit_type: min
  186. max_side_limit: 4000
  187. thresh: 0.3
  188. box_thresh: 0.4
  189. unclip_ratio: 1.5
  190. TextLineOrientation:
  191. module_name: textline_orientation
  192. model_name: PP-LCNet_x0_25_textline_ori
  193. model_dir: null
  194. batch_size: 8
  195. TextRecognition:
  196. module_name: text_recognition
  197. model_name: PP-OCRv5_server_rec
  198. model_dir: null
  199. batch_size: 8
  200. score_thresh: 0.0
  201. SealRecognition:
  202. pipeline_name: seal_recognition
  203. batch_size: 8
  204. use_layout_detection: False
  205. use_doc_preprocessor: False
  206. SubPipelines:
  207. SealOCR:
  208. pipeline_name: OCR
  209. batch_size: 8
  210. text_type: seal
  211. use_doc_preprocessor: False
  212. use_textline_orientation: False
  213. SubModules:
  214. TextDetection:
  215. module_name: seal_text_detection
  216. model_name: PP-OCRv4_server_seal_det
  217. model_dir: null
  218. limit_side_len: 736
  219. limit_type: min
  220. max_side_limit: 4000
  221. thresh: 0.2
  222. box_thresh: 0.6
  223. unclip_ratio: 0.5
  224. TextRecognition:
  225. module_name: text_recognition
  226. model_name: PP-OCRv5_server_rec
  227. model_dir: null
  228. batch_size: 8
  229. score_thresh: 0
  230. FormulaRecognition:
  231. pipeline_name: formula_recognition
  232. batch_size: 8
  233. use_layout_detection: False
  234. use_doc_preprocessor: False
  235. SubModules:
  236. FormulaRecognition:
  237. module_name: formula_recognition
  238. model_name: PP-FormulaNet_plus-L
  239. model_dir: null
  240. batch_size: 8