Sfoglia il codice sorgente

Update doc and code for parameter: "visualize" (#4250)

* update doc and code for visualize

* add precommit files change

* update translate content
Poki Bai 5 mesi fa
parent
commit
2cb31ec4f5
100 ha cambiato i file con 1191 aggiunte e 85 eliminazioni
  1. 25 25
      docs/CHANGELOG.en.md
  2. 1 1
      docs/CHANGELOG.md
  3. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.en.md
  4. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.md
  5. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.en.md
  6. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/general_image_recognition.md
  7. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.en.md
  8. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.md
  9. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_anomaly_detection.en.md
  10. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_anomaly_detection.md
  11. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_classification.en.md
  12. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_classification.md
  13. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_multi_label_classification.en.md
  14. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/image_multi_label_classification.md
  15. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.en.md
  16. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.md
  17. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/object_detection.en.md
  18. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/object_detection.md
  19. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_detection.en.md
  20. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_detection.md
  21. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_segmentation.en.md
  22. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_segmentation.md
  23. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/pedestrian_attribute_recognition.en.md
  24. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/pedestrian_attribute_recognition.md
  25. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/rotated_object_detection.en.md
  26. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/rotated_object_detection.md
  27. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/semantic_segmentation.en.md
  28. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/semantic_segmentation.md
  29. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/small_object_detection.en.md
  30. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/small_object_detection.md
  31. 20 0
      docs/pipeline_usage/tutorials/cv_pipelines/vehicle_attribute_recognition.en.md
  32. 17 0
      docs/pipeline_usage/tutorials/cv_pipelines/vehicle_attribute_recognition.md
  33. 21 1
      docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v3.en.md
  34. 18 1
      docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v3.md
  35. 20 0
      docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.en.md
  36. 17 0
      docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.md
  37. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/OCR.en.md
  38. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/OCR.md
  39. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.en.md
  40. 17 1
      docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.md
  41. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.en.md
  42. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.md
  43. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/formula_recognition.en.md
  44. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/formula_recognition.md
  45. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/layout_parsing.en.md
  46. 17 1
      docs/pipeline_usage/tutorials/ocr_pipelines/layout_parsing.md
  47. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/seal_recognition.en.md
  48. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/seal_recognition.md
  49. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition.en.md
  50. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition.md
  51. 20 0
      docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.en.md
  52. 17 0
      docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.md
  53. 20 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_anomaly_detection.en.md
  54. 17 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_anomaly_detection.md
  55. 20 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification.en.md
  56. 17 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification.md
  57. 20 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_forecasting.en.md
  58. 17 0
      docs/pipeline_usage/tutorials/time_series_pipelines/time_series_forecasting.md
  59. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/anomaly_detection.py
  60. 5 1
      paddlex/inference/serving/basic_serving/_pipeline_apps/doc_preprocessor.py
  61. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/face_recognition.py
  62. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/formula_recognition.py
  63. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/human_keypoint_detection.py
  64. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/image_classification.py
  65. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/image_multilabel_classification.py
  66. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/instance_segmentation.py
  67. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/layout_parsing.py
  68. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/object_detection.py
  69. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/ocr.py
  70. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/open_vocabulary_detection.py
  71. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/open_vocabulary_segmentation.py
  72. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/pedestrian_attribute_recognition.py
  73. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/pp_chatocrv3_doc.py
  74. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/pp_chatocrv4_doc.py
  75. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/pp_shituv2.py
  76. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/pp_structurev3.py
  77. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/rotated_object_detection.py
  78. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/seal_recognition.py
  79. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/semantic_segmentation.py
  80. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/small_object_detection.py
  81. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/table_recognition.py
  82. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/table_recognition_v2.py
  83. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/ts_anomaly_detection.py
  84. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/ts_classification.py
  85. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/ts_forecast.py
  86. 4 2
      paddlex/inference/serving/basic_serving/_pipeline_apps/vehicle_attribute_recognition.py
  87. 1 0
      paddlex/inference/serving/schemas/anomaly_detection.py
  88. 1 0
      paddlex/inference/serving/schemas/doc_preprocessor.py
  89. 1 0
      paddlex/inference/serving/schemas/face_recognition.py
  90. 1 0
      paddlex/inference/serving/schemas/formula_recognition.py
  91. 1 0
      paddlex/inference/serving/schemas/human_keypoint_detection.py
  92. 1 0
      paddlex/inference/serving/schemas/image_classification.py
  93. 1 0
      paddlex/inference/serving/schemas/image_multilabel_classification.py
  94. 1 0
      paddlex/inference/serving/schemas/instance_segmentation.py
  95. 1 0
      paddlex/inference/serving/schemas/layout_parsing.py
  96. 1 0
      paddlex/inference/serving/schemas/object_detection.py
  97. 1 0
      paddlex/inference/serving/schemas/ocr.py
  98. 1 0
      paddlex/inference/serving/schemas/open_vocabulary_detection.py
  99. 1 0
      paddlex/inference/serving/schemas/open_vocabulary_segmentation.py
  100. 1 0
      paddlex/inference/serving/schemas/pedestrian_attribute_recognition.py

+ 25 - 25
docs/CHANGELOG.en.md

@@ -6,34 +6,34 @@ comments: true
 
 ## Latest Version Information
 
-### PaddleX v3.0.0(5.20/2025) 
+### PaddleX v3.0.0(5.20/2025)
 
 Core upgrades are as follows:
 
-- **Rich Model Library:**  
-  - **Extensive Model Coverage:** PaddleX 3.0 includes **270+ models**, covering diverse scenarios such as image/video classification/detection/segmentation, OCR, speech recognition, time series analysis, and more.  
-  - **Mature Solutions:** Built on this robust model library, PaddleX 3.0 offers **critical and production-ready AI solutions**, including general document parsing, key information extraction, document understanding, table recognition, and general image recognition.  
-
-- **Unified Inference API & Enhanced Deployment Capabilities:**  
-  - **Standardized Inference Interface:** Reduces API fragmentation across model types, lowering the learning curve for users and accelerating enterprise adoption.  
-  - **Multi-Model Composition:** Complex tasks can be efficiently tackled by combining different models, achieving synergistic performance (1+1>2).  
-  - **Upgraded Deployment:** Unified commands now manage deployments for diverse models, supporting **multi-GPU inference** and **multi-instance serving deployments**.  
-
-- **Full Compatibility with PaddlePaddle Framework 3.0:**  
-  - **Leveraging New Paddle 3.0 Features:**  
-    - Compiler-accelerated training: Enable by appending `-o Global.dy2st=True` to training commands. **Most GPU-based models see >10% speed gains, with some exceeding 30%.**  
-    - Inference upgrades: Full adaptation to Paddle 3.0’s Program Intermediate Representation (PIR) enhances flexibility and compatibility. Static graph models now use `xxx.json` instead of `xxx.pdmodel`.  
-  - **ONNX Model Support:** Seamless format conversion via the Paddle2ONNX plugin.  
-
-- **Flagship Capabilities:**  
-  - **PP-OCRv5:** Powers **multi-hardware inference, multi-backend support, and serving deployments** for this industry-leading OCR system.  
-  - **PP-StructureV3:** Orchestrates **15+ models** in hybrid (serial/parallel) pipelines, achieving **SOTA accuracy on OmniDocBench**.  
-  - **PP-ChatOCRv4:** Integrates with **PP-DocBee2 and ERNIE 4.5Turbo**, boosting key information extraction accuracy by **15.7 percentage points** over the previous generation.  
-
-- **Multi-Hardware Support:**  
-  - **Broad Compatibility:** Training and inference supported on **NVIDIA, Intel, Apple M-series, Kunlunxin, Ascend, Cambricon, Hygon, Enflame**, and more.  
-  - **Ascend-Optimized:** **200+ fully adapted models**, including **21 OM-accelerated inference models**, plus key solutions like PP-OCRv5 and PP-StructureV3.  
-  - **Kunlunxin-Optimized:** Critical classification, detection, and OCR models (including PP-OCRv5) are fully supported.  
+- **Rich Model Library:**
+  - **Extensive Model Coverage:** PaddleX 3.0 includes **270+ models**, covering diverse scenarios such as image/video classification/detection/segmentation, OCR, speech recognition, time series analysis, and more.
+  - **Mature Solutions:** Built on this robust model library, PaddleX 3.0 offers **critical and production-ready AI solutions**, including general document parsing, key information extraction, document understanding, table recognition, and general image recognition.
+
+- **Unified Inference API & Enhanced Deployment Capabilities:**
+  - **Standardized Inference Interface:** Reduces API fragmentation across model types, lowering the learning curve for users and accelerating enterprise adoption.
+  - **Multi-Model Composition:** Complex tasks can be efficiently tackled by combining different models, achieving synergistic performance (1+1>2).
+  - **Upgraded Deployment:** Unified commands now manage deployments for diverse models, supporting **multi-GPU inference** and **multi-instance serving deployments**.
+
+- **Full Compatibility with PaddlePaddle Framework 3.0:**
+  - **Leveraging New Paddle 3.0 Features:**
+    - Compiler-accelerated training: Enable by appending `-o Global.dy2st=True` to training commands. **Most GPU-based models see >10% speed gains, with some exceeding 30%.**
+    - Inference upgrades: Full adaptation to Paddle 3.0’s Program Intermediate Representation (PIR) enhances flexibility and compatibility. Static graph models now use `xxx.json` instead of `xxx.pdmodel`.
+  - **ONNX Model Support:** Seamless format conversion via the Paddle2ONNX plugin.
+
+- **Flagship Capabilities:**
+  - **PP-OCRv5:** Powers **multi-hardware inference, multi-backend support, and serving deployments** for this industry-leading OCR system.
+  - **PP-StructureV3:** Orchestrates **15+ models** in hybrid (serial/parallel) pipelines, achieving **SOTA accuracy on OmniDocBench**.
+  - **PP-ChatOCRv4:** Integrates with **PP-DocBee2 and ERNIE 4.5Turbo**, boosting key information extraction accuracy by **15.7 percentage points** over the previous generation.
+
+- **Multi-Hardware Support:**
+  - **Broad Compatibility:** Training and inference supported on **NVIDIA, Intel, Apple M-series, Kunlunxin, Ascend, Cambricon, Hygon, Enflame**, and more.
+  - **Ascend-Optimized:** **200+ fully adapted models**, including **21 OM-accelerated inference models**, plus key solutions like PP-OCRv5 and PP-StructureV3.
+  - **Kunlunxin-Optimized:** Critical classification, detection, and OCR models (including PP-OCRv5) are fully supported.
 
 ### PaddleX v3.0.0rc1(4.22/2025)
 

+ 1 - 1
docs/CHANGELOG.md

@@ -7,7 +7,7 @@ comments: true
 ## 最新版本信息
 
 
-### PaddleX v3.0.0(5.20/2025) 
+### PaddleX v3.0.0(5.20/2025)
 
 **丰富的模型库:**
 - **模型丰富:** PaddleX3.0 包含270+模型,涵盖了图像(视频)分类/检测/分割、OCR、语音识别、时序等多种场景。

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.en.md

@@ -911,6 +911,26 @@ Below is the API reference for basic service deployment and multi-language servi
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>indexKey</code></td>
 <td><code>string</code></td>
 <td>The key corresponding to the index. Provided by the <code>buildIndex</code> operation.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.md

@@ -908,6 +908,23 @@ data_root             # 数据集根目录,目录名称可以改变
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>indexKey</code></td>
 <td><code>string</code></td>
 <td>索引对应的键。由<code>buildIndex</code>操作提供。</td>

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

@@ -872,6 +872,26 @@ Below is the API reference for basic service deployment and multi-language servi
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>indexKey</code></td>
 <td><code>string</code></td>
 <td>The key corresponding to the index. Provided by the <code>buildIndex</code> operation.</td>

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

@@ -870,6 +870,23 @@ data_root             # 数据集根目录,目录名称可以改变
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>indexKey</code></td>
 <td><code>string</code></td>
 <td>索引对应的键。由<code>buildIndex</code>操作提供。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.en.md

@@ -655,6 +655,26 @@ Below are the API references and multi-language service invocation examples for
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>Threshold for human detection model.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/human_keypoint_detection.md

@@ -646,6 +646,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>人体检测模型阈值</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_anomaly_detection.en.md

@@ -412,6 +412,26 @@ Below are the API references for basic service-based deployment and examples of
 <td>The URL of the image file accessible by the server or the Base64 encoded result of the image file content.</td>
 <td>Yes</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_anomaly_detection.md

@@ -414,6 +414,23 @@ for res in output:
 <td>服务器可访问的图像文件的URL或图像文件内容的Base64编码结果。</td>
 <td>是</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_classification.en.md

@@ -1279,6 +1279,26 @@ Below are the API references for basic service deployment and examples of multi-
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>topk</code></td>
 <td><code>integer</code> | <code>null</code></td>
 <td>Pleaser to ription of the <code>topk</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_classification.md

@@ -1090,6 +1090,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>topk</code></td>
 <td><code>integer</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>topk</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_multi_label_classification.en.md

@@ -466,6 +466,26 @@ Below is the API reference for basic service deployment and multi-language servi
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>array</code> | <code>object</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/image_multi_label_classification.md

@@ -465,6 +465,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>array</code> | <code>object</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>threshold</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.en.md

@@ -580,6 +580,26 @@ Below are the API references for basic service deployment and examples of multi-
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/instance_segmentation.md

@@ -580,6 +580,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>threshold</code> 参数相关说明。</td>

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

@@ -785,6 +785,26 @@ Below is the API reference for basic service deployment and multi-language servi
 <td>The URL of an image file accessible by the server or the Base64-encoded content of the image file.</td>
 <td>Yes</td>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>object</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

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

@@ -788,6 +788,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>object</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>threshold</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_detection.en.md

@@ -456,6 +456,26 @@ Below are the API references and multi-language service invocation examples for
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>prompt</code></td>
 <td><code>string</code></td>
 <td>The text prompt used for prediction.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_detection.md

@@ -456,6 +456,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>prompt</code></td>
 <td><code>string</code></td>
 <td>预测使用的文本提示词。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_segmentation.en.md

@@ -461,6 +461,26 @@ Below are the API references and multi-language service invocation examples for
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>prompt</code></td>
 <td><code>array</code></td>
 <td>The prompt used for prediction.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/open_vocabulary_segmentation.md

@@ -456,6 +456,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>prompt</code></td>
 <td><code>array</code></td>
 <td>预测使用的提示。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/pedestrian_attribute_recognition.en.md

@@ -498,6 +498,26 @@ Below are the API references for basic serving deployment and examples of multi-
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>det_threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/pedestrian_attribute_recognition.md

@@ -493,6 +493,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>det_threshold</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/rotated_object_detection.en.md

@@ -445,6 +445,26 @@ Below are the API references and multi-language service call examples for basic
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>det_threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/rotated_object_detection.md

@@ -444,6 +444,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>object</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>threshold</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/semantic_segmentation.en.md

@@ -607,6 +607,26 @@ Below are the API references for basic service deployment and examples of multi-
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>targetSize</code></td>
 <td><code>integer</code> | <code>array</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>target_size</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/semantic_segmentation.md

@@ -612,6 +612,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>targetSize</code></td>
 <td><code>integer</code> | <code>array</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>target_size</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/small_object_detection.en.md

@@ -461,6 +461,26 @@ Below is the API reference for basic service deployment and multi-language servi
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>object</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/small_object_detection.md

@@ -463,6 +463,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>threshold</code></td>
 <td><code>number</code> | <code>object</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>threshold</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/cv_pipelines/vehicle_attribute_recognition.en.md

@@ -479,6 +479,26 @@ Below are the API references for basic serving deployment and multi-language ser
 <td>Yes</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>det_threshold</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/cv_pipelines/vehicle_attribute_recognition.md

@@ -490,6 +490,23 @@ for res in output:
 <td>是</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>detThreshold</code></td>
 <td><code>number</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>det_threshold</code> 参数相关说明。</td>

+ 21 - 1
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v3.en.md

@@ -1296,6 +1296,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>visual_predict</code> method.</td>
@@ -1922,7 +1942,7 @@ public class Main {
         JsonNode resultVector = objectMapper.readTree(responseVector.body().string()).get("result");
 
         ObjectNode chatPayload = objectMapper.createObjectNode();
-        chatPayload.putArray("keyList").add(keys[0]);  
+        chatPayload.putArray("keyList").add(keys[0]);
         chatPayload.set("visualInfo", resultVisual.get("visualInfo"));
         chatPayload.put("useVectorRetrieval", true);
         chatPayload.set("vectorInfo", resultVector.get("vectorInfo"));

+ 18 - 1
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v3.md

@@ -1301,6 +1301,23 @@ for res in visual_predict_res:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>visual_predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>
@@ -1927,7 +1944,7 @@ public class Main {
         JsonNode resultVector = objectMapper.readTree(responseVector.body().string()).get("result");
 
         ObjectNode chatPayload = objectMapper.createObjectNode();
-        chatPayload.putArray("keyList").add(keys[0]);  
+        chatPayload.putArray("keyList").add(keys[0]);
         chatPayload.set("visualInfo", resultVisual.get("visualInfo"));
         chatPayload.put("useVectorRetrieval", true);
         chatPayload.set("vectorInfo", resultVector.get("vectorInfo"));

+ 20 - 0
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.en.md

@@ -1433,6 +1433,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>visual_predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction_v4.md

@@ -1636,6 +1636,23 @@ for res in visual_predict_res:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>visual_predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/OCR.en.md

@@ -1058,6 +1058,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/OCR.md

@@ -1053,6 +1053,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.en.md

@@ -1598,6 +1598,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 1
docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.md

@@ -1551,7 +1551,23 @@ for res in output:
 <td>文件类型。<code>0</code>表示PDF文件,<code>1</code>表示图像文件。若请求体无此属性,则将根据URL推断文件类型。</td>
 <td>否</td>
 </tr>
-
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 <tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/doc_preprocessor.en.md

@@ -503,6 +503,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

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

@@ -504,6 +504,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/formula_recognition.en.md

@@ -872,6 +872,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

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

@@ -873,6 +873,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/layout_parsing.en.md

@@ -1295,6 +1295,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 1
docs/pipeline_usage/tutorials/ocr_pipelines/layout_parsing.md

@@ -1330,7 +1330,23 @@ for res in output:
 <td>文件类型。<code>0</code>表示PDF文件,<code>1</code>表示图像文件。若请求体无此属性,则将根据URL推断文件类型。</td>
 <td>否</td>
 </tr>
-
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 <tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/seal_recognition.en.md

@@ -1186,6 +1186,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/seal_recognition.md

@@ -1204,6 +1204,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition.en.md

@@ -1210,6 +1210,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition.md

@@ -1156,6 +1156,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.en.md

@@ -1363,6 +1363,26 @@ To remove the page limit, please add the following configuration to the pipeline
 <td>No</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>Please refer to the description of the <code>use_doc_orientation_classify</code> parameter of the pipeline object's <code>predict</code> method.</td>

+ 17 - 0
docs/pipeline_usage/tutorials/ocr_pipelines/table_recognition_v2.md

@@ -1368,6 +1368,23 @@ for res in output:
 <td>否</td>
 </tr>
 <tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
+<tr>
 <td><code>useDocOrientationClassify</code></td>
 <td><code>boolean</code> | <code>null</code></td>
 <td>请参阅产线对象中 <code>predict</code> 方法的 <code>use_doc_orientation_classify</code> 参数相关说明。</td>

+ 20 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_anomaly_detection.en.md

@@ -382,6 +382,26 @@ Below are the API references for basic service-based deployment and examples of
 <td>The URL of a CSV file accessible by the server or the Base64-encoded content of a CSV file. The CSV file must be encoded in UTF-8.</td>
 <td>Yes</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 17 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_anomaly_detection.md

@@ -486,6 +486,23 @@ for res in output:
 <td><code>string</code></td>
 <td>CSV格式的时序异常检测结果。使用UTF-8+Base64编码。</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 </tbody>
 </table>
 <p><code>result</code>示例如下:</p>

+ 20 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification.en.md

@@ -423,6 +423,26 @@ Below are the API references for basic serving deployment and multi-language ser
 <td>The URL of a CSV file accessible by the server or the Base64-encoded content of a CSV file. The CSV file must be encoded in UTF-8.</td>
 <td>Yes</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 17 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification.md

@@ -422,6 +422,23 @@ for res in output:
 <td>服务器可访问的CSV文件的URL或CSV文件内容的Base64编码结果。CSV文件需要使用UTF-8编码。</td>
 <td>是</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 20 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_forecasting.en.md

@@ -480,6 +480,26 @@ Below are the API references for basic serving deployment and examples of multi-
 <td>The URL of a CSV file accessible by the server or the Base64-encoded content of a CSV file. The CSV file must be encoded in UTF-8.</td>
 <td>Yes</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>
+Whether to return the final visualization image and intermediate images during the processing.<br/>
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>If <code>true</code> is provided: return images.</li>
+<li>If <code>false</code> is provided: do not return any images.</li>
+<li>If this parameter is omitted from the request body, or if <code>null</code> is explicitly passed, the behavior will follow the value of <code>Serving.visualize</code> in the pipeline configuration.</li>
+</ul>
+<br/>
+For example, adding the following setting to the pipeline config file:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+will disable image return by default. This behavior can be overridden by explicitly setting the <code>visualize</code> parameter in the request.<br/>
+If neither the request body nor the configuration file is set (If <code>visualize</code> is set to <code>null</code> in the request and  not defined in the configuration file), the image is returned by default.
+</td>
+<td>No</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 17 - 0
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_forecasting.md

@@ -493,6 +493,23 @@ for res in output:
 <td>服务器可访问的CSV文件的URL或CSV文件内容的Base64编码结果。CSV文件需要使用UTF-8编码。</td>
 <td>是</td>
 </tr>
+<tr>
+<td><code>visualize</code></td>
+<td><code>boolean</code> | <code>null</code></td>
+<td>是否返回可视化结果图以及处理过程中的中间图像等。
+<ul style="margin: 0 0 0 1em; padding-left: 0em;">
+<li>传入 <code>true</code>:返回图像。</li>
+<li>传入 <code>false</code>:不返回图像。</li>
+<li>若请求体中未提供该参数或传入 <code>null</code>:遵循产线配置文件<code>Serving.visualize</code> 的设置。</li>
+</ul>
+<br/>例如,在产线配置文件中添加如下字段:<br/>
+<pre><code>Serving:
+  visualize: False
+</code></pre>
+将默认不返回图像,通过请求体中的<code>visualize</code>参数可以覆盖默认行为。如果请求体和配置文件中均未设置(或请求体传入<code>null</code>、配置文件中未设置),则默认返回图像。
+</td>
+<td>否</td>
+</tr>
 </tbody>
 </table>
 <ul>

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/anomaly_detection.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -50,7 +52,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pred = result["pred"][0].tolist()
         size = [len(pred), len(pred[0])]
         label_map = [item for sublist in pred for item in sublist]
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"].convert("RGB"))
             )

+ 5 - 1
paddlex/inference/serving/basic_serving/_pipeline_apps/doc_preprocessor.py

@@ -45,6 +45,10 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
 
         log_id = serving_utils.generate_log_id()
 
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
+
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -64,7 +68,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                 return_url=ctx.extra["return_img_urls"],
                 max_img_size=ctx.extra["max_output_img_size"],
             )
-            if ctx.config.visualize:
+            if visualize_enabled:
                 vis_imgs = {
                     "input_img": img,
                     "doc_preprocessing_img": item.img["preprocessed_img"],

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/face_recognition.py

@@ -166,7 +166,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     ) -> AIStudioResultResponse[schema.InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         image_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -211,7 +213,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["det_score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/formula_recognition.py

@@ -44,7 +44,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -61,7 +63,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         formula_rec_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/human_keypoint_detection.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -66,7 +68,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     kptScore=obj["kpt_score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/image_classification.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -54,7 +56,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         categories: List[Dict[str, Any]] = []
         for id_, name, score in zip(result["class_ids"], cat_names, result["scores"]):
             categories.append(dict(id=id_, name=name, score=score))
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/image_multilabel_classification.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -58,7 +60,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         categories: List[Dict[str, Any]] = []
         for id_, name, score in zip(result["class_ids"], cat_names, result["scores"]):
             categories.append(dict(id=id_, name=name, score=score))
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/instance_segmentation.py

@@ -51,7 +51,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -72,7 +74,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     mask=mask,
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/layout_parsing.py

@@ -46,7 +46,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -78,7 +80,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         layout_parsing_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/object_detection.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -62,7 +64,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/ocr.py

@@ -44,7 +44,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -63,7 +65,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         ocr_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 output_imgs = item.img
                 imgs = {
                     "input_img": img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/open_vocabulary_detection.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -66,7 +68,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/open_vocabulary_segmentation.py

@@ -55,7 +55,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -74,7 +76,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         ]
         mask_infos = result["mask_infos"]
 
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/pedestrian_attribute_recognition.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -69,7 +71,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["det_score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/pp_chatocrv3_doc.py

@@ -46,7 +46,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.call(
@@ -78,7 +80,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         visual_info: List[dict] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item["layout_parsing_result"].json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item["layout_parsing_result"].img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/pp_chatocrv4_doc.py

@@ -46,7 +46,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.call(
@@ -79,7 +81,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         visual_info: List[dict] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item["layout_parsing_result"].json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item["layout_parsing_result"].img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/pp_shituv2.py

@@ -161,7 +161,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     ) -> AIStudioResultResponse[schema.InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         image_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -206,7 +208,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["det_score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/pp_structurev3.py

@@ -46,7 +46,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -98,7 +100,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                 max_img_size=ctx.extra["max_output_img_size"],
             )
             md_flags = md_data["page_continuation_flags"]
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/rotated_object_detection.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -66,7 +68,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/seal_recognition.py

@@ -44,7 +44,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -67,7 +69,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         seal_rec_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/semantic_segmentation.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -50,7 +52,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pred = result["pred"][0].tolist()
         size = [len(pred), len(pred[0])]
         label_map = [item for sublist in pred for item in sublist]
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"].convert("RGB"))
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/small_object_detection.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -57,7 +59,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/table_recognition.py

@@ -44,7 +44,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -65,7 +67,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         table_rec_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/table_recognition_v2.py

@@ -44,7 +44,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         pipeline = ctx.pipeline
 
         log_id = serving_utils.generate_log_id()
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         images, data_info = await ocr_common.get_images(request, ctx)
 
         result = await pipeline.infer(
@@ -70,7 +72,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         table_rec_results: List[Dict[str, Any]] = []
         for i, (img, item) in enumerate(zip(images, result)):
             pruned_res = common.prune_result(item.json["res"])
-            if ctx.config.visualize:
+            if visualize_enabled:
                 imgs = {
                     "input_img": img,
                     **item.img,

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/ts_anomaly_detection.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.csv, aiohttp_session
         )
@@ -50,7 +52,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         output_csv = serving_utils.base64_encode(
             serving_utils.data_frame_to_bytes(result["anomaly"])
         )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"].convert("RGB"))
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/ts_classification.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.csv, aiohttp_session
         )
@@ -49,7 +51,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
 
         label = str(result["classification"].at[0, "classid"])
         score = float(result["classification"].at[0, "score"])
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"].convert("RGB"))
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/ts_forecast.py

@@ -39,7 +39,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.csv, aiohttp_session
         )
@@ -50,7 +52,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
         output_csv = serving_utils.base64_encode(
             serving_utils.data_frame_to_bytes(result["forecast"])
         )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"].convert("RGB"))
             )

+ 4 - 2
paddlex/inference/serving/basic_serving/_pipeline_apps/vehicle_attribute_recognition.py

@@ -43,7 +43,9 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
     async def _infer(request: InferRequest) -> AIStudioResultResponse[InferResult]:
         pipeline = ctx.pipeline
         aiohttp_session = ctx.aiohttp_session
-
+        visualize_enabled = (
+            request.visualize if request.visualize is not None else ctx.config.visualize
+        )
         file_bytes = await serving_utils.get_raw_bytes_async(
             request.image, aiohttp_session
         )
@@ -69,7 +71,7 @@ def create_pipeline_app(pipeline: Any, app_config: AppConfig) -> "FastAPI":
                     score=obj["det_score"],
                 )
             )
-        if ctx.config.visualize:
+        if visualize_enabled:
             output_image_base64 = serving_utils.base64_encode(
                 serving_utils.image_to_bytes(result.img["res"])
             )

+ 1 - 0
paddlex/inference/serving/schemas/anomaly_detection.py

@@ -26,6 +26,7 @@ INFER_ENDPOINT: Final[str] = "/image-anomaly-detection"
 
 class InferRequest(BaseModel):
     image: str
+    visualize: Optional[bool] = None
 
 
 class InferResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/doc_preprocessor.py

@@ -35,6 +35,7 @@ class InferRequest(ocr.BaseInferRequest):
     # consistent with the parameters of the wrapped function though.
     useDocOrientationClassify: Optional[bool] = None
     useDocUnwarping: Optional[bool] = None
+    visualize: Optional[bool] = None
 
 
 class DocPreprocessingResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/face_recognition.py

@@ -90,6 +90,7 @@ class InferRequest(BaseModel):
     recThreshold: Optional[float] = None
     hammingRadius: Optional[float] = None
     topk: Optional[int] = None
+    visualize: Optional[bool] = None
 
 
 class RecResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/formula_recognition.py

@@ -38,6 +38,7 @@ class InferRequest(ocr.BaseInferRequest):
     layoutNms: Optional[bool] = None
     layoutUnclipRatio: Optional[Union[float, Tuple[float, float]]] = None
     layoutMergeBboxesMode: Optional[str] = None
+    visualize: Optional[bool] = None
 
 
 class FormulaRecResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/human_keypoint_detection.py

@@ -36,6 +36,7 @@ INFER_ENDPOINT: Final[str] = "/human-keypoint-detection"
 class InferRequest(BaseModel):
     image: str
     detThreshold: Optional[float] = None
+    visualize: Optional[bool] = None
 
 
 class Person(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/image_classification.py

@@ -33,6 +33,7 @@ INFER_ENDPOINT: Final[str] = "/image-classification"
 class InferRequest(BaseModel):
     image: str
     topk: Optional[Annotated[int, Field(gt=0)]] = None
+    visualize: Optional[bool] = None
 
 
 class InferResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/image_multilabel_classification.py

@@ -32,6 +32,7 @@ INFER_ENDPOINT: Final[str] = "/multilabel-image-classification"
 
 class InferRequest(BaseModel):
     image: str
+    visualize: Optional[bool] = None
     threshold: Optional[
         Union[float, Dict[Union[Literal["default"], int], float], List[float]]
     ] = None

+ 1 - 0
paddlex/inference/serving/schemas/instance_segmentation.py

@@ -33,6 +33,7 @@ INFER_ENDPOINT: Final[str] = "/instance-segmentation"
 class InferRequest(BaseModel):
     image: str
     threshold: Optional[float] = None
+    visualize: Optional[bool] = None
 
 
 class Instance(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/layout_parsing.py

@@ -53,6 +53,7 @@ class InferRequest(ocr.BaseInferRequest):
     sealDetBoxThresh: Optional[float] = None
     sealDetUnclipRatio: Optional[float] = None
     sealRecScoreThresh: Optional[float] = None
+    visualize: Optional[bool] = None
 
 
 class LayoutParsingResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/object_detection.py

@@ -33,6 +33,7 @@ INFER_ENDPOINT: Final[str] = "/object-detection"
 class InferRequest(BaseModel):
     image: str
     threshold: Optional[Union[float, Dict[int, float]]] = None
+    visualize: Optional[bool] = None
 
 
 class DetectedObject(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/ocr.py

@@ -41,6 +41,7 @@ class InferRequest(ocr.BaseInferRequest):
     textDetBoxThresh: Optional[float] = None
     textDetUnclipRatio: Optional[float] = None
     textRecScoreThresh: Optional[float] = None
+    visualize: Optional[bool] = None
 
 
 class OCRResult(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/open_vocabulary_detection.py

@@ -34,6 +34,7 @@ class InferRequest(BaseModel):
     image: str
     prompt: str
     thresholds: Optional[Dict[str, float]] = None
+    visualize: Optional[bool] = None
 
 
 class DetectedObject(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/open_vocabulary_segmentation.py

@@ -34,6 +34,7 @@ class InferRequest(BaseModel):
     image: str
     prompt: List[List[float]]
     promptType: str
+    visualize: Optional[bool] = None
 
 
 class MaskInfo(BaseModel):

+ 1 - 0
paddlex/inference/serving/schemas/pedestrian_attribute_recognition.py

@@ -35,6 +35,7 @@ INFER_ENDPOINT: Final[str] = "/pedestrian-attribute-recognition"
 class InferRequest(BaseModel):
     image: str
     detThreshold: Optional[float] = None
+    visualize: Optional[bool] = None
     clsThreshold: Optional[
         Union[float, Dict[Union[Literal["default"], int], float], List[float]]
     ] = None

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