矩形标注
RectangleLabels标签用于创建带标注的矩形框。适用于为边界框语义分割任务添加标签。
适用于以下数据类型:图像。标注结果存储边界框的左上角坐标,更多关于边界框和旋转的信息请参阅Object Detection Template。
参数
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| name | string |
Name of the element | |
| toName | string |
Name of the image to label | |
| [choice] | single | multiple |
single |
Configure whether you can select one or multiple labels |
| [maxUsages] | number |
Maximum number of times a label can be used per task | |
| [showInline] | boolean |
true |
Show labels in the same visual line |
| [opacity] | float |
0.6 |
Opacity of rectangle |
| [fillColor] | string |
Rectangle fill color in hexadecimal | |
| [strokeColor] | string |
Stroke color in hexadecimal | |
| [strokeWidth] | number |
1 |
Width of stroke |
| [canRotate] | boolean |
true |
Show or hide rotation control. Note that the anchor point in the results is different than the anchor point used when rotating with the rotation tool. For more information, see Rotation. |
结果参数
| 名称 | 类型 | 描述 |
|---|---|---|
| original_width | number |
width of the original image (px) |
| original_height | number |
height of the original image (px) |
| image_rotation | number |
rotation degree of the image (deg) |
| value | Object |
|
| value.x | number |
x coordinate of the top left corner before rotation (0-100) |
| value.y | number |
y coordinate of the top left corner before rotation (0-100) |
| value.width | number |
width of the bounding box (0-100) |
| value.height | number |
height of the bounding box (0-100) |
| value.rotation | number |
rotation degree of the bounding box (deg) |
示例JSON
{
"original_width": 1920,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 3.1,
"y": 8.2,
"width": 20,
"height": 16,
"rectanglelabels": ["Car"]
}
}
示例
用于在图像上应用矩形边界框标签的基本标注配置
<View>
<RectangleLabels name="labels" toName="image">
<Label value="Person" />
<Label value="Animal" />
</RectangleLabels>
<Image name="image" value="$image" />
</View>