# Detection Offset

### このブロックについて

Detection Offset block を使用すると、object detection model または segmentation model によって検出された領域の周囲にパディングを追加できます。

この block は、検出の周囲に余白を追加したい場合に便利です。画像内で検出された領域の周囲に背景を少し見せたい場合に、これを行うとよいでしょう。

このブロックは次のものと連携します:

* Object detection models
* Segmentation models

<figure><img src="/files/7d6a003f0c09fc18ae86f4099e459629904e495a" alt=""><figcaption><p>Detection Offset block。</p></figcaption></figure>

### このブロックに送信できるもの

このブロックを使用するには、次が必要です:

1. 入力画像、動画フレーム、または画像内の切り抜かれた領域、および;
2. Object Detection または Segmentation model からの予測。

### このブロックが返すもの

Detection Offset block は、detection model によって返された xyxy 座標を元にしたバージョンを返します。これらの座標にはパディング（余白）が追加されています。

これらの座標は、その後、detection をサポートする任意の block（つまり OCR Model や Bounding Box Visualization など）に渡すことができます。

以下は、Bounding Box Visualization（左）で表示した生の検出結果と、オフセット（パディング）を適用した検出結果を示す例です:

<figure><img src="/files/51e23d42f32998464ff5aafc6ed03464998f52b5" alt=""><figcaption><p>画像内の欠陥が拡大表示されています。</p></figcaption></figure>

参考までに、こちらが入力画像です:

<figure><img src="/files/fb06c9a95c2285ff8f59f5ba2075bbb387039ff2" alt=""><figcaption></figcaption></figure>

block の結果では、検出された領域が大きくなっています。

### ユースケース

このブロックは、画像上でモデルの結果を確認したい場合に便利です。これはテスト中によく使われます。

予測を可視化すると Workflow の実行に少しだけオーバーヘッドが加わるため、本番環境で Visualization を追加するのは、モデルの結果の位置を確認する必要がある場合にのみ推奨します。


---

# Agent Instructions: 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-jp/workflows/workflow-blocks/transformations/detection-offset.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.
