/
ImageToCoordinatesTask : 通用图片标注任务

ImageToCoordinatesTask : 通用图片标注任务

通过 createTask方法 创建识别任务,然后通过 getTaskResult 方法 获取识别结果

此对象用于标注图片中指定的物体目标

识别说明

此对象用于标注图片中指定的物体目标,可以指定任意目标进行标注,返回四角坐标或者x,y坐标点

一般用于标注样本以后训练自己的模型,不推荐用于日常识别

识别示例在底部,在线体验:https://boundbox.ai/

创建任务

通过 createTask方法 创建识别任务

请求节点: 国际节点 https://api.yescaptcha.com 国内节点 https://cn.yescaptcha.com

请求地址: https://api.yescaptcha.com/createTask

请求格式:POST application/json

识别流程

  1. 获取验证码图片,并转成base64(需要您自己处理)

  2. 使用本接口提交识别任务(发送到 /createTask 创建识别任务,见本文档处理)

  3. 获得返回的识别结果(见下方返回示例)

对象结构

属性

类型

必须

说明

属性

类型

必须

说明

type

string

ImageToCoordinatesTask 40 POINTS BETA

body

string

图片的base64编码内容(不要换行符)(不要data:image/*********;base64,内容

comment

string

标注提示,建议使用英文问题(对图片中的中文支持不好),示例:

  • Choose all the curtains // 选择全部窗帘

  • Any Objects,Any Targets,Any Things, Any Human // 多个目标可以用,号分隔

请求示例

{ "clientKey":"cc9c18d3e263515c2c072b36a7125eecc078618f", "task": { "type":"ImageToCoordinatesTask", "body": "/9j/4AAQSkZJRgABA......" # base64编码后的图片 "comment": "Any Objects,Any Targets,Any Things, Any Human", } }

响应结果

参数

类型

说明

参数

类型

说明

errorId

Integer

错误提示: 0 - 没有错误,1 - 有错误

errorCode

string

错误代码, 点这里查看全部错误列表

errorDescription

string

错误详细描述

solution

Object

识别结果,不同类型的任务结果会有所区别。

rectangles

string

坐标,包含每个目标的坐标,格式为[xmin, ymin, xmax, ymax]

points

string

点,包含每个目标的点,格式为[x, y]

yolo

string

YOLO格式,包含每个目标的坐标,格式为[x_center, y_center, width, height]

返回示例

{ "taskId": "e95e93d6-61c2-4035-8b3b-6a06d725d59d", "errorId": 0, "solution": { "rectangles": { "Number_17": [272, 42, 627, 229], "Game_Controller": [379, 587, 701, 824] }, "points": { "Number_17": [449, 135], "Game_Controller": [540, 705] }, "yolo": { "Number_17": [449.5, 135.5, 355, 187], "Game_Controller": [540.0, 705.5, 322, 237] } }, "createAt": "2024-10-06 22:49:10", "finishAt": "2024-10-06 22:49:12", "cost": 2473.0451107025146 }

 

识别示例

原图

标注效果

标注提示

响应结果

原图

标注效果

标注提示

响应结果

"Choose all the license plate"

{ "license plate_1": "[14, 712, 148, 761]", "license plate_2": "[531, 638, 712, 722]" }

 

0.png

 

0_mark.png

"Icons,Numbers"

{ "number_17": "[268, 61, 618, 218]", "icon_game_controller": "[382, 578, 708, 825]" }
4.png

 

4_mark.png

"Icons,Numbers"

{     "number_6": "[152, 22, 202, 108]",     "number_10": "[85, 180, 228, 281]",     "number_1": "[125, 291, 175, 387]",     "number_3": "[152, 455, 202, 551]",     "number_4": "[152, 551, 202, 647]",     "icon_1": "[514, 14, 708, 208]",     "icon_2": "[708, 264, 902, 458]",     "icon_3": "[625, 398, 819, 592]",     "icon_4": "[458, 458, 652, 652]",     "icon_5": "[314, 508, 508, 702]" }
processed_demo.png

 

image_026c29c87e008bddd235d6fb39b751ef_targets_Animals.png

 

"Animals"

{ "deer": "[148, 272, 208, 400]", "cat": "[464, 300, 516, 436]", "panda": "[728, 272, 800, 408]", "duck_1": "[260, 476, 316, 564]", "duck_2": "[368, 484, 440, 556]" }

 

aws1.png

 

 

aws1_mark.png

 

"Choose all the curtains"

{ "brown_curtains_1": "[72, 232, 312, 372]", "brown_curtains_2": "[388, 388, 628, 588]", "grey_curtains_1": "[72, 616, 312, 756]", "red_curtains": "[388, 616, 628, 756]", "grey_curtains_2": "[644, 616, 884, 756]" }

 

Related content