From ec9eb7204ee9075620ecfe1070fb444271b3ac0a Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Wed, 30 Mar 2022 11:11:22 +0000 Subject: [PATCH] update doc --- deploy/hubserving/readme.md | 14 ++++++++------ deploy/hubserving/readme_en.md | 13 +++++++------ deploy/hubserving/structure_table/module.py | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/deploy/hubserving/readme.md b/deploy/hubserving/readme.md index d38ef0ea..ff04aa8b 100755 --- a/deploy/hubserving/readme.md +++ b/deploy/hubserving/readme.md @@ -177,15 +177,17 @@ hub serving start -c deploy/hubserving/ocr_system/config.json |text|str|文本内容| |confidence|float| 文本识别置信度或文本角度分类置信度| |text_region|list|文本位置坐标| +|html|str|表格的html字符串| 不同模块返回的字段不同,如,文本识别服务模块返回结果不含`text_region`字段,具体信息如下: -| 字段名/模块名 | ocr_det | ocr_cls | ocr_rec | ocr_system | -| ---- | ---- | ---- | ---- | ---- | -|angle| | ✔ | | ✔ | -|text| | |✔|✔| -|confidence| |✔ |✔| | -|text_region| ✔| | |✔ | +| 字段名/模块名 | ocr_det | ocr_cls | ocr_rec | ocr_system | structure_table | +| ---- | ---- | ---- | ---- | ---- | ---- | +|angle| | ✔ | | ✔ | | +|text| | |✔|✔| | +|confidence| |✔ |✔| | | +|text_region| ✔| | |✔ | | +|html| | | | |✔ | **说明:** 如果需要增加、删除、修改返回字段,可在相应模块的`module.py`文件中进行修改,完整流程参考下一节自定义修改服务模块。 diff --git a/deploy/hubserving/readme_en.md b/deploy/hubserving/readme_en.md index 2e5268f2..f8fd3fa1 100755 --- a/deploy/hubserving/readme_en.md +++ b/deploy/hubserving/readme_en.md @@ -187,12 +187,13 @@ The returned result is a list. Each item in the list is a dict. The dict may con The fields returned by different modules are different. For example, the results returned by the text recognition service module do not contain `text_region`. The details are as follows: -| field name/module name | ocr_det | ocr_cls | ocr_rec | ocr_system | -| ---- | ---- | ---- | ---- | ---- | -|angle| | ✔ | | ✔ | -|text| | |✔|✔| -|confidence| |✔ |✔| | -|text_region| ✔| | |✔ | +| field name/module name| ocr_det | ocr_cls | ocr_rec | ocr_system | structure_table | +| ---- | ---- | ---- | ---- | ---- | ---- | +|angle| | ✔ | | ✔ | | +|text| | |✔|✔| | +|confidence| |✔ |✔| | | +|text_region| ✔| | |✔ | | +|html| | | | |✔ | **Note:** If you need to add, delete or modify the returned fields, you can modify the file `module.py` of the corresponding module. For the complete process, refer to the user-defined modification service module in the next section. diff --git a/deploy/hubserving/structure_table/module.py b/deploy/hubserving/structure_table/module.py index d9af4a7d..106abe0c 100644 --- a/deploy/hubserving/structure_table/module.py +++ b/deploy/hubserving/structure_table/module.py @@ -109,7 +109,7 @@ class TableSystem(hub.Module): elapse = time.time() - starttime logger.info("Predict time: {}".format(elapse)) - all_results.append(pred_html) + all_results.append({'html': pred_html}) return all_results @serving -- GitLab