Data Operation

UploadData

上传数据到数据集

用户往数据集中上传数据。

  1. 获取上传数据凭证

  2. 直传数据到oss

GetPolicy

获取上传凭证

请求路径

GET /v1/datasets/{id}/policies

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号

segmentName

string

数据集分割区

isInternal

bool

是否返回内网上传地址

expired

int

令牌过期时间,以秒为单位,不可为负,默认60, 大于300会按照300处理

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/policies?expired=60&draftNumber=1' \
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{
	"result": {
		"OSSAccessKeyId": "OSSACCESSKEYID",
		"Signature": "QbkCDeZtX37gb2zoemel3VCxz3k=",
		"policy": "eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRrZXkiLCI4ZjgzNWVlOWNmZWIwZDRlZjBkMmQyODJmOTdlNzM1OS9jOTQ4YTY0NC03NTJjLTRkOTItOTI3Yi1mNjkwYzYyZGM5Y2YvIl1dLCJleHBpcmF0aW9uIjoiMjAyMC0xMS0xM1QwMzozNjo1OVoifQ==",
		"success_action_status": "200",
        "multipleUploadLimit": 10
	},
	"extra": {
        "backendType": "oss",
		"host": "https://content-store-fat-version.oss-cn-qingdao.aliyuncs.com",
        "objectPrefix": ""
	},
	"expireAt": 1605238559
}

根据获取的凭证前端直传

获取的result直接反序列化,进行oss直传即可,extra host是访问地址

请求路径

POST 源自从policy接口获取的result字段"extra"中的"host"

请求参数

body

名称类型是否必须描述

OSSAccessKeyId

string

与之前获取的凭证返回值OSSAccessKeyId一致

Signature

string

与之前获取的凭证返回值Signature一致

policy

string

与之前的获取凭证返回的policy一致

key

string

之前的获取凭证返回的objectPrefix + 计算文件的cheksum值。用sha1加密算法获取文件checksum值

file

file

文件

请求示例

curl --location --request POST 'https://content-store-version.oss-cn-qingdao.aliyuncs.com' \
--form 'OSSAccessKeyId=OSSACCESSKEYID' \
--form 'Signature=jVbcWO5v4Ujm7duQX+gqb0UBT2E=' \
--form 'policy=eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJlNWEyN2FlOGI3NDM4N2NlMjA4YTI2YjVjMzBjZGI2MS9mNDhjOGY3ZC0xOGVmLTQ2OGEtYjA2ZS0yNzg5MzQ3MDVhNTMvLnNlZ21lbnQvZGF5VGVzdC9kYXlTZXF1ZW5jZTAxLy5zZWdtZW50X2VuZC8iXV0sImV4cGlyYXRpb24iOiIyMDIwLTEyLTE0VDA5OjAwOjI1WiJ9' \
--form 'key={objectPrefix}{checksum}' \
--form 'file=@/{localFile}'

返回结果

# 响应状态
HttpStatus 204
# 响应结果
返回为空
{}

PutCallback

上传完毕回调

请求路径

PUT /v1/datasets/{id}/callback

请求参数

Path

名称是否必须描述

id

数据集ID

body

名称类型是否必须描述

draftNumber

int

草稿编号

checksum

string

上传的文件的checksum,用sha1加密算法获取文件checksum值

segmentName

string

segment 名称

remotePath

string

远程的文件路径,例如a.jpg

sensorName

string

融合类数据上传必传,传感器名称

frameId

string

融合类数据上传必传,帧id, ulid格式,参考 https://github.com/oklog/ulid

timestamp

float

融合类数据上传非必传

label

map

该文件的标注标签信息,具体可参考uploadLabel

fileSize

int

文件大小, 若未传,服务端将计算文件大小

请求示例

curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/callback' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "draftNumber": "1",
  "remotePath": "car1.jpg",
  "checksum": "b9676b075dff6d3333bbebb7cdd154f3631bb926",
  "frameId": "01D78XYFJ1PRM1WPBCBT3VHMNV",
  "segmentName": "car",
  "sensorName": "camera_car",
  "timestamp": 1532402934,
  "label":{},
  "fileSize": 10
}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{}

