Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Readme of tools #192

Merged
merged 8 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions appbuilder/core/components/animal_recognize/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# 动物识别 (Animal Recognition)

## 简介
动物识别 (Animal Recognition) 可用于识别一张图片,即对于输入的一张图片(可正常解码,且长宽比较合适),输出动物识别结果。
动物识别 (Animal Recognition) 支持对于输入的一张图片(可正常解码),输出动物识别结果。

### 功能介绍
* 识别动物名称

识别近八千种动物,接口返回动物名称、置信度信息,支持自定义返回结果数;

### 特色优势
* 可识别近八千种动物,接口返回动物名称,并可获取识别结果对应的百科信息;
识别近八千种动物,接口返回动物名称、置信度信息,支持自定义返回结果数, 并可获取识别结果对应的百科信息;

### 应用场景
* 拍照识图
Expand All @@ -19,6 +16,13 @@

## 基本用法

我们选取一张可爱的大熊猫照片,使用动物识别组件进行识别。


![大熊猫](./image/animal_recognize_test.png)



下面是动物识别的代码示例:
```python
import os
Expand Down Expand Up @@ -99,10 +103,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
}
```

### 错误码
| 错误码 | 描述 |
|-----|----|

## 高级用法

目前该模块仅提供基础的动物识别功能。
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions appbuilder/core/components/asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ content_data = {"audio_format": "pcm", "raw_audio": audio_data, "rate": 16000}
msg = appbuilder.Message(content_data)
out = asr.run(msg)
print(out.content)

# {'result': ['北京科技馆。']}
```
## 参数说明

Expand Down
7 changes: 4 additions & 3 deletions appbuilder/core/components/dish_recognize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
## 基本用法
通过如下示例代码可以快速开始使用菜品识别组件:

示例图片为:

![菜品识别示例图片](./image/dish_recognize_test.jpg)

```python
import os
import requests
Expand Down Expand Up @@ -68,9 +72,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
{"result": [{"name": "剁椒鱼头", "calorie": "127"}]}
```

### 错误码
|错误码|描述|
|------|---|

## 更新记录和贡献
* 菜品识别 (2024-01)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions appbuilder/core/components/doc_crop_enhance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
## 基本用法

下面是文档矫正增强代码示例:

示例图片为

![示例图片](./image/doc_enhance_test.png)

```python
import os
import appbuilder
Expand All @@ -37,6 +42,7 @@ doc_crop_enhance = appbuilder.DocCropEnhance()
# 执行操作并获取结果
out = doc_crop_enhance.run(appbuilder.Message(content={"raw_image": raw_image}),enhance_type=3)
print(out.content)
# {"image_processed": "...", 'points': [{'y': 1371, 'x': 0}, {'x': 0, 'y': 0}, {'x': 997, 'y': 0}, {'x': 994, 'y': 1371}]}
```


Expand Down Expand Up @@ -78,9 +84,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
]
}
```
### 错误码
| 错误码 | 描述 |
|-----|----|

## 高级用法

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions appbuilder/core/components/general_ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

以下是一个简单的例子来演示如何开始使用GeneralOCR组件:

示例图片为![示例图片](./image/general_ocr_test.png)

```python
import os
import appbuilder
Expand Down Expand Up @@ -101,9 +103,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"
]
}
```
### 错误码
| 错误码 | 描述 |
|-----|----|

## 高级用法

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions appbuilder/core/components/handwrite_ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
## 基本用法

下面是手写文字识别的代码示例:

示例图片为 ![示例图片](./image/test_handwrite_ocr.jpg)

```python
import os
import requests
Expand Down Expand Up @@ -140,9 +143,6 @@ os.environ["APPBUILDER_TOKEN"] = "..."
}
```

### 错误码
|错误码|描述|
|------|---|

## 高级用法
目前该模块仅提供基础的手写体识别。
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions appbuilder/core/components/image_understand/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
## 基本用法

下面是图像内容理解的代码示例:

示例图片为:![示例图片](./image/test_image_understand.jpeg)

```python
import os
import appbuilder
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions appbuilder/core/components/landmark_recognize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
## 基本用法

下面是地标识别的代码示例:

示例图片为:![示例图片](./image/landmark_test.jpeg)

```python
import os

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion appbuilder/core/components/mix_card_ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
## 基本用法

下面是身份证混贴识别的代码示例:

示例图片为:![示例图片](./image/test_mix_card_ocr.jpeg)

