> 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/yolov10.md).

# YOLOv10

YOLOv10 は、推論パスから非最大抑制を取り除いてレイテンシを低減する物体検出モデルです。Roboflow は、COCO で事前学習済みの YOLOv10 チェックポイントを短い別名で提供しており、あなたは [独自の重みをアップロードする](/models/ja/moderunomi/upload-custom-weights.md) 別の場所で学習したモデルを実行するために。

Roboflow での YOLOv10 の学習はサポートされていません。Roboflow で学習した検出器については、次を参照してください [RF-DETR](/models/ja/supported-models/rf-detr.md), [YOLO26](/models/ja/supported-models/yolo26.md)、または [YOLO11](/models/ja/supported-models/yolo11.md).

## YOLOv10 の事前学習済み別名

これらの ID のいずれかを `model_id` として指定すると、何も学習せずに COCO 事前学習済みチェックポイントを実行できます。完全な一覧は [事前学習済みモデルの別名](/models/ja/pretrained-aliases.md) ページにあります。

| モデル      | 入力サイズ | タスク  | モデル ID         | テスト                                                               |
| -------- | ----- | ---- | -------------- | ----------------------------------------------------------------- |
| YOLOv10n | 640   | 物体検出 | `yolov10n-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/19) |
| YOLOv10s | 640   | 物体検出 | `yolov10s-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/20) |
| YOLOv10m | 640   | 物体検出 | `yolov10m-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/21) |
| YOLOv10b | 640   | 物体検出 | `yolov10b-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/22) |
| YOLOv10l | 640   | 物体検出 | `yolov10l-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/23) |
| YOLOv10x | 640   | 物体検出 | `yolov10x-640` | [ブラウザでテスト](https://universe.roboflow.com/microsoft/coco/model/24) |

## YOLOv10 API

{% stepper %}
{% step %}

### APIキーを取得する

Roboflow アカウントを作成し、次の場所でキーを確認してください [Roboflow API 設定ページ](https://app.roboflow.com/settings/api) そしてシェルで使えるようにします:

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

{% endstep %}

{% step %}

### 依存関係をインストールする

Inference SDK をインストールし、 [supervision](https://supervision.roboflow.com/) 予測のデコードと描画に使用します：

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

{% endstep %}

{% step %}

### モデルを実行する

この例では、事前学習済みの `yolov10n-640` チェックポイントを実行します。独自の重みを提供するには、あなたの `{workspace}/{model-slug}` ID（参照： [バージョン、トレーニング、モデル](/models/ja/versions-trainings-and-models.md)).

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

image = sv.load_image_from_url("https://media.roboflow.com/inference/people-walking.jpg")

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="yolov10n-640")

detections = sv.Detections.from_inference(results)

labels = [
    f"{name} {conf:.2f}"
    for name, conf in zip(detections.data["class_name"], detections.confidence)
]
annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections, labels=labels)
cv2.imwrite("annotated.png", annotated)
```

{% endstep %}
{% endstepper %}

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

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

また、 [`inference`](https://docs.roboflow.com/deployment/self-hosted/self-hosted) パッケージを使用して、そのチェックポイントをプロセス内で読み込むこともできます：

```python
from inference import get_model

model = get_model(model_id="yolov10n-640")
results = model.infer("https://media.roboflow.com/inference/people-walking.jpg")
```
