> 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/ontologies/ontology-examples-by-use-case.md).

# 按场景划分的本体示例

可直接复用的 Unitlab 本体设计示例，涵盖机器人抓取、用于机器人学习的人类示范视频、CT 病灶分级、病理全切片图像、卫星与航拍遥感影像（GeoTIFF）以及发票文档字段提取。每个示例都列出了类别、关键属性、Item Properties、关系和设计思路。

从已经验证可行的设计开始。每个示例都列出了类别、关键属性以及这样设计的原因。请根据你自己的标注规范调整名称。

表格中的 › 表示嵌套属性：*Finding › Suspicious: LI-RADS category* 表示只有当 *Finding* 为 *Suspicious* 时才会出现 *LI-RADS category*。

## 机器人抓取 <a href="#robot-grasping" id="robot-grasping"></a>

\*\*数据：\*\*机器人相机拍摄的照片 · \*\*目标：\*\*判断机器人可以抓取哪些物体，以及如何抓取

| 类别               | 类型  | 属性                                                                                                                                                        |
| ---------------- | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Graspable object | 多边形 | Object shape · Grasp status › *Pickable:* Grasp type › *Side grasp:* Approach angle (°) · Grasp status › *Blocked:* Blocked reason · Estimated weight (g) |
| Gripper          | 多边形 | Gripper state › *Holding:* Contact quality                                                                                                                |
| Robot arm        | 多边形 | 无                                                                                                                                                         |
| Support surface  | 多边形 | Surface type：Table、Shelf、Bin                                                                                                                              |

\*\*Item Properties：\*\*Environment（必填）、Lighting · \*\*关系：\*\*Grasp target（夹爪指向物体）、Rests on（物体指向表面）

