# Smart Polygon (Legacy)

{% hint style="info" %}
Roboflow는 이제 [향상된 Smart Polygon 경험을 제공합니다](/roboflow/roboflow-ko/annotate/ai-labeling/enhanced-smart-polygon-with-sam.md) Segment Anything Model (SAM)으로 구동됩니다.
{% endhint %}

Smart Polygon은 Roboflow Annotate에서 사용할 수 있는 annotation assistant입니다. Smart Polygon을 사용하면 이미지의 객체에 대한 polygon annotation을 생성할 수 있습니다.

## Smart Polygon 사용 방법

Smart Polygon 기능을 사용하려면 labeling toolbar에서 Smart Polygon을 클릭하세요(Shortcut Key: `S`).

<figure><img src="https://lh5.googleusercontent.com/tJUGkNohp8gwqdaYO7U1nX7AKKVbi3sJidr0bWOaa4l6uLm7bCpqlKCwnSRwBCi7rQgAsVBaCu_nalTkcNvCPhtaOyciZrdNvEP0jadTq4aJS8YiB7Tytfr-FHEm6qDuTpI03sxBEviF1nXsMOYKXqz6vMPhv3rWyNre-I8-EngFL6OA6qbggFB10w" alt=""><figcaption><p>Annotation Toolbar의 Smart Polygon</p></figcaption></figure>

그다음, 라벨을 지정하려는 객체의 중심을 클릭하면 Smart Polygon이 해당 객체에 초기 label을 적용합니다.

<figure><img src="/files/e6350de85e2400f0d6d71bfe7ab2a370859b2f83" alt=""><figcaption><p>보라색 윤곽선은 한 번의 클릭으로 생성된 Smart Polygon annotation입니다.</p></figcaption></figure>

이 기능은 뒤에서 machine learning model을 사용해 객체의 형태를 제안합니다.

대상 polygon은 단 한 번의 클릭만으로 정확하게 예측될 수 있으며, Enter를 눌러 다음 객체로 넘어간 뒤 객체의 class를 선택할 수 있습니다.

polygon이 객체에 더 잘 맞도록 하려면, 강조 표시되면 안 되는 객체의 영역을 클릭하세요. 이러한 영역은 negative point로 추가되며, annotation tool에서는 작은 빨간 상자로 표시됩니다.

<figure><img src="/files/49fee55672c5fdeef934ef1407c8066c41c5f0c4" alt="" width="375"><figcaption><p>이전에 polygon의 일부였지만 이제 제거된 영역을 빨간 점으로 표시한 polygon입니다.</p></figcaption></figure>

annotation tool의 왼쪽 상단에 있는 Smart Polygon 옵션을 사용하면 Convex Hull, Smooth, Complex labels 사이를 전환하여 label의 vertex 수를 선택할 수 있습니다. 실수한 경우 배치한 point를 되돌릴 수도 있습니다.

<figure><img src="https://blog.roboflow.com/content/images/2022/09/Screen-Shot-2022-09-26-at-4.19.59-PM.png" alt=""><figcaption><p>Smart Polygon 옵션(Convex Hull, Smooth, Complex labels)</p></figcaption></figure>

## Segmentation Layers 시각화

Smart Polygon은 semantic segmentation 데이터를 라벨링하는 데도 유용합니다. 다만 객체의 z-index를 올바르게 정렬하여, 모델을 학습시키고자 하는 방식에 맞게 mask가 제대로 쌓이도록 하세요. 다음을 사용해 쌓임을 시각화할 수 있습니다. `Layers` sidebar의 tab입니다. rasterize된 후 segmentation mask가 어떻게 보일지 이해하는 데 도움이 됩니다.

다음 `Layers` tab은 모든 Roboflow project type에서 사용할 수 있습니다. 순서를 변경하지 않고 bounding box를 편집하려면 `Layers`에서 편집하려는 Layer/annotation을 간단히 클릭한 다음 `Layers` tab


---

# 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.roboflow.com/roboflow/roboflow-ko/annotate/ai-labeling/enhanced-smart-polygon-with-sam/smart-polygon.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.