MultiPutCallback

上传完毕批量回调

请求路径

PUT /v1/datasets/{id}/multi/callback

请求参数

Path

名称是否必须描述

id

数据集ID

body

名称类型是否必须描述

draftNumber

int

草稿编号

segmentName

string

segment 名称

objects

[]object

批量回调的object

├─checksum

string

上传的文件的checksum,用sha1加密算法获取文件checksum值

├─remotePath

string

远程的文件路径,例如a.jpg

├─sensorName

string

融合类数据上传必传,传感器名称

├─frameId

string

融合类数据上传必传,帧id, ulid格式,参考 https://github.com/oklog/ulid

├─timestamp

float

融合类数据上传非必传

├─label

map

该文件的标注标签信息,具体可参考uploadLabel

├─fileSize

int

文件大小, 若未传,服务端将计算文件大小

请求示例

curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/callback' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "draftNumber": "1",
  "segmentName": "car",
  "objects": [
        {
          "remotePath": "car1.jpg",
          "checksum": "b9676b075dff6d3333bbebb7cdd154f3631bb926",
          "frameId": "01D78XYFJ1PRM1WPBCBT3VHMNV",
          "sensorName": "camera_car",
          "timestamp": 1532402934,
          "label":{},
          "fileSize": 10
        }
  ]
}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{}

CreateSegment

创建segment

POST /v1/datasets/{id}/segments

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

move

bool

从已有剪切创建

copy

bool

从已有复制创建

multipleMove

bool

从多个已有剪切创建

multipleCopy

bool

从多个已有复制创建

Body

名称类型是否必须描述

draftNumber

int

草稿编号

name

string

segment 名称, 当不是用已有操作时 不可为null,name中不可包含".","\"

description

string

segment 描述

strategy

string

当不是用已有操作时移动重名时的策略,可选项有:abort,override 和 skip,缺省为 abort

segmentName

string

目标数据分段名, 从已有单个创建时使用

segmentNames

string[]

目标数据分段名, 从已有多个创建时使用

source

object

来源数据分段, 从已有单个创建时使用且必须

├─ segmentName

string

分区名

├─ id

string

数据集id

├─ draftNumber

int

草稿编号

├─ commit

string

commitId或者commit的tag

source

object

来源数据分段, 从已有多个创建时使用且必须

├─ segmentName

string[]

分区名 列表

├─ id

string

数据集id

├─ draftNumber

int

草稿编号

├─ commit

string

commitId或者commit的tag

请求示例

curl --location --request POST '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments'\
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
        "draftNumber":1,
        "name": "graviti",
        "description": "this is a segment"
    }'

返回结果

# 响应状态
HttpStatus 201
# 响应结果
{}

DeleteSegment

删除Segment

DELETE /v1/datasets/{id}/segments

Path

名称是否必须描述

id

数据集ID

Body

名称类型是否必须描述

draftNumber

int

草稿编号

segmentName

string

segment 名称

请求示例

curl --location --request DELETE '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "draftNumber":1,
    "segmentName": "car",
}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{}

ListSegment

获取数据集segment

GET /v1/datasets/{id}/segments

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

limit

int

默认128,单次最多128

offset

int

默认0

sortBy

string

排序的字段,默认update_at(更新时间), 目前支持create_at(创建时间)和update_at,传入其他内容会返回InvalidParamsValue

orderBy

string

默认desc(倒序),合法内容为asc(顺序)和desc

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments?commit=v1&offset=0&limit=2'\
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200
{
  "segments": [
    {
        "name": "car",
        "description": "this is car"
    },
    {
        "name": "graviti",
        "description": "this is a segment"
    }
  ],
  "offset": 0,
  "recordSize": 2,
  "totalCount": 10
}

UploadLabelCatalog

上传labelCatalog

PUT /v1/datasets/{id}/labels/catalogs

请求参数

Path

名称是否必须描述

id

数据集ID

Body

名称类型是否必须描述

draftNumber

int

草稿编号

catalog

map

