PP-StructureV3.yaml 5.6 KB

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