mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-11-25 17:29:39 +08:00
docs(serving): document returnMarkdownImages and image URL return mode (#18060)
* docs(serving): document returnMarkdownImages and image URL return mode
Mirror the PaddleX-side schema change in the version3.x VL and
PP-StructureV3 docs (zh/en):
- Add returnMarkdownImages to the request parameter tables (both VL
endpoints).
- Note that markdown.images is "null or omitted" when the flag is false
— PaddleX serving uses response_model_exclude_none, so the field is
actually absent rather than explicitly null.
- Above each LayoutParsingResult element schema, add a one-paragraph
note explaining that response image fields (outputImages, inputImage,
markdown.images) switch from base64 strings to pre-signed URLs when
the server is configured to return URLs.
Also add an image-URL-return-mode section to docs/version3.x/deployment/
serving.{md,en.md}, which previously did not explain how to configure
the server to return images as pre-signed BOS URLs instead of inline
base64.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): address review feedback on URL-return scope and field descriptions
Refining the docs added in the previous commit based on review feedback
on this PR (#18060):
- Response field descriptions for outputImages, inputImage, exports, and
markdown.images previously hard-coded "Base64-encoded". They now read
"Base64 by default; pre-signed URL when URL-return mode is enabled"
(or the zh equivalent), so the field-level descriptions match what the
server actually returns once return_img_urls is enabled.
- The URL-return section in docs/version3.x/deployment/serving.{md,
en.md} is renamed from "Returning Images as URLs" to "Returning
Response Files as URLs" and now covers exports (docx, ...) — the same
return_urls / file_storage chain is used by build_pipeline_exports,
so the previous image-only framing was misleading. A note also points
out that the configuration key is historically named return_img_urls
but currently controls every Base64-inlined file field in the
response, not just images.
- BOS configuration wording is aligned with the existing PaddleOCR-VL.md
guidance: ak/sk are no longer expanded to "Access Key" / "Secret Key"
(those expansions are not the Baidu Cloud terminology), and the
section now links to the official Baidu Intelligent Cloud BOS docs.
- The preamble above each LayoutParsingResult element schema in the VL
and PP-StructureV3 pipeline docs (zh/en) is updated from "image
fields" to "image and file fields", lists exports alongside the image
fields, and points to the renamed serving section.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): align BOS AK/SK wording with PaddleOCR-VL
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): generalize return-URL section in PaddleOCR-VL pipeline doc
Broaden the section from image-only to all binary response content (images and exported files such as docx), and align the title with the serving deployment doc. Config field and YAML are unchanged.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): note URL-return mode in remaining OCR pipeline schemas
Add the reference-style URL-return note (pointing at the serving deployment doc's "以 URL 形式返回响应文件" section) to the serving response schemas of OCR, formula_recognition, seal_recognition, table_recognition_v2, PP-ChatOCRv4, and PP-DocTranslation, matching PP-StructureV3. Binary fields that fall back to Base64 are annotated as becoming pre-signed URLs when URL-return mode is on.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): broaden VL URL-return config section beyond images
The §4.4.2 'Configure ... URLs' config example still framed URL return as
image-only ('配置返回图像 URL', visualization/Markdown images). return_urls
covers all Base64-inlined response fields (outputImages, inputImage,
markdown.images, and exports), so reword the title/scope to match the
response-field note above it and the serving guide section. Review feedback.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): rename URL-return section to 二进制内容 / Binary Content
Per review r3308333339: the section covers returning binary response
content (images and files such as exports) as URLs, so rename the title
from '响应文件 / Response Files' to '二进制内容 / Binary Content' and update
all cross-references (and the VL config subsection) to match.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): address URL-return review feedback
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
---------
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
This commit is contained in:
1 parent
9f704bc6ab
commit
d4b5b09865
18 files changed
+164
-58
No files matched your search
@@ -94,3 +94,25 @@ The <b>"Development Integration/Deployment"</b> section in the PaddleOCR pipelin
|
||||
Please refer to the [PaddleX Serving Guide](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_deploy/serving.html#2). More information about PaddleX pipeline configuration files can be found in [Using PaddleX Pipeline Configuration Files](../../paddleocr_and_paddlex.en.md#3-using-paddlex-pipeline-configuration-files).
|
||||
|
||||
It should be noted that, due to the lack of fine-grained optimization and other reasons, the current high-stability serving deployment solution provided by PaddleOCR may not match the performance of the 2.x version based on PaddleServing. However, this new solution fully supports the PaddlePaddle 3.0 framework. We will continue to optimize it and consider introducing more performant deployment solutions in the future.
|
||||
|
||||
## 3. Returning Binary Content as URLs
|
||||
|
||||
By default, both basic serving and high-stability serving return images and other binary content in the response inline as Base64-encoded strings. When the response contains large images or a multi-page PDF, Base64 encoding can significantly inflate the payload; you can configure the service to return URLs instead. Enable it in the `Serving` section of the pipeline configuration file (`return_urls` is a top-level switch; object-storage settings live under `Serving.extra`) to return those fields as pre-signed URLs:
|
||||
|
||||
```yaml
|
||||
Serving:
|
||||
return_urls: true
|
||||
extra:
|
||||
file_storage:
|
||||
type: bos
|
||||
endpoint: <BOS endpoint, e.g. https://bj.bcebos.com>
|
||||
ak: xxx
|
||||
sk: xxx
|
||||
bucket_name: <bucket name>
|
||||
url_expires_in: 3600 # Pre-signed URL lifetime in seconds; -1 means no expiry
|
||||
```
|
||||
|
||||
- Basic serving: write the configuration to the pipeline config file passed to `paddlex --serve --pipeline`.
|
||||
- High-stability serving: the same configuration applies — write it to `server/pipeline_config.yaml` inside the SDK and restart the container.
|
||||
|
||||
Currently, URL return is only supported by the `bos` (Baidu Intelligent Cloud object storage) backend. URL return is controlled by the top-level `Serving.return_urls` field, which applies to every Base64-inlined file field in the response (not just images). For the full configuration reference, notes, and use cases, see [PaddleX Serving Guide - Returning Binary Content as URLs](https://paddlepaddle.github.io/PaddleX/latest/en/pipeline_deploy/serving.html#3). See the [Baidu Intelligent Cloud documentation](https://cloud.baidu.com/doc/BOS/index.html) for AK/SK retrieval.
|
||||
@@ -94,3 +94,25 @@ PaddleOCR 产线使用教程中的 <b>“开发集成/部署”</b> 部分提供
|
||||
请参考 [PaddleX 服务化部署指南](https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/serving.html#2)。在 [使用 PaddleX 产线配置文件](../../paddleocr_and_paddlex.md#3-paddlex) 中,可以了解关于 PaddleX 产线配置文件的更多信息。
|
||||
|
||||
需要说明的是,由于缺乏细粒度优化等原因,当前 PaddleOCR 提供的高稳定性服务化部署方案在性能上可能不及 2.x 版本基于 PaddleServing 的方案;但该新方案已对飞桨 3.0 框架提供了全面支持,我们也将持续优化,后续考虑推出性能更优的部署方案。
|
||||
|
||||
## 3. 以 URL 形式返回二进制内容
|
||||
|
||||
基础服务化与高稳定性服务化默认以 Base64 编码内联返回响应中的图像等二进制内容。当响应中包含较大图像或多页 PDF 时,Base64 会显著增加响应体积,可配置服务返回 URL。在产线配置文件的 `Serving` 节中开启(`return_urls` 为顶层字段,对象存储相关配置位于 `Serving.extra`),将相应字段改为以预签名 URL 返回:
|
||||
|
||||
```yaml
|
||||
Serving:
|
||||
return_urls: true
|
||||
extra:
|
||||
file_storage:
|
||||
type: bos
|
||||
endpoint: <BOS 访问域名,例如 https://bj.bcebos.com>
|
||||
ak: xxx
|
||||
sk: xxx
|
||||
bucket_name: <存储空间名称>
|
||||
url_expires_in: 3600 # 预签名 URL 有效期(秒),-1 表示不过期
|
||||
```
|
||||
|
||||
- 基础服务化:上述配置写入 `paddlex --serve --pipeline` 指定的产线配置文件。
|
||||
- 高稳定性服务化:共用同一组配置项,写入 SDK 内的 `server/pipeline_config.yaml` 后重启容器即可。
|
||||
|
||||
当前 URL 返回仅支持 `bos`(百度智能云对象存储)后端。URL 返回由顶层字段 `Serving.return_urls` 控制,作用于响应中所有 Base64 内联文件字段(不仅是图像)。完整配置项、注意事项与适用场景参见 [PaddleX 服务化部署指南 - 以 URL 形式返回二进制内容](https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/serving.html#3);AK/SK 获取等更多信息,请参考 [百度智能云官方文档](https://cloud.baidu.com/doc/BOS/index.html)。
|
||||
@@ -2027,6 +2027,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image fields in the element schema below (e.g. <code>ocrImage</code>, <code>docPreprocessingImage</code>, <code>inputImage</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>ocrResults</code> is an <code>object</code> with the following attributes:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2045,17 +2046,17 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>ocrImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>OCR result image with detected text regions highlighted. JPEG format, Base64-encoded.</td>
|
||||
<td>OCR result image with detected text regions highlighted. JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>docPreprocessingImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>Visualization of preprocessing results. JPEG format, Base64-encoded.</td>
|
||||
<td>Visualization of preprocessing results. JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>Input image. JPEG format, Base64-encoded.</td>
|
||||
<td>Input image. JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1999,6 +1999,7 @@ for res in result:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像的字段(如 <code>ocrImage</code>、<code>docPreprocessingImage</code>、<code>inputImage</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>ocrResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2017,17 +2018,17 @@ for res in result:
|
||||
<tr>
|
||||
<td><code>ocrImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>OCR结果图,其中标注检测到的文本位置。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>OCR结果图,其中标注检测到的文本位置。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>docPreprocessingImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>可视化结果图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>可视化结果图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -3063,6 +3063,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>layoutParsingResults</code> is an <code>object</code> with the following properties:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -3086,7 +3087,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>Input image. The image is in JPEG format and encoded using Base64.</td>
|
||||
<td>Input image. The image is in JPEG format and encoded using Base64 by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2894,6 +2894,7 @@ for res in visual_predict_res:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像的字段(如 <code>outputImages</code>、<code>inputImage</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>layoutParsingResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2917,7 +2918,7 @@ for res in visual_predict_res:
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -3042,6 +3042,7 @@ By default, images will not be returned; the <code>visualize</code> parameter in
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image and other binary file fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>, <code>markdown.images</code>, <code>exports</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>layoutParsingResults</code> is an <code>object</code> with the following properties:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -3065,17 +3066,17 @@ By default, images will not be returned; the <code>visualize</code> parameter in
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>See the <code>img</code> property description in the pipeline prediction results. Images are in JPEG format and Base64 encoded.</td>
|
||||
<td>See the <code>img</code> property description in the pipeline prediction results. Images are in JPEG format and Base64 encoded by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>Input image. JPEG format, Base64 encoded.</td>
|
||||
<td>Input image. JPEG format, Base64 encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Optional additional exports such as <code>docx</code>, present only when <code>outputFormats</code> is requested. The <code>content</code> field is Base64-encoded file bytes.</td>
|
||||
<td>Optional additional exports such as <code>docx</code>, present only when <code>outputFormats</code> is requested. The <code>content</code> field is Base64-encoded file bytes by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -3097,7 +3098,7 @@ By default, images will not be returned; the <code>visualize</code> parameter in
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>Mapping from relative Markdown image paths to Base64-encoded image data.</td>
|
||||
<td>Mapping from relative Markdown image paths to Base64-encoded image data by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>isStart</code></td>
|
||||
|
||||
@@ -3059,6 +3059,7 @@ PP-DocTranslation 预测的流程、API 说明、产出说明如下:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像等二进制文件的字段(如 <code>outputImages</code>、<code>inputImage</code>、<code>markdown.images</code>、<code>exports</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>layoutParsingResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
|
||||
@@ -3083,17 +3084,17 @@ PP-DocTranslation 预测的流程、API 说明、产出说明如下:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>可选的 <code>docx</code> 等附加导出,仅当请求 <code>outputFormats</code> 时出现。其中 <code>content</code> 为文件内容的Base64编码。</td>
|
||||
<td>可选的 <code>docx</code> 等附加导出,仅当请求 <code>outputFormats</code> 时出现。其中 <code>content</code> 为文件内容的Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -3115,7 +3116,7 @@ PP-DocTranslation 预测的流程、API 说明、产出说明如下:
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>Markdown图片相对路径和Base64编码图像的键值对。</td>
|
||||
<td>Markdown图片相对路径和Base64编码图像的键值对;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>isStart</code></td>
|
||||
|
||||
@@ -990,7 +990,9 @@ If you choose `transformers` as the inference engine, make sure the Transformers
|
||||
|
||||
```bash
|
||||
# Use the transformers engine for inference
|
||||
paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --engine transformers
|
||||
# Some models are still being supported. For inference, please disable formula recognition and replace the wireless table structure recognition model using the following command:
|
||||
paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png \
|
||||
--engine transformers --use_formula_recognition False --wireless_table_structure_recognition_model_name SLANeXt_wireless
|
||||
```
|
||||
|
||||
<details><summary><b>Command line supports more parameters. Click to expand for detailed parameter descriptions</b></summary>
|
||||
@@ -1696,8 +1698,11 @@ If you choose `transformers` as the inference engine, make sure the Transformers
|
||||
```python
|
||||
from paddleocr import PPStructureV3
|
||||
|
||||
# Some models are still being supported. For inference, please disable formula recognition and replace the wireless table structure recognition model using the following code:
|
||||
pipeline = PPStructureV3(
|
||||
engine="transformers",
|
||||
use_formula_recognition=False,
|
||||
wireless_table_structure_recognition_model_name="SLANeXt_wireless",
|
||||
)
|
||||
# pipeline = PPStructureV3(lang="en") # Set the lang parameter to use the English text recognition model. For other supported languages, see Section 5: Appendix. By default, both Chinese and English text recognition models are enabled.
|
||||
# pipeline = PPStructureV3(use_doc_orientation_classify=True) # Use use_doc_orientation_classify to enable/disable document orientation classification model
|
||||
@@ -3283,6 +3288,12 @@ To remove the page limit, please add the following configuration to the pipeline
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>Whether to return the images referenced in the Markdown. Default <code>true</code>; when set to <code>false</code>, <code>markdown.images</code> is <code>null</code> or omitted and the server skips image encoding / URL upload.</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>Optional list of extra formats to return. Currently only <code>"docx"</code> is supported.</td>
|
||||
@@ -3334,6 +3345,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image and other binary file fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>, <code>markdown.images</code>, <code>exports</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>layoutParsingResults</code> is an <code>object</code> with the following attributes:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -3357,17 +3369,17 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format and are Base64-encoded.</td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format, Base64-encoded by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>The input image. The image is in JPEG format and is Base64-encoded.</td>
|
||||
<td>The input image. The image is in JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Optional additional exports when <code>outputFormats</code> is present—for example, <code>{"docx": {"content": "..."}}</code>, where <code>content</code> is the Base64-encoded file content.</td>
|
||||
<td>Optional additional exports when <code>outputFormats</code> is present—for example, <code>{"docx": {"content": "..."}}</code>, where <code>content</code> is the Base64-encoded file content by default, or a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -3388,8 +3400,8 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>A key-value pair of relative paths of Markdown images and Base64-encoded images.</td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>A key-value pair of relative Markdown image paths and their image data. Values are Base64-encoded by default; returned as pre-signed URLs when URL-return mode is enabled. The field is <code>null</code> or omitted when <code>returnMarkdownImages</code> is <code>false</code> in the request.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>isStart</code></td>
|
||||
|
||||
@@ -1070,7 +1070,9 @@ paddleocr pp_structurev3 -i ./pp_structure_v3_demo.png --device gpu
|
||||
|
||||
```bash
|
||||
# 使用 transformers 引擎进行推理
|
||||
paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --engine transformers
|
||||
# 部分模型尚在支持中,推理时需关闭公式识别功能并更换无线表格结构识别模型,请使用以下命令:
|
||||
paddleocr pp_structurev3 -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png \
|
||||
--engine transformers --use_formula_recognition False --wireless_table_structure_recognition_model_name SLANeXt_wireless
|
||||
```
|
||||
|
||||
<details><summary><b>命令行支持更多参数设置,点击展开以查看命令行参数的详细说明</b></summary>
|
||||
@@ -1668,8 +1670,11 @@ for res in output:
|
||||
```python
|
||||
from paddleocr import PPStructureV3
|
||||
|
||||
# 部分模型尚在支持中,推理时需关闭公式识别功能并更换无线表格结构识别模型,请使用以下代码:
|
||||
pipeline = PPStructureV3(
|
||||
engine="transformers",
|
||||
use_formula_recognition=False,
|
||||
wireless_table_structure_recognition_model_name="SLANeXt_wireless",
|
||||
)
|
||||
# pipeline = PPStructureV3(lang="en") # 将 lang 参数设置为使用英文文本识别模型。对于其他支持的语言,请参阅第5节:附录部分。默认配置为中英文模型。
|
||||
# pipeline = PPStructureV3(use_doc_orientation_classify=True) # 通过 use_doc_orientation_classify 指定是否使用文档方向分类模型
|
||||
@@ -3173,6 +3178,12 @@ for item in markdown_images:
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>是否在响应中返回 Markdown 中引用的图片。默认为 <code>true</code>;设为 <code>false</code> 时 <code>markdown.images</code> 为 <code>null</code> 或不出现,且服务端跳过图片编码 / URL 上传。</td>
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>可选。附加导出格式列表,默认不返回。当前仅支持 <code>"docx"</code>。</td>
|
||||
@@ -3221,6 +3232,7 @@ for item in markdown_images:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像等二进制文件的字段(如 <code>outputImages</code>、<code>inputImage</code>、<code>markdown.images</code>、<code>exports</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>layoutParsingResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -3244,17 +3256,17 @@ for item in markdown_images:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为 JPEG 格式,默认使用 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为 JPEG 格式,默认使用 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>可选的附加导出结果。仅当请求中包含 <code>outputFormats</code> 时出现,例如 <code>{"docx": {"content": "..."}}</code>,其中 <code>content</code> 为文件内容的Base64编码。</td>
|
||||
<td>可选的附加导出结果。仅当请求中包含 <code>outputFormats</code> 时出现,例如 <code>{"docx": {"content": "..."}}</code>,其中 <code>content</code> 默认为文件内容的 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -3275,8 +3287,8 @@ for item in markdown_images:
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>Markdown图片相对路径和Base64编码图像的键值对。</td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Markdown 图片相对路径与对应图像的键值对。图像默认为 Base64 编码字符串;启用 URL 返回模式时为预签名 URL。当请求中 <code>returnMarkdownImages</code> 为 <code>false</code> 时该字段为 <code>null</code> 或不出现。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>isStart</code></td>
|
||||
|
||||
@@ -2477,6 +2477,12 @@ Below are the API reference and examples of multi-language service invocation:
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>Whether to return the images referenced in the Markdown. Default <code>true</code>; when set to <code>false</code>, <code>markdown.images</code> is <code>null</code> or omitted and the server skips image encoding / URL upload.</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>Optional. List of extra document formats to return. By default, no extra formats are returned. Currently only <code>"docx"</code> is supported.</td>
|
||||
@@ -2521,6 +2527,7 @@ Below are the API reference and examples of multi-language service invocation:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image and other binary file fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>, <code>markdown.images</code>, <code>exports</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>layoutParsingResults</code> is an <code>object</code> with the following attributes:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2544,17 +2551,17 @@ Below are the API reference and examples of multi-language service invocation:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code>|<code>null</code></td>
|
||||
<td>Refer to the <code>img</code> property description of the prediction results. The image is in JPEG format and encoded using Base64.</td>
|
||||
<td>Refer to the <code>img</code> property description of the prediction results. The image is in JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code>|<code>null</code></td>
|
||||
<td>Input image. The image is in JPEG format and encoded using Base64.</td>
|
||||
<td>Input image. The image is in JPEG format, Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Optional additional exports. Present only when <code>outputFormats</code> is set. Example: <code>{"docx": {"content": "..."}}</code>, where <code>content</code> is the Base64-encoded file content.</td>
|
||||
<td>Optional additional exports. Present only when <code>outputFormats</code> is set. Example: <code>{"docx": {"content": "..."}}</code>, where <code>content</code> is the Base64-encoded file content by default, or a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -2575,8 +2582,8 @@ Below are the API reference and examples of multi-language service invocation:
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>Key-value pairs of relative paths to Markdown images and Base64-encoded images.</td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Key-value pairs of relative paths to Markdown images and their image data. Values are Base64-encoded by default; returned as pre-signed URLs when URL-return mode is enabled. The field is <code>null</code> or omitted when <code>returnMarkdownImages</code> is <code>false</code> in the request.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -2637,6 +2644,12 @@ Below are the API reference and examples of multi-language service invocation:
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>Whether to return the images referenced in the Markdown. Default <code>true</code>; when set to <code>false</code>, <code>markdown.images</code> is <code>null</code> or omitted and the server skips image encoding / URL upload.</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>Optional extra export formats; same meaning as <code>outputFormats</code> on <code>infer</code>. Only <code>"docx"</code> is supported.</td>
|
||||
@@ -3284,9 +3297,9 @@ Serving:
|
||||
|
||||
Additionally, you can set the `visualize` field to `false` in the request body to disable visualization for a single request.
|
||||
|
||||
**Configure Return of Image URLs**
|
||||
**Configure Returning Binary Content as URLs**
|
||||
|
||||
For visualized result images and images included in Markdown, the service returns them in Base64 encoding by default. To return images as URLs instead, add the following configuration to the pipeline configuration file (`Serving` is a top-level field):
|
||||
By default, the service returns images and other binary content in the response inline as Base64. To return them as URLs instead, add the following configuration to the pipeline configuration file (`Serving` is a top-level field):
|
||||
|
||||
```yaml
|
||||
Serving:
|
||||
@@ -3302,11 +3315,11 @@ Serving:
|
||||
url_expires_in: 3600
|
||||
```
|
||||
|
||||
Currently, storing generated images in Baidu Intelligent Cloud Object Storage (BOS) and returning URLs is supported. The parameters are described as follows:
|
||||
Currently, storing generated files in Baidu Intelligent Cloud Object Storage (BOS) and returning URLs is supported. The parameters are described as follows:
|
||||
|
||||
- `endpoint`: Access domain name (required).
|
||||
- `ak`: Baidu Intelligent Cloud Access Key (required).
|
||||
- `sk`: Baidu Intelligent Cloud Secret Key (required).
|
||||
- `ak`: Baidu Intelligent Cloud AK (required).
|
||||
- `sk`: Baidu Intelligent Cloud SK (required).
|
||||
- `bucket_name`: Storage bucket name (required).
|
||||
- `key_prefix`: Unified prefix for object keys.
|
||||
- `connection_timeout_in_mills`: Request timeout in milliseconds.
|
||||
|
||||
@@ -2239,6 +2239,12 @@ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>是否在响应中返回 Markdown 中引用的图片。默认为 <code>true</code>;设为 <code>false</code> 时 <code>markdown.images</code> 为 <code>null</code> 或不出现,且服务端跳过图片编码 / URL 上传。</td>
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>可选。需要额外返回的文档格式列表。默认不返回任何附加格式。当前仅支持 <code>"docx"</code>。</td>
|
||||
@@ -2287,6 +2293,7 @@ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像等二进制文件的字段(如 <code>outputImages</code>、<code>inputImage</code>、<code>markdown.images</code>、<code>exports</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>layoutParsingResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2310,17 +2317,17 @@ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见预测结果的 <code>img</code> 属性说明。图像为 JPEG 格式,默认使用 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为 JPEG 格式,默认使用 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>exports</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>可选的附加导出结果。仅当请求体中包含 <code>outputFormats</code> 且列出相应格式时出现。例如 <code>{"docx": {"content": "..."}}</code>,其中 <code>content</code> 为文件内容的Base64编码。</td>
|
||||
<td>可选的附加导出结果。仅当请求体中包含 <code>outputFormats</code> 且列出相应格式时出现。例如 <code>{"docx": {"content": "..."}}</code>,其中 <code>content</code> 默认为文件内容的 Base64 编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -2341,8 +2348,8 @@ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>images</code></td>
|
||||
<td><code>object</code></td>
|
||||
<td>Markdown图片相对路径和Base64编码图像的键值对。</td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Markdown 图片相对路径与对应图像的键值对。图像默认为 Base64 编码字符串;启用 URL 返回模式时为预签名 URL。当请求中 <code>returnMarkdownImages</code> 为 <code>false</code> 时该字段为 <code>null</code> 或不出现。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -2402,6 +2409,12 @@ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>returnMarkdownImages</code></td>
|
||||
<td><code>boolean</code></td>
|
||||
<td>是否在响应中返回 Markdown 中引用的图片。默认为 <code>true</code>;设为 <code>false</code> 时 <code>markdown.images</code> 为 <code>null</code> 或不出现,且服务端跳过图片编码 / URL 上传。</td>
|
||||
<td>否</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>outputFormats</code></td>
|
||||
<td><code>array</code> | <code>null</code></td>
|
||||
<td>可选。附加导出格式,含义与 <code>infer</code> 中的 <code>outputFormats</code> 相同。当前仅支持 <code>"docx"</code>。</td>
|
||||
@@ -3046,9 +3059,9 @@ Serving:
|
||||
|
||||
此外,也可在请求体中设置 `visualize` 字段为 `false`,以针对单次请求禁用可视化。
|
||||
|
||||
**配置返回图像 URL**
|
||||
**配置以 URL 形式返回二进制内容**
|
||||
|
||||
对于可视化结果图及 Markdown 中包含的图像,服务默认以 Base64 编码返回。如需以 URL 形式返回图像,可在产线配置文件中添加如下配置(`Serving` 为顶层字段):
|
||||
服务默认以 Base64 编码内联返回响应中的图像等二进制内容。如需改为以 URL 形式返回,可在产线配置文件中添加如下配置(`Serving` 为顶层字段):
|
||||
|
||||
```yaml
|
||||
Serving:
|
||||
@@ -3064,7 +3077,7 @@ Serving:
|
||||
url_expires_in: 3600
|
||||
```
|
||||
|
||||
目前支持将生成的图像存储至百度智能云对象存储(BOS)并返回 URL。相关参数说明如下:
|
||||
目前支持将生成的文件存储至百度智能云对象存储(BOS)并返回 URL。相关参数说明如下:
|
||||
|
||||
- `endpoint`:访问域名,必须配置。
|
||||
- `ak`:百度智能云 AK,必须配置。
|
||||
|
||||
@@ -1487,6 +1487,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>formulaRecResults</code> is an <code>object</code> with the following attributes:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -1506,12 +1507,12 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format and are Base64-encoded.</td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format and are Base64-encoded by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code> | <code>null</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>The input image. The image is in JPEG format and is Base64-encoded.</td>
|
||||
<td>The input image. The image is in JPEG format and is Base64-encoded by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1421,6 +1421,7 @@ for res in output:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像的字段(如 <code>outputImages</code>、<code>inputImage</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>formulaRecResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -1439,12 +1440,12 @@ for res in output:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见产线预测结果的<code>img</code>属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见产线预测结果的<code>img</code>属性说明。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code> | <code>null</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1970,6 +1970,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>sealRecResults</code> is an <code>object</code> with the following properties:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -1988,12 +1989,12 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format and encoded in Base64.</td>
|
||||
<td>See the description of the <code>img</code> attribute of the result of the pipeline prediction. The images are in JPEG format and encoded in Base64 by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>The input image. The image is in JPEG format and encoded in Base64.</td>
|
||||
<td>The input image. The image is in JPEG format and encoded in Base64 by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></details>
|
||||
|
||||
@@ -1968,6 +1968,7 @@ for res in output:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像的字段(如 <code>outputImages</code>、<code>inputImage</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>sealRecResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -1986,12 +1987,12 @@ for res in output:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></details>
|
||||
|
||||
@@ -2258,6 +2258,7 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Image fields in the element schema below (e.g. <code>outputImages</code>, <code>inputImage</code>) are returned inline as Base64 strings by default; when the server is configured to return URLs, those values become pre-signed URLs while the field types remain unchanged. See the "Returning Binary Content as URLs" section of the <a href="../inference_deployment/serving/serving.en.md">Serving Deployment Guide</a> for configuration.</p>
|
||||
<p>Each element in <code>tableRecResults</code> is an <code>object</code> with the following properties:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2276,12 +2277,12 @@ If neither the request body nor the configuration file is set (If <code>visualiz
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>Refer to the <code>img</code> property description of the model prediction results. The images are in JPEG format and encoded in Base64.</td>
|
||||
<td>Refer to the <code>img</code> property description of the model prediction results. The images are in JPEG format and encoded in Base64 by default; returned as pre-signed URLs when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>Input image. The image is in JPEG format and encoded in Base64.</td>
|
||||
<td>Input image. The image is in JPEG format and encoded in Base64 by default; returned as a pre-signed URL when URL-return mode is enabled.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></details>
|
||||
|
||||
@@ -2249,6 +2249,7 @@ for res in output:
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>下表中涉及图像的字段(如 <code>outputImages</code>、<code>inputImage</code>)默认以 Base64 字符串内联返回;当服务端开启 URL 返回模式时,相应字段的值变为预签名 URL,字段类型保持不变。配置方式参见 <a href="../inference_deployment/serving/serving.md">服务化部署</a>「以 URL 形式返回二进制内容」一节。</p>
|
||||
<p><code>tableRecResults</code>中的每个元素为一个<code>object</code>,具有如下属性:</p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2267,12 +2268,12 @@ for res in output:
|
||||
<tr>
|
||||
<td><code>outputImages</code></td>
|
||||
<td><code>object</code> | <code>null</code></td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>参见产线预测结果的 <code>img</code> 属性说明。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inputImage</code></td>
|
||||
<td><code>string</code> | <code>null</code></td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码。</td>
|
||||
<td>输入图像。图像为JPEG格式,使用Base64编码;启用 URL 返回模式时为预签名 URL。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></details>
|
||||
|
||||
Reference in new issue
Block a user