标注类型。 key: CLASSIFICATION: 分类标注 BOX2D: 2D 框标注 BOX3D: 3D 框标注 POLYGON2D: 2D 多边形标注 POLYLINE2D: 2D 折线标注 KEYPOINTS2D: 2D 关键点标注 CUBOID2D: 2D 立体框标注 SENTENCE: 语音转写标注 以上标注类型,每类标注类型都有自己的结构,具体可看示例或参考标签格式,请严格遵循该标注类型格式传值

├─description

string

描述

├─categoryDelimiter

string

用于分割category父子关系的分割符,缺省为不支持父子关系,推荐分隔符为"."

├─isTracking

bool

是否是追踪

├─categories

object[]

item 类型: object,category 列表,包含所有 category 信息

├─name

string

category 名称

├─description

string

category 描述

├─attributes

object[]

item 类型,包含属性相关信息

├─name

string

attribute 名称

├─type

string/string[]

attribute type:string, boolean, integer, number, array, null,例如"interger", ["integer", "null"]

├─minimum

float

属性值最小值,当属性为数字时该字段定义了其最小值(闭区间)

├─maximum

float

属性值最大值,当属性为数字时该字段定义了其最大值(闭区间)

├─description

string

属性描述

├─enum

string[]

属性值选项,表示该属性所有的可能的选项

├─parentCategories

string[]

关联类别,表示该属性隶属于哪些类别,为空则表示全局属性

├─items

object[]

item类型,多选属性定义,(当"type"字段为"array"时,表示多选属性)

├─type

string/string[]

多选属性值类型:string, boolean, integer, number, array, null,例如"interger", ["integer", "null"]

├─minimum

float

多选属性值最小值(闭区间)

├─maximum

float

多选属性值最大值(闭区间)

├─enum

string[]

多选属性值选项,表示该属性所有的可能的选项

请求示例

curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/labels/catalogs'\
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "draftNumber": 1,
  "BOX2D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false
  },
  "BOX3D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false
  },
  "CLASSIFICATION": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog"
  },
  "CUBOID2D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false
  },
  "KEYPOINTS2D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false,
    "keypoints": [
      {
        "description": "this is key point",
        "names": [
          "ear",
          "leg",
          "mouse"
        ],
        "number": 3,
        "parentCategories": [],
        "skeleton": [
          [
            0,
            1
          ],
          [
            1,
            2
          ]
        ],
        "visible": "1"
      }
    ]
  },
  "POLYGON2D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false
  },
  "POLYLINE2D": {
    "attributes": [
      {
        "description": "attribute 'traffic_light_color' is a multiple choice attribute",
        "items": {
          "enum": [
            "unknown",
            "red",
            "yellow",
            "green"
          ]
        },
        "name": "traffic_light_color",
        "parentCategories": [
          "traffic_light"
        ],
        "type": "array"
      },
      {
        "description": "attribute 'visibility' is a float value between 0 to 1",
        "maximum": 1,
        "minimum": 0,
        "name": "visibility",
        "type": "number"
      },
      {
        "description": "this is color",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "name": "color",
        "parentCategories": [
          "car"
        ],
        "type": "string"
      }
    ],
    "categories": [
      {
        "description": "this is a car",
        "name": "car"
      }
    ],
    "categoryDelimiter": ".",
    "description": "this is a description of label catalog",
    "isTracking": false
  },
  "SENTENCE": {
    "attributes": [
      {
        "description": "this is a description of attribute",
        "enum": [
          "red",
          "blue",
          "green"
        ],
        "items": {
          "enum": [
            "red",
            "blue",
            "green"
          ],
          "maximum": 10,
          "minimum": 0,
          "type": {}
        },
        "maximum": 10,
        "minimum": 0,
        "name": "color",
        "parentCategories": [],
        "type": {}
      }
    ],
    "description": "this is a description of label catalog",
    "isSample": false,
    "lexicon": "[[\"啊\", \"aa\", \"a1\"], [\"阿婆\": \"aa\", \"a1\", \"p\", \"o2\"], [\"爱\", \"aa\", \"ai4\"], [\"爱祖国\",\"aa\", \"ai4\", \"z\", \"u3\", \"g\", \"uo2\"]]",
    "sampleRate": 32
  }
}'

