Skip to main content

<VectorLabels>

Category: Control tag

The VectorLabels tag is used to create labeled vectors. Use to apply labels to vectors in semantic segmentation tasks.

Use with the following data types: image.

Key Features​

Point Management​

  • Add Points: Click on empty space, Shift+click on path segments
  • Edit Points: Drag to reposition, Shift+click to convert regular ↔ bezier
  • Delete Points: Alt+click on existing points
  • Multi-Selection: Select multiple points for batch transformations
  • Break Closed Path: Alt+click on any segment of a closed path to break it at that specific segment

Bezier Curves​

  • Create: Drag while adding points or convert existing points
  • Edit: Drag control points, disconnect/reconnect control handles
  • Control: curves prop to enable/disable bezier functionality

Keyboard Shortcuts & Hotkeys​

Point Creation & Editing​

  • Click: Add new point in drawing mode
  • Shift + Click on a segment: Add point on path segment (insert between existing points)
  • Shift + Drag: Create bezier point with control handles
  • Shift + Click on a point: Convert point between regular ↔ bezier
  • Alt + Click on a segment: Break closed path at segment (when path is closed)

Point Selection​

  • Click: Select single point
  • Cmd/Ctrl + Click: Add point to multi-selection
  • Cmd/Ctrl + Click on shape: Select all points in the path
  • Cmd/Ctrl + Click on point: Toggle point selection in multi-selection

Path Management​

  • Click on first/last point: Close path bidirectionally (firstβ†’last or lastβ†’first)
  • Shift + Click: Add point on path segment without closing

Bezier Curve Control​

  • Drag control points: Adjust curve shape
  • Alt + Drag control point: Disconnect control handles (make asymmetric)
  • Shift + Drag: Create new bezier point with control handles

Multi-Selection & Transformation​

  • Select multiple points: Use Cmd/Ctrl + Click to build selection
  • Transform selection: Use transformer handles for rotation, scaling, and translation
  • Clear selection: Click on any point

Usage Examples​

Basic Vector Path​

<View>
<Image name="image" value="$image" />
<VectorLabels name="labels" toName="image">
<Label value="Road" />
<Label value="Boundary" />
</VectorLabels>
</View>

Polygon with Bezier Support​

<View>
<Image name="image" value="$image" />
<VectorLabels
name="polygons"
toName="image"
closable={true}
curves={true}
minPoints="3"
maxPoints="20"
>
<Label value="Building" />
<Label value="Park" />
</VectorLabels>
</View>

Skeleton Mode for Branching Paths​

<View>
<Image name="image" value="$image" />
<VectorLabels
name="skeleton"
toName="image"
skeleton={true}
closable={false}
curves={true}
>
<Label value="Tree" />
<Label value="Branch" />
</VectorLabels>
</View>

Keypoint Annotation Tool​

<View>
<Image name="image" value="$image" />
<VectorLabels
name="keypoints"
toName="image"
closable={false}
curves={false}
minPoints="1"
maxPoints="1"
>
<Label value="Eye" />
<Label value="Nose" />
<Label value="Mouth" />
</VectorLabels>
</View>

Advanced Features​

Path Breaking​

When a path is closed, you can break it at any segment:

  • Alt + Click on any segment of a closed path
  • The path breaks at that segment
  • The breaking point becomes the first element
  • The point before breaking becomes active

Skeleton Mode​

  • Purpose: Create branching paths instead of linear sequences
  • Behavior: New points connect to the active point, not the last added point
  • Use Case: Tree structures, network diagrams, anatomical features

Bezier Curve Management​

  • Symmetric Control: By default, control points move symmetrically
  • Asymmetric Control: Hold Alt while dragging to disconnect handles
  • Control Point Visibility: Control points are shown when editing bezier points

Multi-Selection Workflow​

  1. Build Selection: Use Cmd/Ctrl + Click to add points
  2. Transform: Use transformer handles for rotation, scaling, translation
  3. Batch Operations: Apply transformations to all selected points
  4. Clear: Click outside or use programmatic methods

Props Reference​

Attributes​

AttributeTypeRequiredDefaultDescription
namestringyesβ€”Name of tag
toNamestringyesβ€”Name of 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
opacitynumberno0.2Opacity of vector
fillColorstringnoβ€”Vector fill color in hexadecimal
strokeColorstringnoβ€”Stroke color in hexadecimal
strokeWidthnumberno1Width of stroke
pointSizesmall,medium,largenomediumSize of vector handle points
pointStylerectangle,circlenorectangleStyle of points
snappixel,nonenononeSnap vector to image pixels
closabletrue,falsenofalseAllow closed shapes
curvestrue,falsenofalseAllow Bezier curves
skeletontrue,falsenofalseEnables skeleton mode to allow branch paths
minPointsnumber,nonenononeMinimum allowed number of points
maxPointsnumber,nonenononeMaximum allowed number of points
pointsizeenablednumberno5Size of a point in pixels when shape is selected
pointsizedisablednumberno5Size of a point in pixels when shape is not selected