标签数据结构

标注数据结构

支持11种类型可视化,具体标注数据放入anotations数组中。

参数

类型

是否必传

描述

label

string

标注物体

type

string

标注类型,支持:box2d、ellipse、polygon、line、curve、point、parallel、box3d、cuboid、side_cuboid、sentence,详情参考 Labels.data定义

data

object|array

参考Labels.data定义

instance

string

实例ID

attrs

object

标注物体属性,如:{"truncate":true, "angle":90}

index

int

标注物体在图像中的显示层级顺序,数字大的将覆盖数字小的显示,常用于图像分割类,范围 0 - 65535

详细Labels.data结构

box2d
{
    "x":21.31,  //左上点xy
    "y":33.22,
    "width":210,
    "height":122
}

ellipse
{
    "x":21.31,
    "y":33.22,
    "width":210,
    "height":122
}

polygon
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

line
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

curve 2阶贝塞尔曲线
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

point
{"x":22.22,"y":222.22}

parallel 连续的4个顶点 
[    
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22}
]

box3d 点云3d框
{
    "position":{
        "x":123,
        "y":123,
        "z":123,
    },
    "scale":{
         "x":123,
         "y":123,
         "z":123,
    },
    "rotation":{
        "x":0,
        "y":0,
        "z":-1.57,
    }
}

cuboid 立体框,前后框的顶点顺序需一致
 {
    "front": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] ,
    "back": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] 
}

side_cuboid 侧面立体框(日型框)
 {
    "front": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] ,
    "back": [
        {"x":1,"y":1},{"x":1,"y":1}
    ] 
}

sentence
{
    "text":"转写内容",
    "start": 10.001,
    "end":11.002,
    "spell":"拼音",
    "phoneme":"音素"
}

Last updated