zhangyubo0722 10 месяцев назад
Родитель
Сommit
73c1259d0e

+ 25 - 3
docs/module_usage/tutorials/cv_modules/image_classification.md

@@ -707,7 +707,7 @@ for res in output:
 
 相关方法、参数等说明如下:
 
-* `create_model`实例化文本识别模型(此处以`PP-LCNet_x1_0`为例),具体说明如下:
+* `create_model`实例化图像分类模型(此处以`PP-LCNet_x1_0`为例),具体说明如下:
 <table>
 <thead>
 <tr>
@@ -723,7 +723,7 @@ for res in output:
 <td>模型名称</td>
 <td><code>str</code></td>
 <td>无</td>
-<td><code>PP-LCNet_x1_0</code></td>
+<td><code></code></td>
 </tr>
 <tr>
 <td><code>model_dir</code></td>
@@ -732,11 +732,22 @@ for res in output:
 <td>无</td>
 <td>无</td>
 </tr>
+<tr>
+<td><code>topk</code></td>
+<td>预测结果的前<code>topk</code>值,如果不指定,将默认使用PaddleX官方模型配置</td>
+<td><code>int</code></td>
+<td>
+<ul>
+  <li><b>int</b>,如 5 ,表示打印(返回)预测结果的前<code>5</code>个类别和对应的分类概率</li>
+</ul>
+</td>
+<td>5</td>
+</tr>
 </table>
 
 * 其中,`model_name` 必须指定,指定 `model_name` 后,默认使用 PaddleX 内置的模型参数,在此基础上,指定 `model_dir` 时,使用用户自定义的模型。
 
-* 调用文本识别模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
+* 调用图像分类模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
 
 <table>
 <thead>
@@ -771,6 +782,17 @@ for res in output:
 <td>任意整数</td>
 <td>1</td>
 </tr>
+<tr>
+<td><code>topk</code></td>
+<td>预测结果的前<code>topk</code>值;如果不指定,将默认使用 <code>creat_model</code> 指定的 <code>topk</code> 参数,如果 <code>creat_model</code> 也没有指定,则默认使用PaddleX官方模型配置</td>
+<td><code>int</code></td>
+<td>
+<ul>
+  <li><b>int</b>,如 5 ,表示打印(返回)预测结果的前<code>5</code>个类别和对应的分类概率</li>
+</ul>
+</td>
+<td>5</td>
+</tr>
 </table>
 
 * 对预测结果进行处理,每个样本的预测结果均为`dict`类型,且支持打印、保存为图片、保存为`json`文件的操作:

+ 5 - 5
docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.md

@@ -57,7 +57,7 @@ for res in output:
 
 运行结果参数含义如下:
 - `input_path`:表示输入图片的路径。
-- `class_ids`:表示预测结果的类别id。
+- `class_ids`:表示预测结果的类别id,含有四个类别,即0度,90度,180度和270度
 - `scores`:表示预测结果的置信度。
 - `label_names`:表示预测结果的类别名。
 
@@ -67,7 +67,7 @@ for res in output:
 
 相关方法、参数等说明如下:
 
-* `create_model`实例化文本识别模型(此处以`PP-LCNet_x1_0_doc_ori`为例),具体说明如下:
+* `create_model`实例化文档图像方向分类模型(此处以`PP-LCNet_x1_0_doc_ori`为例),具体说明如下:
 <table>
 <thead>
 <tr>
@@ -83,7 +83,7 @@ for res in output:
 <td>模型名称</td>
 <td><code>str</code></td>
 <td>无</td>
-<td><code>PP-LCNet_x1_0_doc_ori</code></td>
+<td><code></code></td>
 </tr>
 <tr>
 <td><code>model_dir</code></td>
@@ -96,7 +96,7 @@ for res in output:
 
 * 其中,`model_name` 必须指定,指定 `model_name` 后,默认使用 PaddleX 内置的模型参数,在此基础上,指定 `model_dir` 时,使用用户自定义的模型。
 
-* 调用文本识别模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
+* 调用文档图像方向分类模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
 
 <table>
 <thead>
@@ -413,7 +413,7 @@ python main.py -c paddlex/configs/doc_text_orientation/PP-LCNet_x1_0_doc_ori.yam
 
 1.<b>产线集成</b>
 
-文档图像分类模块可以集成的PaddleX产线有[文档场景信息抽取v3产线(PP-ChatOCRv3)](../../../pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction.md),只需要替换模型路径即可完成文本检测模块的模型更新。
+文档图像分类模块可以集成的PaddleX产线有[文档场景信息抽取v3产线(PP-ChatOCRv3)](../../../pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction.md),只需要替换模型路径即可完成文档图像分类模块的模型更新。
 
 2.<b>模块集成</b>
 

+ 5 - 5
docs/module_usage/tutorials/ocr_modules/textline_orientation_classification.md

@@ -58,17 +58,17 @@ for res in output:
 
 运行结果参数含义如下:
 - `input_path`:表示输入图片的路径。
-- `class_ids`:表示预测结果的类别id。
+- `class_ids`:表示预测结果的类别 id,含有两个类别,即0度和180度
 - `scores`:表示预测结果的置信度。
 - `label_names`:表示预测结果的类别名。
 
 可视化图片如下:
 
-<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/modules/image_classification/general_image_classification_001_res.jpg">
+<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/modules/textline_ori_classification/textline_rot180_demo_res.jpg">
 
 相关方法、参数等说明如下:
 
-* `create_model`实例化文本识别模型(此处以`PP-LCNet_x0_25_textline_ori`为例),具体说明如下:
+* `create_model`实例化文本行方向分类模型(此处以`PP-LCNet_x0_25_textline_ori`为例),具体说明如下:
 <table>
 <thead>
 <tr>
@@ -84,7 +84,7 @@ for res in output:
 <td>模型名称</td>
 <td><code>str</code></td>
 <td>无</td>
-<td><code>PP-LCNet_x0_25_textline_ori</code></td>
+<td><code></code></td>
 </tr>
 <tr>
 <td><code>model_dir</code></td>
@@ -97,7 +97,7 @@ for res in output:
 
 * 其中,`model_name` 必须指定,指定 `model_name` 后,默认使用 PaddleX 内置的模型参数,在此基础上,指定 `model_dir` 时,使用用户自定义的模型。
 
-* 调用文本识别模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
+* 调用文本行方向分类模型的 `predict()` 方法进行推理预测,`predict()` 方法参数有 `input` 和 `batch_size`,具体说明如下:
 
 <table>
 <thead>