From 84b2376f0f34621ab4034045a8176b43f4280a6b Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Sun, 1 Aug 2021 16:46:43 +0800 Subject: [PATCH] add result example --- ppstructure/README.md | 22 +++++++++++++++++++++- ppstructure/README_ch.md | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ppstructure/README.md b/ppstructure/README.md index b42230a1..90cd412d 100644 --- a/ppstructure/README.md +++ b/ppstructure/README.md @@ -57,8 +57,28 @@ im_show = draw_result(image, result,font_path=font_path) im_show = Image.fromarray(im_show) im_show.save('result.jpg') ``` +#### 1.2.3 返回结果说明 +The return result of PaddleStructure is a list composed of a dict, an example is as follows + +```shell +[ + { 'type': 'Text', + 'bbox': [34, 432, 345, 462], + 'res': ([[36.0, 437.0, 341.0, 437.0, 341.0, 446.0, 36.0, 447.0], [41.0, 454.0, 125.0, 453.0, 125.0, 459.0, 41.0, 460.0]], + [('Tigure-6. The performance of CNN and IPT models using difforen', 0.90060663), ('Tent ', 0.465441)]) + } +] +``` +The description of each field in dict is as follows + +| Parameter | Description | +| --------------- | -------------| +|type|Type of image area| +|bbox|The coordinates of the image area in the original image, respectively [left upper x, left upper y, right bottom x, right bottom y]| +|res|OCR or table recognition result of image area。
Table: HTML string of the table;
OCR: A tuple containing the detection coordinates and recognition results of each single line of text| + -#### 1.2.3 Parameter Description: +#### 1.2.4 Parameter Description: | Parameter | Description | Default value | | --------------- | ---------------------------------------- | ------------------------------------------- | diff --git a/ppstructure/README_ch.md b/ppstructure/README_ch.md index c8a8b7a0..7ae55534 100644 --- a/ppstructure/README_ch.md +++ b/ppstructure/README_ch.md @@ -58,8 +58,28 @@ im_show = Image.fromarray(im_show) im_show.save('result.jpg') ``` +#### 1.2.3 返回结果说明 +PaddleStructure 的返回结果为一个dict组成的list,示例如下 + +```shell +[ + { 'type': 'Text', + 'bbox': [34, 432, 345, 462], + 'res': ([[36.0, 437.0, 341.0, 437.0, 341.0, 446.0, 36.0, 447.0], [41.0, 454.0, 125.0, 453.0, 125.0, 459.0, 41.0, 460.0]], + [('Tigure-6. The performance of CNN and IPT models using difforen', 0.90060663), ('Tent ', 0.465441)]) + } +] +``` +dict 里各个字段说明如下 + +| 字段 | 说明 | +| --------------- | -------------| +|type|图片区域的类型| +|bbox|图片区域的在原图的坐标,分别[左上角x,左上角y,右下角x,右下角y]| +|res|图片区域的OCR或表格识别结果。
表格: 表格的HTML字符串;
OCR: 一个包含各个单行文字的检测坐标和识别结果的元组| + -#### 1.2.3 参数说明 +#### 1.2.4 参数说明 | 字段 | 说明 | 默认值 | | --------------- | ---------------------------------------- | ------------------------------------------- | -- GitLab