bank_statement_mineru_vl.yaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # 银行交易流水场景配置(增强版)
  2. scene_name: "bank_statement"
  3. description: "银行交易流水、对账单等场景"
  4. input:
  5. supported_formats: [".pdf", ".png", ".jpg"]
  6. dpi: 200
  7. preprocessor:
  8. module: "mineru"
  9. orientation_classifier:
  10. enabled: true
  11. model_name: "paddle_orientation_classification"
  12. model_dir: null # 使用默认路径
  13. unwarping:
  14. enabled: false
  15. layout_detection:
  16. # module: "paddle"
  17. # model_name: "RT-DETR-H_layout_17cls"
  18. # model_dir: /Users/zhch158/workspace/repository.git/PaddleX/zhch/unified_pytorch_models/Layout/RT-DETR-H_layout_17cls.onnx # 使用默认路径,或指定: "./Layout/RT-DETR-H_layout_17cls.onnx"
  19. module: "mineru"
  20. model_name: "layout"
  21. model_dir: null # 使用默认路径
  22. device: "cpu"
  23. # batch_size: 4
  24. # conf: 0.1
  25. # iou: 0.45
  26. vl_recognition:
  27. module: "mineru"
  28. backend: "http-client"
  29. server_url: "http://10.192.72.11:8121"
  30. max_image_size: 4096 # 🔧 添加:最大图片尺寸
  31. resize_mode: 'max' # 🔧 添加:缩放模式 ('max' 保持宽高比, 'fixed' 固定尺寸)
  32. device: "cpu"
  33. batch_size: 1
  34. model_params:
  35. max_concurrency: 10
  36. http_timeout: 600
  37. # 场景特定配置
  38. table_recognition:
  39. return_cells_coordinate: true
  40. bank_statement_mode: true
  41. ocr_recognition:
  42. module: "mineru"
  43. language: "ch"
  44. det_threshold: 0.3
  45. unclip_ratio: 1.8
  46. batch_size: 8
  47. device: "cpu"
  48. output:
  49. save_json: true
  50. save_markdown: true
  51. save_html: true
  52. save_layout_image: true
  53. save_ocr_image: true
  54. draw_type_label: true
  55. draw_bbox_number: true
  56. # 场景特定配置
  57. scene_config:
  58. bank_statement:
  59. table_structure: "single_column_list"
  60. merged_cells: false
  61. expected_columns: ["日期", "摘要", "收入", "支出", "余额"]
  62. amount_validation: true
  63. date_validation: true
  64. processing_rules:
  65. # 表格处理规则
  66. table_rules:
  67. - detect_table_type: ["wired", "wireless"]
  68. - extract_header_automatically: true
  69. - validate_amount_format: true
  70. - merge_continuation_rows: true
  71. # OCR后处理规则
  72. ocr_rules:
  73. - filter_low_confidence: 0.7
  74. - merge_adjacent_text: true
  75. - number_format_normalization: true