Shared Edges is a feature of both image and video annotation that is useful for instance, semantic, and panoptic segmentation. There are two primary benefits of using shared edges for segmentation:
- Increased annotation speed and efficiency. An annotator can draw a complex polygon profile once, and then share an edge of that profile with an adjacent polygon, instead of drawing the profile twice.
- Increased segmentation accuracy. Boundaries between segmented objects are guaranteed to produce a unique entity classification for every pixel, where edges are shared. There are no unclassified pixels or overlapping classifications.
By combining the efficiency of polygon segmentation with perfect segmentation boundaries, Shared Edges enables a highly accurate and fast segmentation workflow.
Enabling Shared Edges
When annotating an image or video, select the polygon creation tool in the top left of the vertical toolbar. Once selected, this will bring up the Polygon Tool Settings in the bottom left corner of the screen. Here there should be a checkbox labeled “Snap to Edge”. Selecting this option will enable the shared edges feature. With the feature now enabled, there are two primary approaches/techniques to utilizing this feature
Drawing New Polygons
After an initial polygon has been created, a secondary polygon can be manually created on its peripheral. The shared edges feature will allow the annotator to select points on the edge of the initial polygon when drawing the boundaries of the secondary polygon. Click an edge to start the shared segment. The edge will automatically snap to the edge of the first polygon creating a seamless border between the two. The direction of your mouse cursor will determine the direction of the shared edge. When you want to exit the shared edge click on an existing vertex or create a new one, to mark the end of the shared segment, and continue drawing.
Connecting Existing Polygons
When multiple polygons are present that lack a shared edge in their initial creation, the polygon borders of both shapes can be snapped together to create a shared edge between them. When the border points of a polygon are dragged to the border of another, they will automatically snap together thus generating a shared edge. This is especially useful when making use of the SmartPoly feature to generate the initial polygons. SmartPoly will not generate shared edges when used on bordering shapes, but this method of manual adjustment can work to join auto-generated shapes quickly and easily.
Helpful Tips for Using Shared Edges
Sharing an Edge Across Multiple Polygons
The shared edges feature is not limited to use with only two shapes, but rather can be scaled infinitely to segment a scene to the highest degrees of accuracy. Polygons can be drawn to share edges across multiple other polygons allowing for semantic, and further, panoptic segmentation. As more polygons are drawn, the annotator can employ a combination of the two previously discussed techniques to segment the scene.
Editing & Unlocking Shared Edges
Once an edge is shared, the sharing is locked, and editing of the shared vertices maintains the sharing between the two polygons. In other words, creating additional vertices or moving existing ones will affect all polygons that share that edge. The sharing also persists across stages, e.g., annotation and review. If a mistake is made, or you no longer want the edge to be shared, you can unshare the edge. To do this, simply right-click along the shared edge in question (but not directly on a vertice) and select the Unshare Edge option in the context menu that appears. This will result in the edge being unlocked allowing for both polygons to be edited independently of one another.
Segment Complex Shapes First then Snap in Background Polygons
With segmentation tasks like roadway scenes, it can be more efficient to segment smaller more complex shapes, like pedestrians, first and then use Shared Edges to snap polygons for background elements like roadways or skies to the complex contours.
Use with ML Powered Tooling
Alegion's additional segmentation tools allow Shared Edges to be used concurrently with machine learning to exponentially increase efficiency. The most notable workflow would be to use SmartPoly to segment complex shapes and then snap them together using Shared Edges. When using these tools together the possibilities are endless.