diff --git a/appbuilder/core/components/animal_recognize/README.md b/appbuilder/core/components/animal_recognize/README.md index 478fd45b9..10b6a5b58 100644 --- a/appbuilder/core/components/animal_recognize/README.md +++ b/appbuilder/core/components/animal_recognize/README.md @@ -1,15 +1,12 @@ # 动物识别 (Animal Recognition) ## 简介 -动物识别 (Animal Recognition) 可用于识别一张图片,即对于输入的一张图片(可正常解码,且长宽比较合适),输出动物识别结果。 +动物识别 (Animal Recognition) 支持对于输入的一张图片(可正常解码),输出动物识别结果。 ### 功能介绍 * 识别动物名称 - 识别近八千种动物,接口返回动物名称、置信度信息,支持自定义返回结果数; - -### 特色优势 -* 可识别近八千种动物,接口返回动物名称,并可获取识别结果对应的百科信息; + 识别近八千种动物,接口返回动物名称、置信度信息,支持自定义返回结果数, 并可获取识别结果对应的百科信息; ### 应用场景 * 拍照识图 @@ -19,6 +16,13 @@ ## 基本用法 +我们选取一张可爱的大熊猫照片,使用动物识别组件进行识别。 + + +![大熊猫](./image/animal_recognize_test.png) + + + 下面是动物识别的代码示例: ```python import os @@ -99,10 +103,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN" } ``` -### 错误码 -| 错误码 | 描述 | -|-----|----| - ## 高级用法 目前该模块仅提供基础的动物识别功能。 diff --git a/appbuilder/core/components/animal_recognize/image/animal_recognize_test.png b/appbuilder/core/components/animal_recognize/image/animal_recognize_test.png new file mode 100644 index 000000000..d0cc40466 Binary files /dev/null and b/appbuilder/core/components/animal_recognize/image/animal_recognize_test.png differ diff --git a/appbuilder/core/components/asr/README.md b/appbuilder/core/components/asr/README.md index 1d48e79fe..1a9f242e7 100644 --- a/appbuilder/core/components/asr/README.md +++ b/appbuilder/core/components/asr/README.md @@ -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': ['北京科技馆。']} ``` ## 参数说明 diff --git a/appbuilder/core/components/dish_recognize/README.md b/appbuilder/core/components/dish_recognize/README.md index 241552efd..a335bd302 100644 --- a/appbuilder/core/components/dish_recognize/README.md +++ b/appbuilder/core/components/dish_recognize/README.md @@ -16,6 +16,10 @@ ## 基本用法 通过如下示例代码可以快速开始使用菜品识别组件: +示例图片为: + +![菜品识别示例图片](./image/dish_recognize_test.jpg) + ```python import os import requests @@ -68,9 +72,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN" {"result": [{"name": "剁椒鱼头", "calorie": "127"}]} ``` -### 错误码 -|错误码|描述| -|------|---| ## 更新记录和贡献 * 菜品识别 (2024-01) \ No newline at end of file diff --git a/appbuilder/core/components/dish_recognize/image/dish_recognize_test.jpg b/appbuilder/core/components/dish_recognize/image/dish_recognize_test.jpg new file mode 100644 index 000000000..436b6fc2f Binary files /dev/null and b/appbuilder/core/components/dish_recognize/image/dish_recognize_test.jpg differ diff --git a/appbuilder/core/components/doc_crop_enhance/README.md b/appbuilder/core/components/doc_crop_enhance/README.md index d3cdc62f1..822763cfd 100644 --- a/appbuilder/core/components/doc_crop_enhance/README.md +++ b/appbuilder/core/components/doc_crop_enhance/README.md @@ -18,6 +18,11 @@ ## 基本用法 下面是文档矫正增强代码示例: + +示例图片为 + +![示例图片](./image/doc_enhance_test.png) + ```python import os import appbuilder @@ -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}]} ``` @@ -78,9 +84,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN" ] } ``` -### 错误码 -| 错误码 | 描述 | -|-----|----| ## 高级用法 diff --git a/appbuilder/core/components/doc_crop_enhance/image/doc_enhance_test.png b/appbuilder/core/components/doc_crop_enhance/image/doc_enhance_test.png new file mode 100644 index 000000000..1bc72d126 Binary files /dev/null and b/appbuilder/core/components/doc_crop_enhance/image/doc_enhance_test.png differ diff --git a/appbuilder/core/components/general_ocr/README.md b/appbuilder/core/components/general_ocr/README.md index b32d68469..5da61c9b5 100644 --- a/appbuilder/core/components/general_ocr/README.md +++ b/appbuilder/core/components/general_ocr/README.md @@ -17,6 +17,8 @@ 以下是一个简单的例子来演示如何开始使用GeneralOCR组件: +示例图片为![示例图片](./image/general_ocr_test.png) + ```python import os import appbuilder @@ -101,9 +103,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN" ] } ``` -### 错误码 -| 错误码 | 描述 | -|-----|----| ## 高级用法 diff --git a/appbuilder/core/components/general_ocr/image/general_ocr_test.png b/appbuilder/core/components/general_ocr/image/general_ocr_test.png new file mode 100644 index 000000000..751ba8277 Binary files /dev/null and b/appbuilder/core/components/general_ocr/image/general_ocr_test.png differ diff --git a/appbuilder/core/components/handwrite_ocr/README.md b/appbuilder/core/components/handwrite_ocr/README.md index a0ad06631..03f69ed1d 100644 --- a/appbuilder/core/components/handwrite_ocr/README.md +++ b/appbuilder/core/components/handwrite_ocr/README.md @@ -18,6 +18,9 @@ ## 基本用法 下面是手写文字识别的代码示例: + +示例图片为 ![示例图片](./image/test_handwrite_ocr.jpg) + ```python import os import requests @@ -140,9 +143,6 @@ os.environ["APPBUILDER_TOKEN"] = "..." } ``` -### 错误码 -|错误码|描述| -|------|---| ## 高级用法 目前该模块仅提供基础的手写体识别。 diff --git a/appbuilder/core/components/handwrite_ocr/image/test_handwrite_ocr.jpg b/appbuilder/core/components/handwrite_ocr/image/test_handwrite_ocr.jpg new file mode 100644 index 000000000..fe183dc51 Binary files /dev/null and b/appbuilder/core/components/handwrite_ocr/image/test_handwrite_ocr.jpg differ diff --git a/appbuilder/core/components/image_understand/README.md b/appbuilder/core/components/image_understand/README.md index 649a13091..5246725eb 100644 --- a/appbuilder/core/components/image_understand/README.md +++ b/appbuilder/core/components/image_understand/README.md @@ -13,6 +13,9 @@ ## 基本用法 下面是图像内容理解的代码示例: + +示例图片为:![示例图片](./image/test_image_understand.jpeg) + ```python import os import appbuilder diff --git a/appbuilder/core/components/image_understand/image/test_image_understand.jpeg b/appbuilder/core/components/image_understand/image/test_image_understand.jpeg new file mode 100644 index 000000000..5354c19f3 Binary files /dev/null and b/appbuilder/core/components/image_understand/image/test_image_understand.jpeg differ diff --git a/appbuilder/core/components/landmark_recognize/README.md b/appbuilder/core/components/landmark_recognize/README.md index 70c69cf33..49390c802 100644 --- a/appbuilder/core/components/landmark_recognize/README.md +++ b/appbuilder/core/components/landmark_recognize/README.md @@ -16,6 +16,9 @@ ## 基本用法 下面是地标识别的代码示例: + +示例图片为:![示例图片](./image/landmark_test.jpeg) + ```python import os diff --git a/appbuilder/core/components/landmark_recognize/image/landmark_test.jpeg b/appbuilder/core/components/landmark_recognize/image/landmark_test.jpeg new file mode 100644 index 000000000..2a01165eb Binary files /dev/null and b/appbuilder/core/components/landmark_recognize/image/landmark_test.jpeg differ diff --git a/appbuilder/core/components/mix_card_ocr/README.md b/appbuilder/core/components/mix_card_ocr/README.md index 6d9b0e09b..18577244f 100644 --- a/appbuilder/core/components/mix_card_ocr/README.md +++ b/appbuilder/core/components/mix_card_ocr/README.md @@ -19,6 +19,9 @@ ## 基本用法 下面是身份证混贴识别的代码示例: + +示例图片为:![示例图片](./image/test_mix_card_ocr.jpeg) + ```python import os import requests @@ -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} ``` diff --git a/appbuilder/core/components/mix_card_ocr/image/test_mix_card_ocr.jpeg b/appbuilder/core/components/mix_card_ocr/image/test_mix_card_ocr.jpeg new file mode 100644 index 000000000..28084a502 Binary files /dev/null and b/appbuilder/core/components/mix_card_ocr/image/test_mix_card_ocr.jpeg differ diff --git a/appbuilder/core/components/object_recognize/README.md b/appbuilder/core/components/object_recognize/README.md index ed15fd24c..304b3cc03 100644 --- a/appbuilder/core/components/object_recognize/README.md +++ b/appbuilder/core/components/object_recognize/README.md @@ -16,6 +16,12 @@ ## 基本用法 +示例图片为: + +![示例图片](./image/object_recognize_test.png) + + + ```python import os import appbuilder @@ -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': '植物-千屈菜科'}]} ``` ## 参数说明 diff --git a/appbuilder/core/components/object_recognize/image/object_recognize_test.png b/appbuilder/core/components/object_recognize/image/object_recognize_test.png new file mode 100644 index 000000000..11d6e7282 Binary files /dev/null and b/appbuilder/core/components/object_recognize/image/object_recognize_test.png differ diff --git a/appbuilder/core/components/plant_recognize/README.md b/appbuilder/core/components/plant_recognize/README.md index bbd045297..dd6ec4de6 100644 --- a/appbuilder/core/components/plant_recognize/README.md +++ b/appbuilder/core/components/plant_recognize/README.md @@ -15,6 +15,11 @@ ## 基本用法 下面是植物识别的代码示例: + +示例图片为 + +![示例图片](./image/palnt_recognize_test.jpg) + ```python import os import requests @@ -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}]} ``` diff --git a/appbuilder/core/components/plant_recognize/image/palnt_recognize_test.jpg b/appbuilder/core/components/plant_recognize/image/palnt_recognize_test.jpg new file mode 100644 index 000000000..bed108f11 Binary files /dev/null and b/appbuilder/core/components/plant_recognize/image/palnt_recognize_test.jpg differ diff --git a/appbuilder/core/components/qrcode_ocr/README.md b/appbuilder/core/components/qrcode_ocr/README.md index c26ee99db..3f25017ed 100644 --- a/appbuilder/core/components/qrcode_ocr/README.md +++ b/appbuilder/core/components/qrcode_ocr/README.md @@ -21,6 +21,10 @@ ## 基本用法 下面是二维码识别的代码示例: + +示例图片为: +![示例图片](./image/qrcode_ocr_test.png) + ```python import os import appbuilder @@ -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}}]} ``` diff --git a/appbuilder/core/components/qrcode_ocr/image/qrcode_ocr_test.png b/appbuilder/core/components/qrcode_ocr/image/qrcode_ocr_test.png new file mode 100644 index 000000000..bde559b55 Binary files /dev/null and b/appbuilder/core/components/qrcode_ocr/image/qrcode_ocr_test.png differ diff --git a/appbuilder/core/components/table_ocr/README.md b/appbuilder/core/components/table_ocr/README.md index 6814e6a15..76b456fa9 100644 --- a/appbuilder/core/components/table_ocr/README.md +++ b/appbuilder/core/components/table_ocr/README.md @@ -22,6 +22,11 @@ ## 基本用法 下面是表格文字识别的代码示例: + +示例图片为 + +![示例图片](./image/table_ocr_test.png) + ```python import os import appbuilder diff --git a/appbuilder/core/components/table_ocr/image/table_ocr_test.png b/appbuilder/core/components/table_ocr/image/table_ocr_test.png new file mode 100644 index 000000000..65d1dc3df Binary files /dev/null and b/appbuilder/core/components/table_ocr/image/table_ocr_test.png differ diff --git a/appbuilder/core/components/text_to_image/README.md b/appbuilder/core/components/text_to_image/README.md index 870103530..0877e645e 100644 --- a/appbuilder/core/components/text_to_image/README.md +++ b/appbuilder/core/components/text_to_image/README.md @@ -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) + + ## 参数说明 ### 鉴权配置 diff --git a/appbuilder/core/components/text_to_image/image/shanghai.png b/appbuilder/core/components/text_to_image/image/shanghai.png new file mode 100644 index 000000000..255bc7a6c Binary files /dev/null and b/appbuilder/core/components/text_to_image/image/shanghai.png differ