bank_statement_paddle_vl.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: "paddle"
  28. backend: "http-client"
  29. model_name: "PaddleOCR-VL-0.9B"
  30. server_url: "http://10.192.72.11:8110"
  31. max_image_size: 4096 # 🔧 添加:最大图片尺寸
  32. resize_mode: 'max' # 🔧 添加:缩放模式 ('max' 保持宽高比, 'fixed' 固定尺寸)
  33. device: "cpu"
  34. batch_size: 1
  35. model_params:
  36. max_concurrency: 10
  37. http_timeout: 600
  38. # 场景特定配置
  39. table_recognition:
  40. return_cells_coordinate: true
  41. bank_statement_mode: true
  42. ocr_recognition:
  43. module: "mineru"
  44. language: "ch"
  45. det_threshold: 0.3
  46. unclip_ratio: 1.8
  47. batch_size: 8
  48. device: "cpu"
  49. output:
  50. save_json: true
  51. save_markdown: true
  52. save_html: true
  53. save_layout_image: true
  54. save_ocr_image: true
  55. draw_type_label: true
  56. draw_bbox_number: true
  57. # 场景特定配置
  58. scene_config:
  59. bank_statement:
  60. table_structure: "single_column_list"
  61. merged_cells: false
  62. expected_columns: ["日期", "摘要", "收入", "支出", "余额"]
  63. amount_validation: true
  64. date_validation: true
  65. processing_rules:
  66. # 表格处理规则
  67. table_rules:
  68. - detect_table_type: ["wired", "wireless"]
  69. - extract_header_automatically: true
  70. - validate_amount_format: true
  71. - merge_continuation_rows: true
  72. # OCR后处理规则
  73. ocr_rules:
  74. - filter_low_confidence: 0.7
  75. - merge_adjacent_text: true
  76. - number_format_normalization: true