> 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/supported-models/l2cs-net.md).

# L2Cs-Net

L2Cs-Net은 얼굴을 감지하고 각 얼굴의 yaw 및 pitch 각도를 예측하는 시선 방향 추정 모델입니다. 다음을 통해 실행할 수 있습니다. [Serverless Hosted API](/roboflow/roboflow-ko/deploy/serverless-hosted-api-v2.md).

## 코드 샘플

다음을 호출하세요 `/gaze/gaze_detection` 엔드포인트를 직접 `curl`:

```bash
curl --location 'https://serverless.roboflow.com/gaze/gaze_detection' \
  --header 'Content-Type: application/json' \
  --data '{
    "api_key": "YOUR_API_KEY",
    "image": {"type": "url", "value": "https://media.roboflow.com/inference/man.jpg"}
  }'
```

SDK를 통한 동일한 호출입니다. 먼저 설치하세요:

```bash
pip install inference-sdk
```

아래 코드 샘플은 `detect_gazes`를 호출하며, 이는 동일한 `/gaze/gaze_detection` 엔드포인트에 요청합니다. 다음을 전달하세요. [Roboflow API Key](https://app.roboflow.com/settings/api) 다음을 통해 `API_KEY` env 변수.

```python
import os
import urllib.request
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/inference/man.jpg"
image_path = "man.jpg"
urllib.request.urlretrieve(image_url, image_path)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.getenv("API_KEY"),
).select_api_v1()

result = client.detect_gazes(image_path)

for prediction in result[0]["predictions"]:
    face = prediction["face"]
    yaw = prediction["yaw"]
    pitch = prediction["pitch"]
    print(f"Face at ({face['x']}, {face['y']}) - yaw: {yaw:.3f}, pitch: {pitch:.3f}")
```

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

* `https://serverless.roboflow.com` Serverless Hosted API용.
* `http://localhost:9001` 로컬 [Inference](https://inference.roboflow.com/) 서버.
* 당신의 [Dedicated Deployment](/roboflow/roboflow-ko/deploy/dedicated-deployments.md) 비공개 엔드포인트용 URL입니다.
  {% endhint %}

응답에는 다음이 포함된 리스트가 있습니다. `predictions` (각각 다음을 포함합니다. `face` bounding box, `landmarks`, `yaw`, 및 `pitch` (라디안 단위), `time`, `time_face_det`, 및 `time_gaze_det`.

자가 호스팅 배포 및 추가 예시는 다음을 참조하세요. [Roboflow Inference 문서](https://inference.roboflow.com/).


---

# 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:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/supported-models/l2cs-net.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
