Skip to main content

<RectangleLabels>

Category: Control tag

The RectangleLabels tag creates labeled rectangles. Use to apply labels to bounding box semantic segmentation tasks.

Use with the following data types: image. Annotation results store the left top corner of the bounding box, read more about it and rotation in the templates gallery.

Attributes​

AttributeTypeRequiredDefaultDescription
namestringyes—Name of the element
toNamestringyes—Name of the image to label
choicesingle,multiplenosingleConfigure whether you can select one or multiple labels
maxUsagesnumberno—Maximum number of times a label can be used per task
showInlinetrue,falsenotrueShow labels in the same visual line
opacityfloatno0.6Opacity of rectangle
fillColorstringno—Rectangle fill color in hexadecimal
strokeColorstringno—Stroke color in hexadecimal
strokeWidthnumberno1Width of stroke
canRotatetrue,falsenotrueShow 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 the templates gallery.
snappixel,nonenononeSnap rectangle to image pixels

Examples​

Basic labeling configuration for applying labels to rectangular bounding boxes on an image​

<View>
<RectangleLabels name="labels" toName="image">
<Label value="Person" />
<Label value="Animal" />
</RectangleLabels>
<Image name="image" value="$image" />
</View>