一个带嵌套问题的 *Graspable object* 类别，可以取代为每种形状和状态分别建立的类别。参见[嵌套属性](https://docs.unitlab.ai/documentation/zh/ontologies/nested-properties.md)。

## 用于机器人学习的人类示范 <a href="#human-demonstrations-for-robot-learning" id="human-demonstrations-for-robot-learning"></a>

\*\*数据：\*\*某人执行任务的第一人称视频 · \*\*目标：\*\*教会机器人哪只手在何时做什么

| 类别            | 类型      | 属性                                              |
| ------------- | ------- | ----------------------------------------------- |
| Hand          | 矩形框，带跟踪 | Side：Left、Right（静态） · Grip：Open、Pinch、Power（动态） |
| Object（零件、工具） | 矩形框，带跟踪 | Location：In tray、In hand（动态）                    |

\*\*Item Properties：\*\*Task phase（动态）、Camera mount（静态） · \*\*关系：\*\*Held by（物体指向手）

始终不变的设为静态，片段中会变化的设为动态。参见[视频中的动态属性](https://docs.unitlab.ai/documentation/zh/ontologies/dynamic-properties-in-video.md)。

## CT 病灶分级 <a href="#ct-lesion-grading" id="ct-lesion-grading"></a>

\*\*数据：\*\*腹部 CT 体数据 · \*\*目标：\*\*分割病灶和器官，并为每个病灶分级

<figure><img src="https://content.gitbook.com/content/vbN1G7M3hTB0Q58dqxlj/blobs/ADizQSM57hmGJST3oL1i/ontologies-examples-medical.webp" alt="构建器中的 Lesion 类别：Finding 下，LI-RADS category 嵌套在 Suspicious 下，Follow-up 嵌套在 Indeterminate 下" width="560"><figcaption></figcaption></figure>

| 类别           | 类型 | 属性                                                                                                                                  |
| ------------ | -- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Lesion       | 掩码 | Location · Finding › *Suspicious:* LI-RADS category · Finding › *Indeterminate:* Follow-up · Size (mm)，数值 1 到 300 · Enhancement（动态） |
| Liver、Kidney | 掩码 | 无                                                                                                                                   |

\*\*Item Properties：\*\*Contrast：With、Without（必填） · Study quality

*Enhancement* 是动态属性，因此可以逐切片变化，就像视频属性逐帧变化一样。

## 病理 <a href="#pathology" id="pathology"></a>

\*\*数据：\*\*全切片图像（WSI） · \*\*目标：\*\*勾画肿瘤区域、标记细胞并标出扫描伪影

<figure><img src="https://content.gitbook.com/content/vbN1G7M3hTB0Q58dqxlj/blobs/3rzyklezpxHCGfomemdn/ontologies-examples-pathology.webp" alt="构建器中的 Tumor region 类别：Grade，以及嵌套在 Margin 的 Involved 下的 Distance to margin" width="600"><figcaption></figcaption></figure>

| 类别           | 类型  | 属性                                                            |
| ------------ | --- | ------------------------------------------------------------- |
| Tumor region | 多边形 | Grade：G1、G2、G3 · Margin › *Involved:* Distance to margin (mm) |
| Cell         | 关键点 | Cell type：Tumor、Lymphocyte、Stroma                             |
| Artifact     | 多边形 | Artifact type：Fold、Blur、Pen mark                              |

\*\*Item Properties：\*\*Stain：H\&E、IHC（必填） · Scan quality

将伪影单独设为一个类别，就可以在训练时排除折叠和笔迹。

## 卫星与航拍影像 <a href="#satellite-and-aerial-imagery" id="satellite-and-aerial-imagery"></a>

\*\*数据：\*\*GeoTIFF 或大幅航拍图像 · \*\*目标：\*\*绘制建筑物、道路和车辆，并评估损毁程度

<figure><img src="https://content.gitbook.com/content/vbN1G7M3hTB0Q58dqxlj/blobs/hAT7jsC0BfLcPNLIGSdq/ontologies-examples-geospatial.webp" alt="构建器中的 Building 类别：Roof type、Condition（Damage level 嵌套在 Damaged 下）以及 Floors" width="560"><figcaption></figcaption></figure>

| 类别       | 类型  | 属性                                                               |
| -------- | --- | ---------------------------------------------------------------- |
| Building | 多边形 | Roof type · Condition › *Damaged:* Damage level · Floors（Number） |
| Road     | 线   | Surface：Paved、Unpaved · Lanes（Number）                            |
| Vehicle  | 矩形框 | Vehicle type                                                     |

\*\*Item Properties：\*\*Cloud cover：None、Partial、Heavy（必填）

## 文档：发票与表单 <a href="#documents-invoices-and-forms" id="documents-invoices-and-forms"></a>

\*\*数据：\*\*PDF 发票 · \*\*目标：\*\*提取关键字段

| 类别                               | 类型           | 属性                                    |
| -------------------------------- | ------------ | ------------------------------------- |
| Invoice number、Date、Total、Vendor | 实体；扫描页上使用矩形框 | Confidence：Clear、Hard to read         |
| Line item                        | 矩形框          | Quantity（Number） · Unit price（Number） |

\*\*Item Properties：\*\*Document type：Invoice、Receipt、Credit note · \*\*关系：\*\*Belongs to（明细行指向总计）

为每个字段设置数据类型和校验规则，这样以文本形式输入的总计会被立即标记。

## 通用设计原则 <a href="#design-rules-that-apply-everywhere" id="design-rules-that-apply-everywhere"></a>

* 每种事物一个类别，用属性表达其变化。
* 只有部分对象才有的细节，用嵌套属性。
* 随时间变化的状态用动态属性，其余都用静态属性。
* 关于整个文件的答案，用 Item Properties。
* 模型不可或缺的字段，设为必填并加校验。

## 相关内容 <a href="#related" id="related"></a>

[类别与标注类型](https://docs.unitlab.ai/documentation/zh/ontologies/classes-and-annotation-types.md) · [属性、关系与 Item Properties](https://docs.unitlab.ai/documentation/zh/ontologies/properties-relations-and-item-properties.md) · [在 Workbench 中测试本体](https://docs.unitlab.ai/documentation/zh/ontologies/test-an-ontology-in-workbench.md)
