# What's the difference between the Polygon tool and the Segmentation tool?

Both the [Polygon](/labeling/labeling-tools/tools/polygon.md) tool and the [Segmentation](/labeling/labeling-tools/tools/segmentation.md) tool let labelers draw closed shapes around objects or areas of interest. The main difference is how much structure the annotation needs.

Use the Polygon tool when each annotation is one closed outline. Use the Segmentation tool when one annotation may need multiple disconnected areas, holes, or merge/subtract operations.

<table><thead><tr><th width="180">Need</th><th>Use Polygon when...</th><th>Use Segmentation when...</th></tr></thead><tbody><tr><td>Shape complexity</td><td>The object can be represented by one closed outline.</td><td>The object may contain holes or multiple separate regions that should be treated as one object.</td></tr><tr><td>Editing workflow</td><td>Labelers mainly need to place, move, add, or delete outline points.</td><td>Labelers need to merge regions, subtract one region from another, cut holes, erase parts of an annotation, or add to an existing segmentation.</td></tr><tr><td>Export structure</td><td>You want a simple <code>polygon</code> list of X/Y points.</td><td>You want a <code>segmentation</code> object containing <code>zones</code>, where each zone has a <code>region</code> and optional <code>holes</code>.</td></tr><tr><td>Mask workflows</td><td>You mainly need straightforward vector outlines.</td><td>You need Hub's segmentation mask workflow or mask-oriented output.</td></tr><tr><td>Benchmarking</td><td>You need a tool currently supported by benchmarks.</td><td>You do not need benchmark support for this tool.</td></tr></tbody></table>

## Polygon

A Polygon annotation is a single closed shape. In export and import JSON, it is represented as a list of X/Y coordinate pairs:

```json
"polygon": [
  [118, 459],
  [299, 327],
  [479, 459]
]
```

Polygons are a good fit for objects that can be described by one boundary, such as a vehicle outline, a building footprint, or a visible object surface with no holes.

The Polygon tool also supports features such as edge sharing, continuous drawing, and nudging. See the [Polygon tool page](/labeling/labeling-tools/tools/polygon.md) for the full drawing workflow.

## Segmentation

A Segmentation annotation is an instance that can contain one or more zones. Each zone contains one region and can contain holes:

```json
"segmentation": {
  "zones": [
    {
      "region": [
        [64, 64],
        [64, 156],
        [156, 156]
      ],
      "holes": []
    }
  ]
}
```

Segmentations are a better fit when one object should remain one annotation but the shape is more complex. For example, use Segmentation if an object has an internal empty area, if one object appears as multiple disconnected visible parts, or if labelers need to use merge, subtract, erase, or auto-merge workflows while labeling.

Both tools can be used with AI-assisted annotation through [Auto Suggestion](/labeling/labeling-ai-assistance/auto-suggestion.md). See the [Segmentation tool page](/labeling/labeling-tools/tools/segmentation.md) for the full drawing workflow.

## Changing from Polygon to Segmentation

In the labeling editor, a Polygon annotation can be changed to a Segmentation category. When this happens, Hub converts the polygon outline into a segmentation with one zone and no holes.

The reverse is not equivalent: a Segmentation can contain multiple zones and holes, so it cannot always be represented as one Polygon without losing structure.

## Importing and exporting

When importing annotations, use the format that matches the tool in your project ontology:

* Polygon tools expect a `polygon` field containing a list of X/Y points.
* Segmentation tools expect a `segmentation` field containing `zones`, `region`, and `holes`.

When exporting annotations, segmentation point coordinates are only included if the *Segmentation Points* field is enabled during export. See the [Ango Export Format Tools page](/data/importing-and-exporting-annotations/exporting-annotations/ango-export-format/asset/task/tools.md#segmentation) for the exact export structure.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imerit.net/other/whats-the-difference-between-the-polygon-tool-and-the-segmentation-tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