返回结果

HttpStatus 200
{}

GetLabelCatalog

获取数据集标签目录

GET /v1/datasets/{id}/labels/catalogs

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/labels/catalogs?commit=v1'\
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{
  "catalog": {
    "BOX2D": {
      "attributes": [
        {
          "name": "color"
        }
      ],
      "categories": [
        {
          "description": "hello",
          "name": "car"
        }
      ]
    }
  }
}

UploadSensor

上传sensor

POST /v1/datasets/{id}/sensors

Path

名称是否必须描述

id

数据集ID

Body

名称类型是否必须描述

draftNumber

int

草稿编号

segmentName

string

segment 名称

name

string

sensor 名称

type

string

sensor 类型

description

string

描述

extrinsics

object

sensor 外参

├─rotation

object

旋转矩阵

├─w

float

w

├─x

float

x

├─y

float

y

├─z

float

z

├─translation

object

平移矩阵

├─x

float

x

├─y

float

y

├─z

float

z

intrinsics

object

sensr 内参(仅相机类设备需要提供内参)

├─cameraMatrix

object

├─cx

float

cx

├─cy

float

cy

├─fx

float

fx

├─fy

float

fy

├─skew

float

skew

├─distortionCoefficients

object

畸变系数 (p1, p2, k1, k2, k3,还可以有"k4", "k5", "k6"等等,给的越多计算越精确)

├─p1

float

p1

├─p2

float

p2

├─k1

float

k1

├─k2

float

k2

├─k3

float

k3

请求示例

curl --location --request POST '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/sensors' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "description": "This is a example camera sensor",
  "extrinsics": {
    "rotation": {
      "w": 0.6924185592174665,
      "x": -0.7031619420114925,
      "y": -0.11648342771943819,
      "z": 0.11203317912370753
    },
    "translation": {
      "x": 1.03569100218,
      "y": 0.484795032713,
      "z": 1.59097014818
    }
  },
  "intrinsics": {
    "cameraMatrix": {
      "cx": 1256.7414812095406,
      "cy": 492.7757465151356,
      "fx": 1256.7414812095406,
      "fy": 792.1125740759628,
      "skew": 122.7757465151356
    },
    "distortionCoefficients": {
      "k1": 0.12,
      "k2": 0.33,
      "k3": 0.13,
      "k4": 0.93,
      "k5": 0.23,
      "p1": 1,
      "p2": 0.3
    }
  },
  "name": "camera_01",
  "segmentName": "car",
  "type": "CAMERA"
}'

返回结果

HttpStatus 200
{}

DeleteSensor

删除sensor

DELETE /v1/datasets/{id}/sensors

Path

名称是否必须描述

id

数据集ID

Body

名称类型是否必须描述

draftNumber

int

草稿编号

segmentName

string

segment 名称

sensorName

string

sensor 名称

请求示例

curl --location --request DELETE '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/sensors' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "draftNumber": 1,
    "segmentName": "car",
    "sensorName": "sensor1",
}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{}

ListSensor

获取sensor

GET /v1/datasets/{id}/sensors

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

segmentName

string

segment 名称

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/sensors?segmentName=car&commit=v1' \
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{
    "segmentName": "car",
    "sensors": [
        {
            "name": "sensor1",
            "type": "camera",
            "extrinsics": {
                "rotation": {
                    "w": 1.1,
                    "x": 1.2,
                    "y": 1.3,
                    "z": 1.4
                },
                "translation": {
                    "x": 1.2,
                    "y": 1.3,
                    "z": 1.4
                }
            },
            "intrinsics": {
                "cameraMatrix": {
                    "cx": 1.1,
                    "cy": 1.2,
                    "fx": 1.1,
                    "fy": 1.2,
                    "skew": 1.3
                },
                "distortionCoefficient": {
                    "k1": 1.4,
                    "k2": 1.5,
                    "k3": 1.6,
                    "k4": 1.7,
                    "k5": 1.8,
                    "k6": 1.9,
                    "p1": 1.2,
                    "p2": 1.3
                }
            },
            "description": "this is a sensor"
        },
        {
            "name": "sensor2",
            "type": "camera",
            "extrinsics": {
                "rotation": {
                    "w": 1.1,
                    "x": 1.2,
                    "y": 1.3,
                    "z": 1.4
                },
                "translation": {
                    "x": 1.2,
                    "y": 1.3,
                    "z": 1.4
                }
            },
            "intrinsics": {
                "cameraMatrix": {
                    "cx": 1.1,
                    "cy": 1.2,
                    "fx": 1.1,
                    "fy": 1.2,
                    "skew": 1.3
                },
                "distortionCoefficient": {
                    "k1": 1.4,
                    "k2": 1.5,
                    "k3": 1.6,
                    "k4": 1.7,
                    "k5": 1.8,
                    "k6": 1.9,
                    "p1": 1.2,
                    "p2": 1.3
                }
            },
            "description": "this is a sensor"
        }
    ]
}

ListData

获取数据集数据列表

GET /v1/datasets/{id}/data

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

segmentName

string

segment 名称

limit

int

默认128,单次最高128

offset

int

默认0

sortBy

string

排序的字段,默认updated_at(更新时间), 目前支持created_at(创建时间)和updated_at,传入其他内容会返回InvalidParamsValue

orderBy

string

默认desc(倒序),合法内容为asc(顺序)和desc

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/data?draftNumber=1&segmentName=car'\
--header 'x-token: {your_accesskey}'

返回结果

普通数据集

{
    "segmentName": "car",
    "type": 0,
    "data": [{"remotePath": "car.jpg."}],
    "offset": 0,
    "recordSize": 1,
    "totalCount": 1
}

融合数据集

{
    "segmentName": "car",
    "type": 1,
    "data": [
        {
            "frameId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "frameIndex": 1,
            "frame": [
                {
                    "sensorname": "camera_car",
                    "remotePath": "fusion_data_car3.jpg",
                    "timestamp":1609430401,
                }
            ]
        }
    ],
    "offset": 0,
    "recordSize": 1,
    "totalCount": 1
}

ListDataDetails

获取数据集数据详情列表

GET /v1/datasets/{id}/data/details

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

segmentName

string

segment 名称

remotePath

string

数据路径名

isInternal

bool

是否返回内网上传地址

limit

int

默认128,单次最高128

offset

int

默认0

sortBy

string

排序的字段,默认updated_at(更新时间), 目前支持created_at(创建时间)和updated_at,传入其他内容会返回InvalidParamsValue

orderBy

string

默认desc(倒序),合法内容为asc(顺序)和desc

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/data/details?draftNumber=1&segmentName=car'\
--header 'x-token: {your_accesskey}'

返回结果

普通数据集

{
    "segmentName": "car",
    "type": 0,
    "dataDetails": [{"remotePath": "car.jpg."}],
    "offset": 0,
    "recordSize": 1,
    "totalCount": 1
}

融合数据集

{
    "segmentName": "car",
    "type": 1,
    "dataDetails": [
        {
            "frameId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "frameIndex": 1,
            "frame": [
                {
                    "sensorname": "camera_car",
                    "remotePath": "fusion_data_car3.jpg",
                    "timestamp":1609430401,
                }
            ]
        }
    ],
    "offset": 0,
    "recordSize": 1,
    "totalCount": 1
}

ListDataUri

获取数据资源地址

GET /v1/datasets/{id}/data/urls

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

remotePath

string

数据路径,若传值,则查询具体此数据的url

segmentName

string

数据所在分区

limit

int

默认128,单次最高128

offset

int

默认0

isInternal

bool

是否返回内网地址

sortBy

string

排序的字段,默认按照名字(remotePath)排序, 目前支持created_at(创建时间)和updated_at,传入其他内容会返回InvalidParamsValue

orderBy

string

