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

# YOLOlite

YOLOlite는 Roboflow의 경량 객체 탐지 모델 패밀리로, 낮은 지연 시간 배포와 엣지 하드웨어를 위해 설계되었습니다. YOLOlite를 a [프로젝트](https://docs.roboflow.com/platform/workspaces/key-concepts) Roboflow에서 학습하고, 우리의 [서버리스 호스티드 API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api).

셀프 호스팅 배포에 대해서는 다음을 참조하세요 [Roboflow Inference](https://docs.roboflow.com/deployment/self-hosted/self-hosted).

YOLOlite 입력 크기는 Roboflow에서 학습하는 동안 구성됩니다.

## 사용 가능한 변형

YOLOlite는 표준 세트와 엣지 최적화 세트의 두 가지 스케일링 패밀리로 제공됩니다. 각 세트는 다섯 가지 크기로 제공됩니다.

<table data-search="false"><thead><tr><th>패밀리</th><th>변형</th></tr></thead><tbody><tr><td>표준</td><td><code>yololite-n</code>, <code>yololite-s</code>, <code>yololite-m</code>, <code>yololite-l</code>, <code>yololite-xl</code></td></tr><tr><td>엣지</td><td><code>yololite-edge-n</code>, <code>yololite-edge-s</code>, <code>yololite-edge-m</code>, <code>yololite-edge-l</code>, <code>yololite-edge-xl</code></td></tr></tbody></table>

프로젝트에서 학습을 시작할 때 변형을 선택합니다. 그러면 학습된 모델은 Serverless Hosted API에서 제공되며, 모델별 `{workspace}/{model-slug}` ID (참조 [버전, 학습, 및 모델](/models/ko/versions-trainings-and-models.md)).

## 코드 샘플

{% stepper %}
{% step %}

### API 키 받기

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

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

{% endstep %}

{% step %}

### 의존성 설치하기

다음을 설치하세요 [Inference SDK](https://docs.roboflow.com/reference/inference/inference-sdk) 및 [supervision](https://supervision.roboflow.com/):

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

{% endstep %}

{% step %}

### 모델 실행하기

이 예시는 다음에서 학습된 공개 YOLOlite 모델을 실행합니다. [나사 데이터셋](https://universe.roboflow.com/erik-pe6au/rf-bolts) (screw, flat-washer, hex-nut). 자신의 것으로 바꾸세요 `{workspace}/{model-slug}` 학습된 가중치를 실행합니다.

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

image = sv.load_image_from_url("https://media.roboflow.com/docs/bolts.jpg")

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="erik-pe6au/rf-bolts-4-yololite-s-t1")

detections = sv.Detections.from_inference(results)

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

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

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

{% hint style="info" %}
설정하세요 `api_url` 배포 대상에 맞게 설정하세요:

* `https://serverless.roboflow.com` Serverless Hosted 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 %}