```python
import os
import requests
Expand All @@ -40,7 +43,8 @@ mix_card_ocr = appbuilder.MixCardOCR()
out = mix_card_ocr.run(inp)
# 打印识别结果
print(out.content)


# {'front': {'fields': [{'key': '出生', 'value': '19920225', 'position': {'left': 620, 'top': 218, 'width': 239, 'height': 30}}, {'key': '性别', 'value': '女', 'position': {'left': 616, 'top': 164, 'width': 25, 'height': 30}}, {'key': '民族', 'value': '汉', 'position': {'left': 766, 'top': 164, 'width': 29, 'height': 30}}, {'key': '姓名', 'value': '姚佳', 'position': {'left': 621, 'top': 102, 'width': 84, 'height': 35}}, {'key': '公民身份号码', 'value': '110103199202250229', 'position': {'left': 733, 'top': 417, 'width': 399, 'height': 36}}, {'key': '住址', 'value': '北京市海淀区仙秀园555号', 'position': {'left': 618, 'top': 277, 'width': 253, 'height': 67}}], 'position': {'left': 483, 'top': 42, 'width': 737, 'height': 464}}, 'back': {'fields': [{'key': '签发日期', 'value': '20150413', 'position': {'left': 789, 'top': 946, 'width': 139, 'height': 34}}, {'key': '签发机关', 'value': '北京市公安局海淀分局', 'position': {'left': 787, 'top': 883, 'width': 275, 'height': 35}}, {'key': '失效日期', 'value': '20350413', 'position': {'left': 946, 'top': 945, 'width': 144, 'height': 34}}], 'position': {'left': 473, 'top': 537, 'width': 749, 'height': 480}}, 'direction': 0}
```


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions appbuilder/core/components/object_recognize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

## 基本用法

示例图片为:

![示例图片](./image/object_recognize_test.png)



```python
import os
import appbuilder
Expand All @@ -35,6 +41,7 @@ object_recognition = appbuilder.ObjectRecognition()
# 执行识别操作并获取结果
out = object_recognition.run(appbuilder.Message(content={"raw_image": raw_image}))
print(out.content)
# {'result': [{'keyword': '苹果', 'score': 0.961247, 'root': '植物-蔷薇科'}, {'keyword': '姬娜果', 'score': 0.740838, 'root': '植物-其它'}, {'keyword': '梨子', 'score': 0.392218, 'root': '商品-水果'}, {'keyword': '车厘子', 'score': 0.193986, 'root': '植物-其它'}, {'keyword': '石榴', 'score': 0.000239, 'root': '植物-千屈菜科'}]}
```

## 参数说明
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions appbuilder/core/components/plant_recognize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
## 基本用法

下面是植物识别的代码示例:

示例图片为

![示例图片](./image/palnt_recognize_test.jpg)

```python
import os
import requests
Expand All @@ -35,6 +40,7 @@ out = plant_recognize.run(inp)
# 打印识别结果
print(out.content)

# {'plant_score_list': [{'name': '榕树', 'score': 0.4230029582977295}, {'name': '榆树', 'score': 0.1273619383573532}, {'name': '美国榆', 'score': 0.12065108865499496}, {'name': '白蜡树', 'score': 0.11650644987821579}, {'name': '雨树', 'score': 0.045340824872255325}]}
```


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions appbuilder/core/components/qrcode_ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
## 基本用法

下面是二维码识别的代码示例:

示例图片为:
![示例图片](./image/qrcode_ocr_test.png)

```python
import os
import appbuilder
Expand All @@ -40,6 +44,7 @@ qrcode_ocr = appbuilder.QRcodeOCR()
# 执行识别操作并获取结果
out = qrcode_ocr.run(appbuilder.Message(content={"raw_image": raw_image}), location="true")
print(out.content)
# {'codes_result': [{'type': 'QR_CODE', 'text': ['ocr文字识别'], 'location': {'top': 506, 'left': 1302, 'width': 1972, 'height': 1961}}]}
```


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions appbuilder/core/components/table_ocr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
## 基本用法

下面是表格文字识别的代码示例:

示例图片为

![示例图片](./image/table_ocr_test.png)

```python
import os
import appbuilder
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions appbuilder/core/components/text_to_image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ content_data = {"prompt": "上海的经典风景", "width": 1024, "height": 1024
msg = appbuilder.Message(content_data)
out = text2Image.run(msg)
print(out.content)
#{'img_urls': ['...']}
```

生成的"上海的经典风景"图片如下

![示例图片](./image/shanghai.png)


## 参数说明

### 鉴权配置
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading