add serving results format description

This commit is contained in:
MissPenguin 2020-07-16 13:33:59 +08:00
parent 1856aece1a
commit f076ef1e33
1 changed files with 19 additions and 0 deletions
doc/doc_ch

View File

@ -121,6 +121,25 @@ hub serving start -c deploy/hubserving/ocr_system/config.json
访问示例:
```python tools/test_hubserving.py http://127.0.0.1:8868/predict/ocr_system ./doc/imgs/```
## 返回结果格式说明
返回结果为列表list列表中的每一项为词典dict词典一共可能包含3种字段信息如下
|字段名称|数据类型|意义|
|-|-|-|
|text|str|文本内容|
|confidence|float| 文本识别置信度|
|text_region|list|文本位置坐标|
不同模块返回的字段不同,如,文本识别服务模块返回结果不含`text_region`字段,具体信息如下:
|字段名/模块名|ocr_det|ocr_rec|ocr_system|
|-|-|-|-|
|text||✔|✔|
|confidence||✔|✔|
|text_region|✔||✔|
**说明:**如果需要增加、删除、修改返回字段,可在相应模块的`module.py`文件中进行修改,完整流程参考下一节自定义修改服务模块。
## 自定义修改服务模块
如果需要修改服务逻辑,你一般需要操作以下步骤(以修改`ocr_system`为例):