瀏覽代碼

update doc (#2981)

changdazhou 9 月之前
父節點
當前提交
799a6f77fd

+ 2 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.md

@@ -283,6 +283,8 @@ for res in output:
 
     - `input_path`: `(str)` 待预测图像的输入路径
 
+    - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
+
     - `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
 
         - `use_doc_orientation_classify`: `(bool)` 控制是否启用文档方向分类模块

+ 2 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/formula_recognition.md

@@ -602,6 +602,8 @@ for res in output:
 
     - `input_path`: `(str)` 待预测图像的输入路径
 
+    - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
+
     - `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
 
         - `use_doc_preprocessor`: `(bool)` 控制是否启用文档预处理子产线

File diff suppressed because it is too large
+ 367 - 73
docs/pipeline_usage/tutorials/ocr_pipelines/layout_parsing.md


+ 3 - 1
docs/pipeline_usage/tutorials/ocr_pipelines/seal_recognition.md

@@ -1109,6 +1109,8 @@ for res in output:
 
     - `input_path`: `(str)` 待预测图像的输入路径
 
+    - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
+
     - `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
 
         - `use_doc_preprocessor`: `(bool)` 控制是否启用文档预处理子产线
@@ -1132,7 +1134,7 @@ for res in output:
             - `use_doc_orientation_classify`: `(bool)` 控制是否启用文档方向分类
             - `use_doc_unwarping`: `(bool)` 控制是否启用文档扭曲矫正
         - `angle`: `(int)` 文档方向分类的预测结果。启用时取值为[0,1,2,3],分别对应[0°,90°,180°,270°];未启用时为-1
-       
+
     - `dt_polys`: `(List[numpy.ndarray])` 印章文本检测的多边形框列表。每个检测框由多个顶点坐标构成的numpy数组表示,数组shape为(n, 2)
 
     - `dt_scores`: `(List[float])` 文本检测框的置信度列表

+ 13 - 11
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition.md

@@ -460,11 +460,11 @@ output = pipeline.predict(
 )
 
 for res in output:
-    res.print() 
-    res.save_to_img("./output/") 
-    res.save_to_xlsx("./output/") 
-    res.save_to_html("./output/") 
-    res.save_to_json("./output/") 
+    res.print()
+    res.save_to_img("./output/")
+    res.save_to_xlsx("./output/")
+    res.save_to_html("./output/")
+    res.save_to_json("./output/")
 ```
 
 在上述 Python 脚本中,执行了如下几个步骤:
@@ -724,6 +724,8 @@ for res in output:
 
     - `input_path`: `(str)` 待预测图像的输入路径
 
+    - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
+
     - `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
 
         - `use_doc_preprocessor`: `(bool)` 控制是否启用文档预处理子产线
@@ -804,11 +806,11 @@ output = pipeline.predict(
 )
 
 for res in output:
-    res.print() 
-    res.save_to_img("./output/") 
-    res.save_to_xlsx("./output/") 
-    res.save_to_html("./output/") 
-    res.save_to_json("./output/") 
+    res.print()
+    res.save_to_img("./output/")
+    res.save_to_xlsx("./output/")
+    res.save_to_html("./output/")
+    res.save_to_json("./output/")
 
 ```
 
@@ -1138,7 +1140,7 @@ SubPipelines:
         thresh: 0.3
         box_thresh: 0.6
         unclip_ratio: 2.0
-        
+
       TextRecognition:
         module_name: text_recognition
         model_name: PP-OCRv4_server_rec

+ 16 - 14
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.md

@@ -502,11 +502,11 @@ output = pipeline.predict(
 )
 
 for res in output:
-    res.print() 
-    res.save_to_img("./output/") 
-    res.save_to_xlsx("./output/") 
-    res.save_to_html("./output/") 
-    res.save_to_json("./output/") 
+    res.print()
+    res.save_to_img("./output/")
+    res.save_to_xlsx("./output/")
+    res.save_to_html("./output/")
+    res.save_to_json("./output/")
 ```
 
 在上述 Python 脚本中,执行了如下几个步骤:
@@ -766,6 +766,8 @@ for res in output:
 
     - `input_path`: `(str)` 待预测图像的输入路径
 
+    - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
+
     - `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
 
         - `use_doc_preprocessor`: `(bool)` 控制是否启用文档预处理子产线
@@ -846,11 +848,11 @@ output = pipeline.predict(
 )
 
 for res in output:
-    res.print() 
-    res.save_to_img("./output/") 
-    res.save_to_xlsx("./output/") 
-    res.save_to_html("./output/") 
-    res.save_to_json("./output/") 
+    res.print()
+    res.save_to_img("./output/")
+    res.save_to_xlsx("./output/")
+    res.save_to_html("./output/")
+    res.save_to_json("./output/")
 
 ```
 
@@ -1163,17 +1165,17 @@ SubModules:
     module_name: table_structure_recognition
     model_name: SLANeXt_wired
     model_dir: null # 替换为微调后的有线表格结构识别模型权重路径
-  
+
   WirelessTableStructureRecognition:
     module_name: table_structure_recognition
     model_name: SLANeXt_wireless
     model_dir: null # 替换为微调后的无线表格结构识别模型权重路径
-  
+
   WiredTableCellsDetection:
     module_name: table_cells_detection
     model_name: RT-DETR-L_wired_table_cell_det
     model_dir: null # 替换为微调后的有线表格单元格检测模型权重路径
-  
+
   WirelessTableCellsDetection:
     module_name: table_cells_detection
     model_name: RT-DETR-L_wireless_table_cell_det
@@ -1210,7 +1212,7 @@ SubPipelines:
         thresh: 0.3
         box_thresh: 0.6
         unclip_ratio: 2.0
-        
+
       TextRecognition:
         module_name: text_recognition
         model_name: PP-OCRv4_server_rec

Some files were not shown because too many files changed in this diff