PP-StructureV3.yaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. SubPipelines:
  86. DocPreprocessor:
  87. pipeline_name: doc_preprocessor
  88. use_doc_orientation_classify: True
  89. use_doc_unwarping: True
  90. SubModules:
  91. DocOrientationClassify:
  92. module_name: doc_text_orientation
  93. model_name: PP-LCNet_x1_0_doc_ori
  94. model_dir: null
  95. DocUnwarping:
  96. module_name: image_unwarping
  97. model_name: UVDoc
  98. model_dir: null
  99. GeneralOCR:
  100. pipeline_name: OCR
  101. text_type: general
  102. use_doc_preprocessor: False
  103. use_textline_orientation: True
  104. SubModules:
  105. TextDetection:
  106. module_name: text_detection
  107. model_name: PP-OCRv4_server_det
  108. model_dir: null
  109. limit_side_len: 736
  110. limit_type: min
  111. thresh: 0.3
  112. box_thresh: 0.4
  113. unclip_ratio: 2.0
  114. TextLineOrientation:
  115. module_name: textline_orientation
  116. model_name: PP-LCNet_x0_25_textline_ori
  117. model_dir: null
  118. batch_size: 1
  119. TextRecognition:
  120. module_name: text_recognition
  121. model_name: PP-OCRv4_server_rec_doc
  122. model_dir: null
  123. batch_size: 6
  124. score_thresh: 0.0
  125. TableRecognition:
  126. pipeline_name: table_recognition_v2
  127. use_layout_detection: False
  128. use_doc_preprocessor: False
  129. use_ocr_model: False
  130. SubModules:
  131. TableClassification:
  132. module_name: table_classification
  133. model_name: PP-LCNet_x1_0_table_cls
  134. model_dir: null
  135. WiredTableStructureRecognition:
  136. module_name: table_structure_recognition
  137. model_name: SLANeXt_wired
  138. model_dir: null
  139. WirelessTableStructureRecognition:
  140. module_name: table_structure_recognition
  141. model_name: SLANet_plus
  142. model_dir: null
  143. WiredTableCellsDetection:
  144. module_name: table_cells_detection
  145. model_name: RT-DETR-L_wired_table_cell_det
  146. model_dir: null
  147. WirelessTableCellsDetection:
  148. module_name: table_cells_detection
  149. model_name: RT-DETR-L_wireless_table_cell_det
  150. model_dir: null
  151. SubPipelines:
  152. GeneralOCR:
  153. pipeline_name: OCR
  154. text_type: general
  155. use_doc_preprocessor: False
  156. use_textline_orientation: True
  157. SubModules:
  158. TextDetection:
  159. module_name: text_detection
  160. model_name: PP-OCRv4_server_det
  161. model_dir: null
  162. limit_side_len: 736
  163. limit_type: min
  164. thresh: 0.3
  165. box_thresh: 0.4
  166. unclip_ratio: 2.0
  167. TextLineOrientation:
  168. module_name: textline_orientation
  169. model_name: PP-LCNet_x0_25_textline_ori
  170. model_dir: null
  171. batch_size: 1
  172. TextRecognition:
  173. module_name: text_recognition
  174. model_name: PP-OCRv4_server_rec_doc
  175. model_dir: null
  176. batch_size: 6
  177. score_thresh: 0.0
  178. SealRecognition:
  179. pipeline_name: seal_recognition
  180. use_layout_detection: False
  181. use_doc_preprocessor: False
  182. SubPipelines:
  183. SealOCR:
  184. pipeline_name: OCR
  185. text_type: seal
  186. use_doc_preprocessor: False
  187. use_textline_orientation: False
  188. SubModules:
  189. TextDetection:
  190. module_name: seal_text_detection
  191. model_name: PP-OCRv4_server_seal_det
  192. model_dir: null
  193. limit_side_len: 736
  194. limit_type: min
  195. thresh: 0.2
  196. box_thresh: 0.6
  197. unclip_ratio: 0.5
  198. TextRecognition:
  199. module_name: text_recognition
  200. model_name: PP-OCRv4_server_rec
  201. model_dir: null
  202. batch_size: 1
  203. score_thresh: 0
  204. FormulaRecognition:
  205. pipeline_name: formula_recognition
  206. use_layout_detection: False
  207. use_doc_preprocessor: False
  208. SubModules:
  209. FormulaRecognition:
  210. module_name: formula_recognition
  211. model_name: PP-FormulaNet-L
  212. model_dir: null
  213. batch_size: 5