学卿 9 ماه پیش
والد
کامیت
95f1ba2320
19فایلهای تغییر یافته به همراه86 افزوده شده و 23 حذف شده
  1. 1 1
      docs/module_usage/tutorials/cv_modules/image_feature.en.md
  2. 1 1
      docs/module_usage/tutorials/cv_modules/image_feature.md
  3. 2 1
      docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.en.md
  4. 2 1
      docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.md
  5. 2 1
      docs/module_usage/tutorials/ocr_modules/formula_recognition.en.md
  6. 2 1
      docs/module_usage/tutorials/ocr_modules/formula_recognition.md
  7. 8 1
      docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.en.md
  8. 7 1
      docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.md
  9. 7 0
      docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.en.md
  10. 6 0
      docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.md
  11. 8 1
      docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.en.md
  12. 9 3
      docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.md
  13. 1 1
      docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.en.md
  14. 1 1
      docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.md
  15. 7 0
      docs/pipeline_usage/tutorials/cv_pipelines/object_detection.en.md
  16. 6 0
      docs/pipeline_usage/tutorials/cv_pipelines/object_detection.md
  17. 1 1
      docs/pipeline_usage/tutorials/video_pipelines/video_classification.md
  18. 7 3
      docs/pipeline_usage/tutorials/video_pipelines/video_detection.en.md
  19. 8 5
      docs/pipeline_usage/tutorials/video_pipelines/video_detection.md

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
docs/module_usage/tutorials/cv_modules/image_feature.en.md


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
docs/module_usage/tutorials/cv_modules/image_feature.md


+ 2 - 1
docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.en.md

@@ -40,8 +40,9 @@ The document image orientation classification module is aim to distinguish the o
 
 After completing the installation of the wheel package, you can perform inference on the document image orientation classification module with just a few lines of code. You can switch models under this module at will, and you can also integrate the model inference of the document image orientation classification module into your project. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/img_rot180_demo.jpg) to your local machine.
 
-```bash
+```python
 from paddlex import create_model
+
 model = create_model(model_name="PP-LCNet_x1_0_doc_ori")
 output = model.predict("img_rot180_demo.jpg",  batch_size=1)
 for res in output:

+ 2 - 1
docs/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.md

@@ -40,8 +40,9 @@ comments: true
 
 完成wheel 包的安装后,几行代码即可完成文档图像方向分类模块的推理,可以任意切换该模块下的模型,您也可以将文档图像方向分类模块中的模型推理集成到您的项目中。运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/img_rot180_demo.jpg)到本地。
 
-```bash
+```python
 from paddlex import create_model
+
 model = create_model(model_name="PP-LCNet_x1_0_doc_ori")
 output = model.predict("img_rot180_demo.jpg",  batch_size=1)
 for res in output:

+ 2 - 1
docs/module_usage/tutorials/ocr_modules/formula_recognition.en.md

@@ -64,8 +64,9 @@ The formula recognition module is a crucial component of OCR (Optical Character
 
 After installing the wheel package, you can complete the inference of the formula recognition module with just a few lines of code. You can switch models under this module at will, and you can also integrate the model inference of the formula recognition module into your project. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_formula_rec_001.png) to your local machine.
 
-```bash
+```python
 from paddlex import create_model
+
 model = create_model(model_name="PP-FormulaNet-S")
 output = model.predict(input="general_formula_rec_001.png", batch_size=1)
 for res in output:

+ 2 - 1
docs/module_usage/tutorials/ocr_modules/formula_recognition.md

@@ -51,8 +51,9 @@ comments: true
 
 wheel 包的安装后,几行代码即可完成公式识别模块的推理,可以任意切换该模块下的模型,您也可以将公式识别的模块中的模型推理集成到您的项目中。运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_formula_rec_001.png)到本地。
 
-```bash
+```python
 from paddlex import create_model
