PP-StructureV3.yaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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: False
  9. SubModules:
  10. LayoutDetection:
  11. module_name: layout_detection
  12. model_name: PP-DocLayout-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. SubPipelines:
  94. DocPreprocessor:
  95. pipeline_name: doc_preprocessor
  96. batch_size: 8
  97. use_doc_orientation_classify: True
  98. use_doc_unwarping: True
  99. SubModules:
  100. DocOrientationClassify:
  101. module_name: doc_text_orientation
  102. model_name: PP-LCNet_x1_0_doc_ori
  103. model_dir: null
  104. batch_size: 8
  105. DocUnwarping:
  106. module_name: image_unwarping
  107. model_name: UVDoc
  108. model_dir: null
  109. GeneralOCR:
  110. pipeline_name: OCR
  111. batch_size: 8
  112. text_type: general
  113. use_doc_preprocessor: False
  114. use_textline_orientation: True
  115. SubModules:
  116. TextDetection:
  117. module_name: text_detection
  118. model_name: PP-OCRv4_server_det
  119. model_dir: null
  120. limit_side_len: 736
  121. limit_type: min
  122. max_side_limit: 4000
  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. use_layout_detection: False
  140. use_doc_preprocessor: False
  141. use_ocr_model: False
  142. SubModules:
  143. TableClassification:
  144. module_name: table_classification
  145. model_name: PP-LCNet_x1_0_table_cls
  146. model_dir: null
  147. WiredTableStructureRecognition:
  148. module_name: table_structure_recognition
  149. model_name: SLANeXt_wired
  150. model_dir: null
  151. WirelessTableStructureRecognition:
  152. module_name: table_structure_recognition
  153. model_name: SLANet_plus
  154. model_dir: null
  155. WiredTableCellsDetection:
  156. module_name: table_cells_detection
  157. model_name: RT-DETR-L_wired_table_cell_det
  158. model_dir: null
  159. WirelessTableCellsDetection:
  160. module_name: table_cells_detection
  161. model_name: RT-DETR-L_wireless_table_cell_det
  162. model_dir: null
  163. SubPipelines:
  164. GeneralOCR:
  165. pipeline_name: OCR
  166. text_type: general
  167. use_doc_preprocessor: False
  168. use_textline_orientation: True
  169. SubModules:
  170. TextDetection:
  171. module_name: text_detection
  172. model_name: PP-OCRv4_server_det
  173. model_dir: null
  174. limit_side_len: 736
  175. limit_type: min
  176. max_side_limit: 4000
  177. thresh: 0.3
  178. box_thresh: 0.4
  179. unclip_ratio: 1.5
  180. TextLineOrientation:
  181. module_name: textline_orientation
  182. model_name: PP-LCNet_x0_25_textline_ori
  183. model_dir: null
  184. batch_size: 8
  185. TextRecognition:
  186. module_name: text_recognition
  187. model_name: PP-OCRv4_server_rec_doc
  188. model_dir: null
  189. batch_size: 8
  190. score_thresh: 0.0
  191. SealRecognition:
  192. pipeline_name: seal_recognition
  193. batch_size: 8
  194. use_layout_detection: False
  195. use_doc_preprocessor: False
  196. SubPipelines:
  197. SealOCR:
  198. pipeline_name: OCR
  199. batch_size: 8
  200. text_type: seal
  201. use_doc_preprocessor: False
  202. use_textline_orientation: False
  203. SubModules:
  204. TextDetection:
  205. module_name: seal_text_detection
  206. model_name: PP-OCRv4_server_seal_det
  207. model_dir: null
  208. limit_side_len: 736
  209. limit_type: min
  210. max_side_limit: 4000
  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