> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/models/ja/supported-models/yolo26.md).

# YOLO26 オブジェクト検出

## YOLO26 オブジェクト検出

YOLO26 のオブジェクト検出は次のものを介して実行されます [Serverless Cloud API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api)、COCOで事前学習済みです。セルフホスト型デプロイについては、を参照してください [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

### YOLO26 オブジェクト検出 API

このサンプルはテスト画像をダウンロードし、次のものを通じて推論を実行します `inference-sdk`、応答を次のものでデコードし `supervision`、注釈付き PNG をディスクに書き込みます。

{% stepper %}
{% step %}
**APIキーを取得する**

Roboflow アカウントを作成し、 [Roboflow API 設定ページ](https://app.roboflow.com/settings/api) でキーを見つけ、シェルで利用できるようにします。

```bash
export ROBOFLOW_API_KEY="your-key-here"
```

{% endstep %}

{% step %}
**依存関係をインストールする**

SDK と [supervision](https://supervision.roboflow.com/) 注釈用ライブラリをインストールしてください：

```bash
pip install -U inference-sdk supervision opencv-python
```

{% endstep %}

{% step %}
**モデルを実行する**

実行 `yolo26n-640` をサンプル画像に適用し、ボックスとラベルを注釈します:

```python
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient, InferenceConfiguration

image_url = "https://media.roboflow.com/quickstart/traffic.jpg"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
).configure(InferenceConfiguration(api_key_transport="header"))
result = client.infer(image, model_id="yolo26n-640")
detections = sv.Detections.from_inference(result)

annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)
cv2.imwrite("traffic-annotated.png", annotated)
```

<figure><img src="/files/489b23d4a1333e9b93858e29025236b6266b8792" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
設定する `api_url` をデプロイ先に合わせます:

* `https://serverless.roboflow.com` サーバーレスクラウドAPI用。
* `http://localhost:9001` ローカルの [Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted) サーバー用。
* あなたの [Dedicated Deployment](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments) プライベートエンドポイント用のURL。
  {% endhint %}

### YOLO26 オブジェクト検出モデルとベンチマーク

これらのいずれかのエイリアスを以下として渡します `model_id`のいずれかです。 `inference-sdk` 各エイリアスを、クライアント側で対応する事前学習済み Roboflow Universe モデルに解決します。 `yolov26*` のプレフィックスバリアントは同じモデルに解決されます。

<table data-search="false"><thead><tr><th>別名</th><th>入力サイズ</th><th>mAP50-95</th><th>ONNXレイテンシ（ms）*</th><th>TensorRT FP16（ms）*</th></tr></thead><tbody><tr><td><code>yolo26n-640</code></td><td>640x640</td><td>40.9</td><td>3.5</td><td>2.2</td></tr><tr><td><code>yolo26s-640</code></td><td>640x640</td><td>48.6</td><td>4.7</td><td>3.0</td></tr><tr><td><code>yolo26m-640</code></td><td>640x640</td><td>53.1</td><td>8.4</td><td>4.4</td></tr><tr><td><code>yolo26l-640</code></td><td>640x640</td><td>55.0</td><td>10.7</td><td>5.6</td></tr><tr><td><code>yolo26x-640</code></td><td>640x640</td><td>57.5</td><td>18.4</td><td>8.0</td></tr></tbody></table>

## YOLO26 インスタンスセグメンテーション

YOLO26 のインスタンスセグメンテーションは次のものを介して実行されます [Serverless Cloud API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api)、COCOで事前学習済みです。セルフホスト型デプロイについては、を参照してください [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

### YOLO26 インスタンスセグメンテーション API

APIキーを設定し、上記のように依存関係をインストールしたら、次を実行します `yolo26n-seg-640` 、マスクとラベルに注釈を付けます：

```python
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/quickstart/traffic.jpg"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer(image, model_id="yolo26n-seg-640")
detections = sv.Detections.from_inference(result)

annotated = sv.MaskAnnotator().annotate(image.copy(), detections)
annotated = sv.BoxAnnotator().annotate(annotated, detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)
cv2.imwrite("traffic-annotated.png", annotated)
```

<figure><img src="/files/df9030da44d4994959aaf03f6a282fc4889a1d18" alt=""><figcaption></figcaption></figure>

### YOLO26 インスタンスセグメンテーションモデルとベンチマーク

これらのいずれかのエイリアスを以下として渡します `model_id`； `yolov26*` のプレフィックスバリアントは同じモデルに解決されます。Box と mask の mAP はエンドツーエンド（NMS なし）の COCO `val` の値です。

<table data-search="false"><thead><tr><th>別名</th><th>入力サイズ</th><th>Box mAP50-95</th><th>マスクmAP50-95</th><th>ONNXレイテンシ（ms）*</th><th>TensorRT FP16（ms）*</th></tr></thead><tbody><tr><td><code>yolo26n-seg-640</code></td><td>640x640</td><td>39.6</td><td>33.9</td><td>8.3</td><td>6.8</td></tr><tr><td><code>yolo26s-seg-640</code></td><td>640x640</td><td>47.3</td><td>40.0</td><td>10.8</td><td>8.5</td></tr><tr><td><code>yolo26m-seg-640</code></td><td>640x640</td><td>52.5</td><td>44.1</td><td>16.4</td><td>11.9</td></tr><tr><td><code>yolo26l-seg-640</code></td><td>640x640</td><td>54.4</td><td>45.5</td><td>18.4</td><td>12.8</td></tr><tr><td><code>yolo26x-seg-640</code></td><td>640x640</td><td>56.5</td><td>47.0</td><td>28.9</td><td>15.7</td></tr></tbody></table>

## YOLO26 キーポイント検出

YOLO26 のキーポイント/ポーズ検出は次のものを介して実行されます [Serverless Cloud API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api)、COCOで事前学習済みです。セルフホスト型デプロイについては、を参照してください [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

### YOLO26 キーポイント検出 API

APIキーを設定し、上記のように依存関係をインストールしたら、次を実行します `yolo26n-pose-640` そしてキーポイントに注釈を付けます:

```python
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/notebooks/examples/person-walking.png"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer(image, model_id="yolo26n-pose-640")
key_points = sv.KeyPoints.from_inference(result)

annotated = sv.VertexAnnotator(color=sv.Color.RED, radius=5).annotate(image.copy(), key_points)
cv2.imwrite("person-walking-annotated.png", annotated)
```

<figure><img src="/files/dbadce291e44add6f6fb6288b1ff4ea7369b2123" alt=""><figcaption></figcaption></figure>

### YOLO26 キーポイント検出モデルとベンチマーク

これらのいずれかのエイリアスを以下として渡します `model_id`； `yolov26*` のプレフィックスバリアントは同じモデルに解決されます。mAP はエンドツーエンド（NMS なし）の COCO `val` の値です。

<table data-search="false"><thead><tr><th>別名</th><th>入力サイズ</th><th>mAP50-95</th><th>ONNXレイテンシ（ms）*</th><th>TensorRT FP16（ms）*</th></tr></thead><tbody><tr><td><code>yolo26n-pose-640</code></td><td>640x640</td><td>57.2</td><td>3.8</td><td>2.3</td></tr><tr><td><code>yolo26s-pose-640</code></td><td>640x640</td><td>63.0</td><td>5.1</td><td>3.3</td></tr><tr><td><code>yolo26m-pose-640</code></td><td>640x640</td><td>68.8</td><td>9.0</td><td>4.6</td></tr><tr><td><code>yolo26l-pose-640</code></td><td>640x640</td><td>70.4</td><td>11.2</td><td>5.8</td></tr><tr><td><code>yolo26x-pose-640</code></td><td>640x640</td><td>71.6</td><td>19.1</td><td>8.3</td></tr></tbody></table>

## YOLO26 セマンティックセグメンテーション

YOLO26 セマンティックセグメンテーション（`yolo26-sem`）は、Roboflow でのセマンティックセグメンテーションに推奨されるアーキテクチャです。Cityscapes で事前学習された重みを使用し、デフォルト解像度 1024x1024 で学習します。n、s、m、l、x の5サイズで利用できます。

YOLO26-SEM モデルを学習するには、セマンティックセグメンテーションプロジェクトを作成し、アーキテクチャとして YOLO26 を選択してください。さらに、 [カスタム学習済み重みをアップロードすることもできます](/models/ja/moderunomi/upload-custom-weights.md) YOLO26-SEM モデル用に。

Cityscapes 事前学習済みモデル（19 クラス）も、次の環境で実行できる公開モデルとして利用できます [Workflow](https://docs.roboflow.com/workflows) 、学習なしで。

### YOLO26 セマンティックセグメンテーションモデルとベンチマーク

これらの Cityscapes 事前学習済みエイリアスのいずれかを `model_id`； `yolov26*` のプレフィックスバリアントは同じモデルに解決されます。ONNX バックエンドのみで実行され、事前ビルド済みの TensorRT エンジンは公開されていません。

<table data-search="false"><thead><tr><th>別名</th><th>入力サイズ</th><th>ONNXレイテンシ（ms）*</th></tr></thead><tbody><tr><td><code>yolo26n-sem-1024</code></td><td>1024x1024</td><td>23.3</td></tr><tr><td><code>yolo26s-sem-1024</code></td><td>1024x1024</td><td>25.9</td></tr><tr><td><code>yolo26m-sem-1024</code></td><td>1024x1024</td><td>34.6</td></tr><tr><td><code>yolo26l-sem-1024</code></td><td>1024x1024</td><td>35.8</td></tr><tr><td><code>yolo26x-sem-1024</code></td><td>1024x1024</td><td>53.2</td></tr></tbody></table>

***

\* レイテンシは以下で測定されています [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted) 1x NVIDIA L4上で、バッチサイズ1、1,000回の推論の平均（100回のウォームアップ）です。デフォルトの `inference-gpu` インストールではONNXをCUDA実行プロバイダ上で実行します。以下を追加すると `inference-models[trt10]` extra を選ぶと、事前ビルド済みの TensorRT FP16 エンジンが自動的に選択されます。FP16 は COCO `val2017`。精度は公開されているCOCO `val` 仕様（[ソース](https://docs.ultralytics.com/models/yolo26/)).
