> 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/ko/supported-models/yolo11.md).

# YOLO11 객체 탐지

YOLO11 객체 탐지는 다음을 통해 [서버리스 클라우드 API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api)640 입력 크기의 COCO로 사전 학습되었습니다. 자체 호스팅 배포는 다음을 참조하세요 [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

## YOLO11 객체 탐지 API

이 샘플은 Serverless Cloud API를 통해 추론을 실행하고, 응답을 다음으로 디코딩한 뒤 [`supervision`](https://supervision.roboflow.com/)주석이 달린 이미지를 디스크에 저장합니다.

{% stepper %}
{% step %}

#### API 키 받기

Roboflow 계정을 만들고, [Roboflow API 설정 페이지](https://app.roboflow.com/settings/api) 에서 키를 찾아 셸에서 사용할 수 있게 하세요:

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

{% endstep %}

{% step %}

#### 의존성을 설치하세요

이 두 패키지는 모델을 호출하고 결과를 그립니다:

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

{% endstep %}

{% step %}

#### 모델 실행

실행 `yolov11n-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"))

results = client.infer(image, model_id="yolov11n-640")
detections = sv.Detections.from_inference(results)

annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)

cv2.imwrite("traffic-annotated.png", annotated)
```

<figure><img src="/files/b351cff3d2217d0a9494ec3976b7e4811e163dd2" 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) 서버용입니다.
* 귀하의 [전용 배포](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments) 는 비공개 엔드포인트의 URL입니다.
  {% endhint %}

## YOLO11 객체 탐지 모델 및 벤치마크

다음 별칭 중 하나를 `model_id`. `inference-sdk` 각 별칭을 사전 학습된 Roboflow Universe 모델로 연결합니다; 해당 `yolo11*` 접두사 변형은 동일한 모델로 연결됩니다.

<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>yolov11n-640</code></td><td>640x640</td><td>39.5</td><td>3.4</td><td>2.2</td></tr><tr><td><code>yolov11s-640</code></td><td>640x640</td><td>47.0</td><td>4.5</td><td>2.5</td></tr><tr><td><code>yolov11m-640</code></td><td>640x640</td><td>51.5</td><td>8.3</td><td>3.5</td></tr><tr><td><code>yolov11l-640</code></td><td>640x640</td><td>53.4</td><td>10.7</td><td>4.3</td></tr><tr><td><code>yolov11x-640</code></td><td>640x640</td><td>54.7</td><td>18.8</td><td>7.1</td></tr></tbody></table>

\# YOLO11 인스턴스 세분화

YOLO11 인스턴스 세분화는 다음을 통해 [서버리스 클라우드 API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api)640 입력 크기의 COCO로 사전 학습되었습니다. 자체 호스팅 배포는 다음을 참조하세요 [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

## YOLO11 인스턴스 세분화 API

위에 표시된 대로 API 키를 설정하고 의존성을 설치한 다음 `yolov11n-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"],
)

results = client.infer(image, model_id="yolov11n-seg-640")
detections = sv.Detections.from_inference(results)

annotated = sv.MaskAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator(text_position=sv.Position.CENTER_OF_MASS).annotate(annotated, detections)

cv2.imwrite("traffic-annotated.png", annotated)
```

<figure><img src="/files/1f28d6698a67593c862ef46c98a168f6b108a2c1" alt=""><figcaption></figcaption></figure>

## YOLO11 인스턴스 세분화 모델 및 벤치마크

다음 별칭 중 하나를 `model_id`;  `yolo11*` 접두사 변형은 동일한 모델로 연결됩니다.

<table data-search="false"><thead><tr><th>별칭</th><th>입력 크기</th><th>박스 mAP50-95</th><th>마스크 mAP50-95</th><th>ONNX 지연 시간(ms)*</th><th>TensorRT FP16(ms)*</th></tr></thead><tbody><tr><td><code>yolov11n-seg-640</code></td><td>640x640</td><td>38.9</td><td>32.0</td><td>7.3</td><td>5.7</td></tr><tr><td><code>yolov11s-seg-640</code></td><td>640x640</td><td>46.6</td><td>37.8</td><td>10.0</td><td>7.5</td></tr><tr><td><code>yolov11m-seg-640</code></td><td>640x640</td><td>51.5</td><td>41.5</td><td>14.5</td><td>9.1</td></tr><tr><td><code>yolov11l-seg-640</code></td><td>640x640</td><td>53.4</td><td>42.9</td><td>16.8</td><td>9.7</td></tr><tr><td><code>yolov11x-seg-640</code></td><td>640x640</td><td>54.7</td><td>43.8</td><td>27.5</td><td>13.1</td></tr></tbody></table>

***

\* 지연 시간은 다음으로 측정했습니다 [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted) 1x NVIDIA L4에서 배치 크기 1, 1,000회 추론의 평균(100회 워밍업). 기본 `inference-gpu` 설치는 CUDA 실행 공급자에서 ONNX를 실행합니다. 다음을 추가하면 `inference-models[trt10]` 추가를 사용하면 미리 빌드된 TensorRT FP16 엔진이 자동으로 선택됩니다. FP16은 COCO `val2017`. 정확도는 공개된 COCO `val2017` 사양 ([출처](https://docs.ultralytics.com/models/yolo11/)).
