Skip to main content

<Polygon>

Category: Control tag

The Polygon tag is used to add polygons to an image without selecting a label. This can be useful when you have only one label to assign to the polygon. Use for image segmentation tasks.

Use with the following data types: image.

Attributes​

AttributeTypeRequiredDefaultDescription
namestringyes—Name of tag
tonamestringyes—Name of image to label
opacitynumberno0.6Opacity of polygon
fillColorstringnotransparentPolygon fill color in hexadecimal or HTML color name
strokeColorstringno#f48a42Stroke color in hexadecimal
strokeWidthnumberno3Width of stroke
pointSizesmall,medium,largenosmallSize of polygon handle points
pointStylerectangle,circlenocircleStyle of points
smarttrue,falseno—Show smart tool for interactive pre-annotations
smartOnlytrue,falseno—Only show smart tool for interactive pre-annotations
snappixel,nonenononeSnap polygon to image pixels

Examples​

Basic labeling configuration for polygonal image segmentation​

<View>
<Polygon name="rect-1" toName="img-1" />
<Image name="img-1" value="$img" />
</View>