PP-StructureV3.yaml 6.4 KB

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