PP-StructureV3.yaml 6.3 KB

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