> 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/roboflow/roboflow-ko/deploy/serverless/video-inference/use-clip.md).

# CLIP 사용

CLIP은 다음과 같이 사용할 수 있는 zero-shot 분류 모델입니다:

1. 이미지를 분류합니다;
2. 이미지를 군집화합니다;
3. 텍스트 프롬프트와 이미지 간의 유사도를 비교합니다;
4. 두 이미지 간의 유사도를 비교하는 등.

Roboflow Video Inference API는 비디오의 프레임에 대해 원시 CLIP 임베딩(선택한 모델에 따라 512 또는 768 차원)을 반환하거나, 텍스트 또는 이미지 벡터를 비교하여 각 프레임에 대한 코사인 유사도 점수를 반환할 수 있습니다.

### Video Inference API에서 CLIP 사용하기

먼저 Roboflow Python 패키지를 설치하세요:

```bash
pip install roboflow
```

다음으로, 새 Python 파일을 만들고 아래 코드를 추가하세요:

```python
from roboflow import Roboflow, CLIPModel

rf = Roboflow(api_key="API_KEY")
model = CLIPModel()

job_id, signed_url, expire_time = model.predict_video(
    "football-video.mp4",
    fps=5,
    prediction_type="batch-video",
)

results = model.poll_until_video_results(job_id)

print(results)
```

위에서 다음을 바꾸세요:

* `API_KEY`: Roboflow API key로
* `PROJECT_NAME`: Roboflow project ID로
* `MODEL_ID`: Roboflow model ID로

[API key를 가져오는 방법 알아보기](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key).

[model ID를 가져오는 방법 알아보기](https://docs.roboflow.com/api-reference/workspace-and-project-ids).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/serverless/video-inference/use-clip.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
