> 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/reference/ja/tui-lun/inference-sdk/core-models.md).

# コアモデル

`InferenceHTTPClient` Inference でホストされるコアモデルをサポートします。これらのモデルの一部は、Roboflow のホスト型 inference プラットフォームで使用できます（use `https://serverless.roboflow.com` を URL として使用します）；その他はローカルにデプロイできます（通常、ローカルサーバーは `http://localhost:9001`).

## CLIP

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # または "https://serverless.roboflow.com" を使ってホスト型サービングを利用
    api_key="ROBOFLOW_API_KEY"
)

CLIENT.get_clip_image_embeddings(inference_input="./my_image.jpg")  # 単一画像のリクエスト
CLIENT.get_clip_image_embeddings(inference_input=["./my_image.jpg", "./other_image.jpg"])  # バッチ画像リクエスト
CLIENT.get_clip_text_embeddings(text="some")  # 単一テキストのリクエスト
CLIENT.get_clip_text_embeddings(text=["some", "other"])  # その他のテキストリクエスト
CLIENT.clip_compare(
    subject="./my_image.jpg",
    prompt=["fox", "dog"],
)
```

この `CLIENT.clip_compare(...)` このメソッドでは、さまざまな組み合わせを比較できます `subject_type` と `prompt_type`:

* `(画像, 画像)` (デフォルト)
* `(画像, テキスト)`
* `(テキスト, 画像)`
* `(テキスト, テキスト)`

非同期メソッドも利用できます:

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # または "https://serverless.roboflow.com" を使ってホスト型サービングを利用
    api_key="ROBOFLOW_API_KEY"
)

async def see_async_method():
  await CLIENT.get_clip_image_embeddings_async(inference_input="./my_image.jpg")  # 単一画像のリクエスト
  await CLIENT.get_clip_image_embeddings_async(inference_input=["./my_image.jpg", "./other_image.jpg"])  # バッチ画像リクエスト
  await CLIENT.get_clip_text_embeddings_async(text="some")  # 単一テキストのリクエスト
  await CLIENT.get_clip_text_embeddings_async(text=["some", "other"])  # その他のテキストリクエスト
  await CLIENT.clip_compare_async(
      subject="./my_image.jpg",
      prompt=["fox", "dog"],
  )
```

以下を参照してください [CLIP モデルリファレンス](https://docs.roboflow.com/models/supported-models/clip) モデル自体の詳細については。

## DocTR

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # または "https://serverless.roboflow.com" を使ってホスト型サービングを利用
    api_key="ROBOFLOW_API_KEY"
)

CLIENT.ocr_image(inference_input="./my_image.jpg")  # 単一画像のリクエスト
CLIENT.ocr_image(inference_input=["./my_image.jpg", "./other_image.jpg"])  # バッチ画像リクエスト
```

非同期版： `CLIENT.ocr_image_async(...)`。詳しくは [DocTR モデルリファレンス](https://docs.roboflow.com/models/supported-models/doctr) を使用します。詳しくは

## Gaze（非推奨）

{% hint style="warning" %}
`CLIENT.detect_gazes(...)` と `CLIENT.detect_gazes_async(...)` MediaPipe 依存関係とともに削除されました。現在はクライアント側で即座に処理を打ち切り、 `inference_sdk.http.errors.FeatureDeprecatedError` ネットワーク呼び出しを行わずにエラーを返します。この機能が必要な場合は Roboflow にお問い合わせください。
{% endhint %}
