Skip to content

Commit

Permalink
Merge pull request #352 from MissPenguin/develop
Browse files Browse the repository at this point in the history
add serving results format description
  • Loading branch information
MissPenguin committed Jul 16, 2020
2 parents 6764e0d + f076ef1 commit c326c3f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/doc_ch/serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ hub serving start -c deploy/hubserving/ocr_system/config.json
访问示例:
```python tools/test_hubserving.py https://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`为例):

Expand Down

0 comments on commit c326c3f

Please sign in to comment.