> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/ja/annotations/annotation-tools/bounding-box.md).

# バウンディングボックスツール

Unitlab Workbench のバウンディングボックスツールの使い方。物体検出向けに矩形を描画し、サイズ変更・回転・重なったボックスの選択を行う方法を解説します。

バウンディングボックスは、オブジェクトの位置を矩形で示します。最も速く描画できる形状で、物体検出モデルの入力として最も一般的です。

![ロボットが箱をピッキングするキッチンカウンター。各箱がバウンディングボックスで囲まれている](https://content.gitbook.com/content/VVjRRo2Aj63RKvkKs7pK/blobs/9P1KBfvbVNiYWMCnlaWL/tools-bbox-hero.webp)

## 使用する場面 <a href="#when-to-use-it" id="when-to-use-it"></a>

* 位置とサイズが分かれば十分な物体検出。
* ビン内の部品や棚の商品など、オブジェクトのカウント。
* より精密なポリゴンやマスクを作成する前の一次アノテーション。

## ボックスを描く <a href="#draw-a-box" id="draw-a-box"></a>

1. `B` を押すか、ツールバーで **Bounding Box** を選択します。
2. **Object** などのボックスクラスを選びます。
3. オブジェクトの一方の角で押し、反対側の角までドラッグして離します。

ボックスが **Objects** パネルに表示されます。4辺すべてを、オブジェクトの見えている最も外側のエッジに合わせてください。

## ボックスを編集する <a href="#edit-a-box" id="edit-a-box"></a>

* **サイズ変更：** ボックスを選択し、辺または角のハンドルをドラッグします。
* **移動：** **Pan**（`V`）でボックスの内側をドラッグします。
* **回転：** ボックスを選択し、上部の回転ハンドルをドラッグします。衛星画像の船舶など、斜めに置かれたオブジェクトには回転ボックスを使います。

[Auto select](https://docs.unitlab.ai/documentation/ja/annotations/annotation-tools/auto-select.md) がオンの場合、保存済みのボックスにポインターを合わせると、ツールを切り替えずに編集できます。別の場所で押すと新しいボックスを描画できます。

{% hint style="info" %}
**ボックスが重なっている場合は？** Auto select がオンのとき、`Shift` + クリックで下にあるボックスを選択できます。
{% endhint %}

## キーボードショートカット <a href="#keyboard-shortcuts" id="keyboard-shortcuts"></a>

| 操作                 | ショートカット                    |
| ------------------ | -------------------------- |
| バウンディングボックスツール     | `B`                        |
| Auto select のオン・オフ | `A`                        |
| 下にあるボックスを選択        | `Shift` + クリック             |
| 選択したボックスを削除        | `Delete`                   |
| コピー、貼り付け           | `Ctrl` + `C`, `Ctrl` + `V` |

関連：[アノテーションツール](https://docs.unitlab.ai/documentation/ja/annotations/annotation-tools.md) · [直方体ツール](https://docs.unitlab.ai/documentation/ja/annotations/annotation-tools/cuboid.md) · [Magic Touch と Detect all objects](https://docs.unitlab.ai/documentation/ja/auto-labeling/detect-anything-sam-1-sam-3.md)

<sub>ロボット画像：</sub> [<sub>DROID dataset</sub>](https://droid-dataset.github.io/) <sub>(Khazatsky et al., 2024), CC BY 4.0.</sub>
