PP-StructureV3.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. 7: 0.3 # formula
  15. 16: 0.3 # seal
  16. layout_nms: True
  17. layout_unclip_ratio: 1.0
  18. layout_merge_bboxes_mode:
  19. 1: "large" # image
  20. 18: "large" # chart
  21. 7: "large" # formula
  22. SubPipelines:
  23. DocPreprocessor:
  24. pipeline_name: doc_preprocessor
  25. use_doc_orientation_classify: True
  26. use_doc_unwarping: True
  27. SubModules:
  28. DocOrientationClassify:
  29. module_name: doc_text_orientation
  30. model_name: PP-LCNet_x1_0_doc_ori
  31. model_dir: null
  32. DocUnwarping:
  33. module_name: image_unwarping
  34. model_name: UVDoc
  35. model_dir: null
  36. GeneralOCR:
  37. pipeline_name: OCR
  38. text_type: general
  39. use_doc_preprocessor: False
  40. use_textline_orientation: True
  41. SubModules:
  42. TextDetection:
  43. module_name: text_detection
  44. model_name: PP-OCRv4_server_det
  45. model_dir: null
  46. limit_side_len: 960
  47. limit_type: max
  48. thresh: 0.3
  49. box_thresh: 0.6
  50. unclip_ratio: 2.0
  51. TextLineOrientation:
  52. module_name: textline_orientation
  53. model_name: PP-LCNet_x0_25_textline_ori
  54. model_dir: null
  55. batch_size: 1
  56. TextRecognition:
  57. module_name: text_recognition
  58. model_name: PP-OCRv4_server_rec_doc
  59. model_dir: null
  60. batch_size: 6
  61. score_thresh: 0.0
  62. TableRecognition:
  63. pipeline_name: table_recognition_v2
  64. use_layout_detection: False
  65. use_doc_preprocessor: False
  66. use_ocr_model: False
  67. SubModules:
  68. TableClassification:
  69. module_name: table_classification
  70. model_name: PP-LCNet_x1_0_table_cls
  71. model_dir: null
  72. WiredTableStructureRecognition:
  73. module_name: table_structure_recognition
  74. model_name: SLANeXt_wired
  75. model_dir: null
  76. WirelessTableStructureRecognition:
  77. module_name: table_structure_recognition
  78. model_name: SLANeXt_wireless
  79. model_dir: null
  80. WiredTableCellsDetection:
  81. module_name: table_cells_detection
  82. model_name: RT-DETR-L_wired_table_cell_det
  83. model_dir: null
  84. WirelessTableCellsDetection:
  85. module_name: table_cells_detection
  86. model_name: RT-DETR-L_wireless_table_cell_det
  87. model_dir: null
  88. SealRecognition:
  89. pipeline_name: seal_recognition
  90. use_layout_detection: False
  91. use_doc_preprocessor: False
  92. SubPipelines:
  93. SealOCR:
  94. pipeline_name: OCR
  95. text_type: seal
  96. use_doc_preprocessor: False
  97. use_textline_orientation: False
  98. SubModules:
  99. TextDetection:
  100. module_name: seal_text_detection
  101. model_name: PP-OCRv4_server_seal_det
  102. model_dir: null
  103. limit_side_len: 736
  104. limit_type: min
  105. thresh: 0.2
  106. box_thresh: 0.6
  107. unclip_ratio: 0.5
  108. TextRecognition:
  109. module_name: text_recognition
  110. model_name: PP-OCRv4_server_rec
  111. model_dir: null
  112. batch_size: 1
  113. score_thresh: 0
  114. FormulaRecognition:
  115. pipeline_name: formula_recognition
  116. use_layout_detection: False
  117. use_doc_preprocessor: False
  118. SubModules:
  119. FormulaRecognition:
  120. module_name: formula_recognition
  121. model_name: PP-FormulaNet-L
  122. model_dir: null
  123. batch_size: 5