> 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/zh/annotations/annotation-tools.md).

# 标注工具

Unitlab Workbench 标注工具总览：根据对象和数据类型选择合适的绘制工具，包括矩形框、多边形、掩码画笔、折线、关键点、骨架、立方体和 Magic Touch，了解各工具支持的图像、视频、医学影像、PDF、遥感与病理数据，并找到每个工具的使用指南。

Workbench 提供一套绘制工具。每种工具生成一种形状，而本体中的每个类别都规定了它使用哪种形状。选择一个类别，Workbench 就会切换到与之匹配的工具。

![机器人厨房场景的标注示例：多个矩形框、一个抽屉多边形、一条夹爪路径折线，以及咖啡机上的立方体](https://content.gitbook.com/content/vbN1G7M3hTB0Q58dqxlj/blobs/oq3AfignlLEpO0tTJWjp/tools-bbox-hero.webp)

## 我该用哪种工具？ <a href="#which-tool-should-i-use" id="which-tool-should-i-use"></a>

| 你需要               | 使用                                                                                                             | 快捷键 |
| ----------------- | -------------------------------------------------------------------------------------------------------------- | --- |
| 快速标出对象位置          | [矩形框](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/bounding-box.md)                   | `B` |
| 精确轮廓，且便于之后修改      | [多边形](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/polygon.md)                        | `P` |
| 用画笔涂出对象的每个像素      | [掩码画笔](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/mask-brush.md)                    | `F` |
| 一条路径或边缘，例如夹爪轨迹或线缆 | [折线](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/points-polylines-and-skeletons.md)  | `L` |
| 单个位置，例如抓取点或角点     | [关键点](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/points-polylines-and-skeletons.md) | `U` |
| 连接成姿态的关节          | [骨架](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/points-polylines-and-skeletons.md)  | `J` |
| 照片中箱形物体的位置、尺寸和深度  | [立方体](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/cuboid.md)                         | `N` |
| 单击一次即由 AI 生成轮廓草稿  | [Magic Touch](https://docs.unitlab.ai/documentation/zh/auto-labeling/detect-anything-sam-1-sam-3.md)           | `M` |
| 移动视图，选择并编辑已保存的形状  | [平移、选择与编辑](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/select-and-edit.md)           | `V` |

{% hint style="info" %}
在多边形和掩码之间拿不定主意？如果之后需要移动顶点、调整轮廓，选择 **Polygon**；如果模型需要像素级数据，且对象边缘柔和、不规则，选择 **Mask**。
{% endhint %}

## 按数据类型划分的工具 <a href="#tools-by-data-type" id="tools-by-data-type"></a>

| 工具               | 图像 | 视频 | 医学影像 | PDF | 地理空间与病理 |
| ---------------- | -- | -- | ---- | --- | ------- |
| 矩形框              | ✓  | ✓  | ✓    | ✓   | ✓       |
| 多边形              | ✓  | ✓  | ✓    | ✓   | ✓       |
| 多边形 **Slice** 模式 | ✓  |    |      |     | ✓       |
| 掩码画笔             | ✓  | ✓  | ✓    | ✓   | ✓（矢量掩码） |
| 折线、关键点、骨架        | ✓  | ✓  | ✓    | ✓   | ✓       |
| 立方体              | ✓  | ✓  |      | ✓   | ✓       |
| Auto select      | ✓  | ✓  | ✓    | ✓   | ✓       |

在视频中，在某一帧上绘制的形状可以在整个片段中跟随对象。只需绘制一次，然后使用 **Tracking** 填充其他帧。

![在一段 48 帧的机器人视频中跟踪夹爪多边形，时间轴轨道的每一帧都有关键帧](https://content.gitbook.com/content/vbN1G7M3hTB0Q58dqxlj/blobs/3HJ9PszDvajc3egfg2N4/tools-video-tracked-polygon.webp)

LiDAR 场景有专门的 3D 工具，参见 [LiDAR 点云标注](https://docs.unitlab.ai/documentation/zh/annotations/lidar-annotation.md)。文本、音频和时间序列在各自页面中使用片段和区间工具。

## 适用于所有形状的工具 <a href="#tools-that-work-with-every-shape" id="tools-that-work-with-every-shape"></a>

* [**Auto select**](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/auto-select.md)（`A`）：将指针停在已保存的形状上，无需切换工具即可编辑。
* [**工具设置**](https://docs.unitlab.ai/documentation/zh/annotations/workbench-settings.md)：控制点大小、共享边、标签显示和质量检查。
* **撤销与重做**：`Ctrl` + `Z` 和 `Ctrl` + `Y`（Mac 上为 `Cmd`）。
* [**键盘快捷键**](https://docs.unitlab.ai/documentation/zh/annotations/annotation-tools/keyboard-shortcuts.md)：所有按键汇总在一个列表中。在 Workbench 中按 `H` 可查看当前文件可用的快捷键。

相关内容：[选择标注工具](https://docs.unitlab.ai/documentation/zh/annotations/choose-an-annotation-tool.md) · [类别与标注类型](https://docs.unitlab.ai/documentation/zh/ontologies/classes-and-annotation-types.md) · [Magic Touch 与 Detect all objects](https://docs.unitlab.ai/documentation/zh/auto-labeling/detect-anything-sam-1-sam-3.md)

<sub>机器人图像：</sub>[<sub>DROID 数据集</sub>](https://droid-dataset.github.io/)<sub>（Khazatsky 等，2024），CC BY 4.0。</sub>