默认desc(倒序),合法内容为asc(顺序)和desc

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/data/urls?draftNumber=1&remotePath=graviti.jpg&segmentName=car' \
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200
# 响应结果
{
    "offset": 0,
    "recordSize": 5,
    "totalCount": 5,
    "segmentName": "car",
    "urls": [
        {
            "remotePath": "第二段_00000010.jpg",
            "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00000010.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=DJbZOXSF1FSBQT4wEv69O%2B3OhyI%3D&versionId=CAEQPRiBgMD1o.mEshciIDk4ZmZkMWM2NmQ5ZTQ1NWRhNTBmZDZjNzJjNjM4OGRl"
        },
        {
            "remotePath": "第二段_00040820.jpg",
            "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00040820.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=DihdFjHDtE3xEyIx3eGbTmN%2B%2Bzc%3D&versionId=CAEQPRiBgMD_pOmEshciIGFjYjVjY2FjYmZkMzRjYjVhZTQ5ZjQxZWMwMzhkOTMx"
        },
        {
            "remotePath": "第二段_00040890.jpg",
            "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00040890.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=pwhm9liDx9%2BbDp2VlPghd1Kw0as%3D&versionId=CAEQPRiBgMD0pemEshciIGExZDdlOTBjMmQxMDQxMmFiM2QxMTAzNmU3N2I5ODFk"
        },
        {
            "remotePath": "第二段_00040900.jpg",
            "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00040900.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=GpvY%2BJqbX7qKA70E7t58bRVn%2FcI%3D&versionId=CAEQPRiBgMC9p.mEshciIGY2YzIzNGZmM2EyZDQwMzZiODc4MzNmMmVlY2E0MTAy"
        },
        {
            "remotePath": "第二段_00040940.jpg",
            "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00040940.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=TguAbiIM0pjWFse1S0MQRUbMuBg%3D&versionId=CAEQPRiBgIDLqemEshciIGM2YmRkZGJlNmY2OTQ5NmViNTEzMDg0NjFmNjczNmYw"
        }
    ]
}

融合数据集

# 响应状态
HttpStatus 200
# 响应结果
{
    "segmentName": "car",
    "type": 1,
    "data": [
        {
            "frameId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "frameIndex": 1,
            "frame": [
                {
                    "sensorname": "camera_car",
                    "remotePath": "第二段_00000010.jpg",
                    "url": "https://content-store-dev-version.oss-cn-qingdao.aliyuncs.com/61457d9174d2367811a2adae3ad94eae%2F63bedc17-8b4f-423f-893c-42b9ceff028e%2F%E7%AC%AC%E4%BA%8C%E6%AE%B5_00000010.jpg?Expires=1611304780&OSSAccessKeyId=OSSACCESSKEYID&Signature=DJbZOXSF1FSBQT4wEv69O%2B3OhyI%3D&versionId=CAEQPRiBgMD1o.mEshciIDk4ZmZkMWM2NmQ5ZTQ1NWRhNTBmZDZjNzJjNjM4OGRl"
                }
            ]
        }
    ],
    "offset": 0,
    "recordSize": 1,
    "totalCount": 1
}

ListMaskUrls

获取标注url列表

GET /v1/datasets/{id}/masks/urls

请求参数

Path

名称是否必须描述

id

数据集ID

Query

名称类型是否必须描述

draftNumber

int

草稿编号,draft和commit二者必须存在一个,但不可全部存在

commit

string

commit id 或者 commit tag 或者 branch name

segmentName

string

segment 名称

remotePath

string

数据路径名

maskType

string

mask 标注类型,可选项有 "SEMANTIC_MASK", "INSTANCE_MASK" 和 "PANOPTIC_MASK"

isInternal

bool

是否返回内网上传地址

limit

int

默认128,单次最高128

offset

int

默认0

sortBy

string

排序的字段,默认updated_at(更新时间), 目前支持created_at(创建时间)和updated_at,传入其他内容会返回InvalidParamsValue

orderBy

string

默认desc(倒序),合法内容为asc(顺序)和desc

请求示例

curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/masks/urls?draftNumber=1&segmentName=car&maskType=SEMANTIC_MASK'\
--header 'x-token: {your_accesskey}'

返回结果

# 响应状态
HttpStatus 200