+
 model = create_model(model_name="PP-FormulaNet-S")
 output = model.predict(input="general_formula_rec_001.png", batch_size=1)
 for res in output:

+ 8 - 1
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.en.md

@@ -161,6 +161,13 @@ In the above Python script, the following steps are performed:
 <td>None</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>Specific configuration information for the pipeline (if set simultaneously with the <code>pipeline</code>, it takes precedence over the <code>pipeline</code>, and the pipeline name must match the <code>pipeline</code>).
+</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>The inference device for the production line. Supports specifying the specific card number of the GPU, such as "gpu:0", the specific card number of other hardware, such as "npu:0", and CPU such as "cpu".</td>
 <td><code>str</code></td>
@@ -377,7 +384,7 @@ In the above Python script, the following steps are performed:
         - `det_score`: Detection score.
         - `coordinate`: Coordinates of the face bounding box, in the format [xmin, ymin, xmax, ymax].
 
-- Calling the `save_to_json()` method will save the above content to the specified `save_path`. If a directory is specified, the saved path will be `save_path/{your_img_basename}.json`. If a file is specified, it will be saved directly to that file.
+- Calling the `save_to_json()` method will save the above content to the specified `save_path`. If a directory is specified, the saved path will be `save_path/{your_img_basename}_res.json`. If a file is specified, it will be saved directly to that file.
 - Calling the `save_to_img()` method will save the visualization result to the specified `save_path`. If a directory is specified, the saved path will be `save_path/{your_img_basename}_res.{your_img_extension}`. If a file is specified, it will be saved directly to that file. (The production line usually contains many result images; it is not recommended to specify a specific file path directly, otherwise multiple images will be overwritten, leaving only the last one.) In the example above, the visualization result is as follows:
 
 <img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/face_recognition/02.jpg">

+ 7 - 1
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.md

@@ -162,6 +162,12 @@ for res in output:
 <td>无</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>产线具体的配置信息(如果和<code>pipeline</code>同时设置,优先级高于<code>pipeline</code>,且要求产线名和<code>pipeline</code>一致)。</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>产线推理设备。支持指定GPU具体卡号,如“gpu:0”,其他硬件具体卡号,如“npu:0”,CPU如“cpu”。</td>
 <td><code>str</code></td>
@@ -376,7 +382,7 @@ for res in output:
         - `det_score`:检测得分
         - `coordinate`:人脸框坐标,格式为[xmin, ymin, xmax, ymax]
 
-- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}.json`,如果指定为文件,则直接保存到该文件中。
+- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.json`,如果指定为文件,则直接保存到该文件中。
 - 调用`save_to_img()` 方法会将可视化结果保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.{your_img_extension}`,如果指定为文件,则直接保存到该文件中。(产线通常包含较多结果图片,不建议直接指定为具体的文件路径,否则多张图会被覆盖,仅保留最后一张图),上述示例中,可视化结果如下所示:
 
 <img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/face_recognition/02.jpg">

+ 7 - 0
docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.en.md

@@ -133,6 +133,13 @@ In the above Python script, the following steps are executed:
 <td>None</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>Specific configuration information for the pipeline (if set simultaneously with the <code>pipeline</code>, it takes precedence over the <code>pipeline</code>, and the pipeline name must match the <code>pipeline</code>).
+</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>The inference device for the production line. Supports specifying specific GPU card numbers, such as "gpu:0", specific card numbers for other hardware, such as "npu:0", or CPU, such as "cpu".</td>
 <td><code>str</code></td>

+ 6 - 0
docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.md

@@ -134,6 +134,12 @@ for res in output:
 <td>无</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>产线具体的配置信息(如果和<code>pipeline</code>同时设置,优先级高于<code>pipeline</code>,且要求产线名和<code>pipeline</code>一致)。</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>产线推理设备。支持指定GPU具体卡号,如“gpu:0”,其他硬件具体卡号,如“npu:0”,CPU如“cpu”。</td>
 <td><code>str</code></td>

+ 8 - 1
docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.en.md

@@ -152,6 +152,13 @@ In the above Python script, the following steps are executed:
 <td><code>None</code></td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>Specific configuration information for the pipeline (if set simultaneously with the <code>pipeline</code>, it takes precedence over the <code>pipeline</code>, and the pipeline name must match the <code>pipeline</code>).
+</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>The device used for pipeline inference. It supports specifying the specific card number of GPU, such as "gpu:0", other hardware card numbers, such as "npu:0", or CPU, such as "cpu".</td>
 <td><code>str</code></td>
@@ -446,7 +453,7 @@ In the above Python script, the following steps are executed:
         - `keypoints`: Keypoint coordinate information, a numpy array with shape [num_keypoints, 3], where each keypoint consists of [x, y, score], and score is the confidence score of the keypoint
         - `kpt_score`: Overall confidence score of the keypoints, which is the average confidence score of the keypoints
 
-- Calling the `save_to_json()` method will save the above content to the specified `save_path`. If specified as a directory, the saved path will be `save_path/{your_img_basename}.json`; if specified as a file, it will be saved directly to that file. Since JSON files do not support saving numpy arrays, the `numpy.array` types will be converted to lists.
+- Calling the `save_to_json()` method will save the above content to the specified `save_path`. If specified as a directory, the saved path will be `save_path/{your_img_basename}_res.json`; if specified as a file, it will be saved directly to that file. Since JSON files do not support saving numpy arrays, the `numpy.array` types will be converted to lists.
 - Calling the `save_to_img()` method will save the visualization results to the specified `save_path`. If specified as a directory, the saved path will be `save_path/{your_img_basename}_res.{your_img_extension}`; if specified as a file, it will be saved directly to that file. (The production line usually contains many result images, it is not recommended to specify a specific file path directly, otherwise multiple images will be overwritten, leaving only the last image)
 
 * Additionally, it also supports obtaining visualized images and prediction results through attributes, as follows:

+ 9 - 3
docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.md

@@ -6,7 +6,7 @@
 
 人体关键点检测旨在通过识别和定位人体的特定关节和部位,来实现对人体姿态和动作的分析。该任务不仅需要在图像中检测出人体,还需要精确获取人体的关键点位置,如肩膀、肘部、膝盖等,从而进行姿态估计和行为识别。人体关键点检测广泛应用于运动分析、健康监测、动画制作和人机交互等场景。
 
-PaddleX 的人体关键点检测产线是一个 Top-Down 方案,由行人检测和关键点检测两个模块组成,针对移动端设备优化,可精确流畅地在移动端设备上执行多人姿态估计任务。
+PaddleX 的人体关键点检测产线是一个 Top-Down 方案,由行人检测和关键点检测两个模块组成,针对移动端设备优化,可精确流畅地在移动端设备上执行多人姿态估计任务。本产线同时提供了灵活的服务化部署方式,支持在多种硬件上使用多种编程语言调用。不仅如此,本产线也提供了二次开发的能力,您可以基于本产线在您自己的数据集上训练调优,训练后的模型也可以无缝集成。
 
 <img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/human_keypoint_detection/01.jpg">
 
@@ -120,7 +120,7 @@ from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="human_keypoint_detection")
 
-output = pipeline.predict("keypoint_detection_001.jpg" det_threshold=0.5)
+output = pipeline.predict("keypoint_detection_001.jpg", det_threshold=0.5)
 for res in output:
     res.print()
     res.save_to_img("./output/")
@@ -148,6 +148,12 @@ for res in output:
 <td><code>None</code></td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>产线具体的配置信息(如果和<code>pipeline</code>同时设置,优先级高于<code>pipeline</code>,且要求产线名和<code>pipeline</code>一致)。</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>产线推理设备。支持指定GPU具体卡号,如“gpu:0”,其他硬件具体卡号,如“npu:0”,CPU如“cpu”。</td>
 <td><code>str</code></td>
@@ -439,7 +445,7 @@ for res in output:
         - `keypoints`:关键点坐标信息,一个numpy数组,形状为[num_keypoints, 3],其中每个关键点由[x, y, score]组成,score为该关键点的置信度
         - `kpt_score`:关键点整体的置信度,即关键点的平均置信度
 
-- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}.json`,如果指定为文件,则直接保存到该文件中。由于json文件不支持保存numpy数组,因此会将其中的`numpy.array`类型转换为列表形式。
+- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.json`,如果指定为文件,则直接保存到该文件中。由于json文件不支持保存numpy数组,因此会将其中的`numpy.array`类型转换为列表形式。
 - 调用`save_to_img()` 方法会将可视化结果保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.{your_img_extension}`,如果指定为文件,则直接保存到该文件中。(产线通常包含较多结果图片,不建议直接指定为具体的文件路径,否则多张图会被覆盖,仅保留最后一张图)
 
 * 此外,也支持通过属性获取带结果的可视化图像和预测结果,具体如下:

