Polygon Tool
Learn how to use the Polygon Tool for precise object annotation in semantic and instance segmentation tasks with Supervisely.
Last updated
Learn how to use the Polygon Tool for precise object annotation in semantic and instance segmentation tasks with Supervisely.
Last updated
The Polygon is a powerful tool for outlining the boundaries of objects in images or other data. It works by connecting a series of points to create polygonal figures that accurately represent the shape of an object. Usually, Polygon annotation is used to address semantic segmentation and instance segmentation tasks in computer vision.
Unlike bounding boxes, which use rectangles to enclose objects, polygons offer greater flexibility by allowing any number of points to closely follow an object’s exact shape. This tool is ideal for complex or irregular shapes where precise object boundaries are necessary.
Take a moment to watch our comprehensive 5-minute video tutorial, which provides clear and straightforward instructions on how to unlock the full capabilities of our newly enhanced Polygon annotation tool.
Below are step-by-step instructions for creating a polygon class, manually annotating objects, refining annotations, working with holes, and other advanced features to improve your annotation process.
You can create a new class directly from the Annotation Toolbox. To do this:
Click the Polygon Icon in the toolbar of the labeling interface.
Or select an existing object class or add a new class by clicking Add new class definition.
In the modal window, enter the class name, choose the Polygon or Any shape, and configure additional settings (e.g., color, hotkeys).
Click the Create
button to add the new class to the definitions list.
Select the newly created class and draw a polygon around the object boundaries in the image or video.
Click along the outline of the object to add points. Each click creates a new point connected by a line.
To complete the shape, press SPACE
or return to the starting point.
You can easily adjust existing polygons by moving, adding, or removing points as needed. Just CLICK + DRAG
any existing point to change its position and adjust the shape.
Click on the edges of the polygon to add new points or SHIFT + CLICK
on a point to remove it.
Correcting and refining annotations
To correct or refine an annotation, you can add new areas by clicking along the object's edge or remove unwanted sections by specifying new connecting points on the shape.
Automatic object linking
Automatically link objects without the need for precise alignment to individual object boundaries. To use this feature, move the pointer over a labeled object and click the nearest point. Then click subsequent points along the boundary to automatically link shapes.
Auto-placement points
Simply hold the SHIFT
key and drag your cursor along the object to automatically set points, making it perfect for objects with smooth and non-linear contours. To add or remove a labeled area, first select or place a starting point, then continue by holding SHIFT
to segment the area, and finish the path at any existing point.
Holes creation
To create a hole in a polygon, hold SHIFT
and click to define it. You can then hover over the hole and edit it just like any other polygon. To remove a hole, move the cursor over it and press DELETE
.
Turn on the Auto-Select feature and hover over any polygon to automatically select it for editing. This feature makes it easier to modify existing annotations without manually selecting each shape.
Use the Object Color Randomizer to instantly change the color of any object with a single click, as often as you like. This is particularly useful if you have many objects of the same class, or if they are close together, so you can easily differentiate between polygons.
Learn more about the advanced capabilities of the Polygon tool and its effective use for semantic and instance segmentation tasks in our comprehensive blog post:
Polygon Tool (minimum 3 points required) | 7 |
---|---|
Auto-placement of points |
---|
Holes |
---|
Replace edges in existing polygon |
---|
Scene Navigation |
---|
Click any point, draw a polyline, finish by clicking any other point or the polygon border
Start & add point
Add point on edge
Move point
Drag
Remove point
Finish
Space
Finish
You can then hover over other holes and edit them just like any other polygon. If you want to remove a hole, move the cursor over the hole and press Delete
.
Shift +
the first point
When you create or edit a polygon instead of clicking multiple times, you can hold both Shift and and draw a line.
You can hold Shift and press to create polygon hole
Zoom with Mouse wheel. Hold to move scene.