# Smart Polygon (Legacy)

{% hint style="info" %}
Roboflowは現在、 [強化されたSmart Polygon体験を](/roboflow/roboflow-jp/annotate/ai-labeling/enhanced-smart-polygon-with-sam.md) Segment Anything Model（SAM）によって提供しています。
{% endhint %}

Smart Polygonは、Roboflow Annotateで利用できるアノテーションアシスタントです。Smart Polygonを使うと、画像内の対象物に対するポリゴンアノテーションを生成できます。

## Smart Polygonの使い方

Smart Polygon機能を使うには、ラベリングツールバーのSmart Polygonをクリックします（ショートカットキー： `S`).

<figure><img src="https://lh5.googleusercontent.com/tJUGkNohp8gwqdaYO7U1nX7AKKVbi3sJidr0bWOaa4l6uLm7bCpqlKCwnSRwBCi7rQgAsVBaCu_nalTkcNvCPhtaOyciZrdNvEP0jadTq4aJS8YiB7Tytfr-FHEm6qDuTpI03sxBEviF1nXsMOYKXqz6vMPhv3rWyNre-I8-EngFL6OA6qbggFB10w" alt=""><figcaption><p>アノテーションツールバー内のSmart Polygon</p></figcaption></figure>

次に、ラベルを付けたい対象の中心をクリックすると、Smart Polygonがその対象に初期ラベルを適用します。

<figure><img src="/files/de2f80143d582de825356bff9461b5846b555b54" alt=""><figcaption><p>紫の輪郭は、1回のクリックで生成されたSmart Polygonアノテーションです。</p></figcaption></figure>

これにより、裏側で機械学習モデルが動作し、対象の形状が提案されます。

対象のポリゴンは1回のクリックだけで正確に予測される場合があり、Enterキーを押して次の対象に進み、その後その対象のクラスを選択できます。

ポリゴンを対象によりよく合わせるには、ハイライトされるべきではない対象上の領域をクリックします。これらは負のポイントとして追加され、アノテーションツールでは小さな赤い बॉックスで示されます。

<figure><img src="/files/8528e00f2a2c0a64cbb78f7d9b36e0826eea44c3" alt="" width="375"><figcaption><p>赤いポイントで、以前はポリゴンの一部だったが現在は削除された領域を示すポリゴン。</p></figcaption></figure>

アノテーションツール左上のSmart Polygonオプションを使うと、Convex Hull、Smooth、Complexラベルを切り替えて、ラベル内の頂点数を選択できます。また、間違えた場合は配置したポイントを元に戻すこともできます。

<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ラベル）</p></figcaption></figure>

## セグメンテーションレイヤーを可視化する

Smart Polygonは、セマンティックセグメンテーションデータのラベリングにも役立ちます。マスクが、モデルを学習させたい順序に従って正しく重なるように、オブジェクトのz-indexを適切に順序付けてください。重なりは、サイドバーの `Layers` タブを使って可視化できます。これにより、ラスター化された後のセグメンテーションマスクがどのように見えるかを理解しやすくなります。

その `Layers` タブは、すべてのRoboflowプロジェクトタイプで利用できます。 `Layers`の順序を変更せずにバウンディングボックスを編集するには、 `Layers` タブ内で編集したいLayer/アノテーションをクリックしてから編集を行ってください。


---

# 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-jp/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.