+ 1 - 1
docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.en.md

@@ -187,7 +187,7 @@ paddlex --pipeline instance_segmentation \
         --input general_instance_segmentation_004.png \
         --threshold 0.5 \
         --save_path ./output \
-        --device gpu:0 \
+        --device gpu:0
 ```
 
 The relevant parameter descriptions can be referred to in the parameter explanations in [2.2.2 Python Script Integration]().

+ 1 - 1
docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.md

@@ -190,7 +190,7 @@ paddlex --pipeline instance_segmentation \
         --input general_instance_segmentation_004.png \
         --threshold 0.5 \
         --save_path ./output \
-        --device gpu:0 \
+        --device gpu:0
 ```
 相关的参数说明可以参考[2.2.2 Python脚本方式集成](#222-python脚本方式集成)中的参数说明。
 

+ 7 - 0
docs/pipeline_usage/tutorials/cv_pipelines/object_detection.en.md

@@ -418,6 +418,13 @@ In the above Python script, the following steps are executed:
 <td><code>None</code></td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>Specific configuration information for the pipeline (if set simultaneously with the <code>pipeline</code>, it takes precedence over the <code>pipeline</code>, and the pipeline name must match the <code>pipeline</code>).
+</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>The device for pipeline inference. It supports specifying the specific card number of GPU, such as "gpu:0", other hardware card numbers, such as "npu:0", or CPU as "cpu".</td>
 <td><code>str</code></td>

+ 6 - 0
docs/pipeline_usage/tutorials/cv_pipelines/object_detection.md

@@ -432,6 +432,12 @@ for res in output:
 <td><code>None</code></td>
 </tr>
 <tr>
+<tr>
+<td><code>config</code></td>
+<td>产线具体的配置信息(如果和<code>pipeline</code>同时设置,优先级高于<code>pipeline</code>,且要求产线名和<code>pipeline</code>一致)。</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
 <td><code>device</code></td>
 <td>产线推理设备。支持指定GPU具体卡号,如“gpu:0”,其他硬件具体卡号,如“npu:0”,CPU如“cpu”。</td>
 <td><code>str</code></td>

+ 1 - 1
docs/pipeline_usage/tutorials/video_pipelines/video_classification.md

@@ -78,7 +78,7 @@ paddlex --pipeline video_classification \
 #### 2.2 Python脚本方式集成
 * 上述命令行是为了快速体验查看效果,一般来说,在项目中,往往需要通过代码集成,您可以通过几行代码即可完成产线的快速推理,推理代码如下:
 
-```
+```python
 from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="video_classification")

+ 7 - 3
docs/pipeline_usage/tutorials/video_pipelines/video_detection.en.md

