瀏覽代碼

feat: 新增OCR管道配置文件,定义文档预处理和文本检测模块

zhch158_admin 1 月之前
父節點
當前提交
8617ef4058
共有 1 個文件被更改,包括 45 次插入0 次删除
  1. 45 0
      zhch/OCR-zhch.yaml

+ 45 - 0
zhch/OCR-zhch.yaml

@@ -0,0 +1,45 @@
+
+pipeline_name: OCR
+
+text_type: general
+
+use_doc_preprocessor: False
+use_textline_orientation: False
+
+SubPipelines:
+  DocPreprocessor:
+    pipeline_name: doc_preprocessor
+    use_doc_orientation_classify: True
+    use_doc_unwarping: True
+    SubModules:
+      DocOrientationClassify:
+        module_name: doc_text_orientation
+        model_name: PP-LCNet_x1_0_doc_ori
+        model_dir: null
+      DocUnwarping:
+        module_name: image_unwarping
+        model_name: UVDoc
+        model_dir: null
+
+SubModules:
+  TextDetection:
+    module_name: text_detection
+    model_name: PP-OCRv5_server_det
+    model_dir: null
+    limit_side_len: 1200
+    limit_type: max
+    max_side_limit: 4000
+    thresh: 0.3
+    box_thresh: 0.6
+    unclip_ratio: 1.5
+  TextLineOrientation:
+    module_name: textline_orientation
+    model_name: PP-LCNet_x1_0_textline_ori 
+    model_dir: null
+    batch_size: 6    
+  TextRecognition:
+    module_name: text_recognition
+    model_name: PP-OCRv5_server_rec 
+    model_dir: null
+    batch_size: 6
+    score_thresh: 0.0