@@ -104,6 +104,13 @@ In the above Python script, the following steps are executed:
 <td>None</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>Specific configuration information for the pipeline (if set simultaneously with the <code>pipeline</code>, it takes precedence over the <code>pipeline</code>, and the pipeline name must match the <code>pipeline</code>).
+</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>The inference device for the pipeline. It supports specifying the specific card number of the GPU, such as "gpu:0", other hardware card numbers, such as "npu:0", and CPU as "cpu".</td>
 <td><code>str</code></td>
@@ -279,13 +286,10 @@ In the above Python script, the following steps are executed:
 <td rowspan = "1">Get the predicted <code>json</code> format result</td>
 </tr>
 <tr>
-<td rowspan = "2"><code>img</code></td>
-<td rowspan = "2">Get the visualized image in <code>dict</code> format</td>
 </tr>
 </table>
 
 - The prediction result obtained by the `json` attribute is a dict type of data, with content consistent with the content saved by calling the `save_to_json()` method.
-- The prediction result returned by the `img` attribute is a dictionary type of data. The key is `preprocessed_img`, and the corresponding value is an `Image.Image` object used for visualizing the doc_preprocessor result.
 
 In addition, you can obtain the video_detection production line configuration file and load the configuration file for prediction. You can execute the following command to save the result in `my_path`:
 

+ 8 - 5
docs/pipeline_usage/tutorials/video_pipelines/video_detection.md

@@ -106,6 +106,12 @@ for res in output:
 <td>None</td>
 </tr>
 <tr>
+<td><code>config</code></td>
+<td>产线具体的配置信息(如果和<code>pipeline</code>同时设置,优先级高于<code>pipeline</code>,且要求产线名和<code>pipeline</code>一致)。</td>
+<td><code>dict[str, Any]</code></td>
+<td><code>None</code></td>
+</tr>
+<tr>
 <td><code>device</code></td>
 <td>产线推理设备。支持指定GPU具体卡号,如“gpu:0”,其他硬件具体卡号,如“npu:0”,CPU如“cpu”。</td>
 <td><code>str</code></td>
@@ -263,10 +269,10 @@ for res in output:
 
     - `angle`: `(int)` 文档方向分类的预测结果。启用时取值为[0,90,180,270];未启用时为-1
 
-- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}.json`,如果指定为文件,则直接保存到该文件中。由于json文件不支持保存numpy数组,因此会将其中的`numpy.array`类型转换为列表形式。
+- 调用`save_to_json()` 方法会将上述内容保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.json`,如果指定为文件,则直接保存到该文件中。由于json文件不支持保存numpy数组,因此会将其中的`numpy.array`类型转换为列表形式。
 - 调用`save_to_video()` 方法会将可视化结果保存到指定的`save_path`中,如果指定为目录,则保存的路径为`save_path/{your_img_basename}_res.{your_img_extension}`,如果指定为文件,则直接保存到该文件中。
 
-* 此外,也支持通过属性获取带结果的可视化图像和预测结果,具体如下:
+* 此外,也支持通过属性获取预测结果,具体如下:
 
 <table>
 <thead>
@@ -280,14 +286,11 @@ for res in output:
 <td rowspan = "1">获取预测的 <code>json</code> 格式的结果</td>
 </tr>
 <tr>
-<td rowspan = "2"><code>img</code></td>
-<td rowspan = "2">获取格式为 <code>dict</code> 的可视化图像</td>
 </tr>
 </table>
 
 
 - `json` 属性获取的预测结果为dict类型的数据,相关内容与调用 `save_to_json()` 方法保存的内容一致。
-- `img` 属性返回的预测结果是一个字典类型的数据。其中,键为 `preprocessed_img`,对应的值是 `Image.Image` 对象:用于显示 doc_preprocessor 结果的可视化图像。
 
 
 此外,您可以获取 video_detection 产线配置文件,并加载配置文件进行预测。可执行如下命令将结果保存在 `my_path` 中:

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است