# Relations

Relationships define how objects interact or connect with each other in a scene. They help perception models understand spatial dependencies, object hierarchies, and physical connections—enabling autonomous systems to predict behavior, plan paths, and reason about complex scenarios like a rider on a motorcycle or a trailer attached to a truck.

<div data-with-frame="true"><figure><img src="/files/2pYiKFB873jMtWn5gsG9" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/ppB1tDKvzGCw27uEEIhT" alt=""><figcaption></figcaption></figure></div>

1. Enter relation name in the Title
2. Choose a parent (leading) class from the dropdown. For example, *Bicycle*
3. Choose a child (following) class from the dropdown. For example, *Rider*

***

## Relationship Types and Use Cases

### Use Case 1: One-Way Relations

> <img src="/files/mXHEiGg35kYjwl0I4r5p" alt="" data-size="line"> Tip: When one object (child) depends on or is attached to another object (parent).

**Examples:** Car atop a trailer. rider sitting on a two-wheeler, stroller being pushed by a pedestrian, trailer connected to a truck cabin

#### **A. Select the Child to Create a Relation**

Consider a relationship between Rider (child) and TwoWheeler (parent)

**How it works:**

1. Select the Rider annotation (the dependent object).
2. Click the relationship tab and choose the relationship type.
3. The selected annotation becomes the child and appears on the left side in all visual locations.
4. Select the TwoWheeler annotation to complete the relationship.

#### **B. Select the Parent to Create a Relation**

Consider a relationship between Rider (child) and TwoWheeler (parent)

**How it works:**

1. Select the TwoWheeler annotation (the supporting object).
2. Click the relationship tab and choose the relationship type.
3. The selected annotation becomes the parent and appears on the right side in all visual locations.
4. Select the Rider annotation to complete the relationship.

### Use Case 2: Class Has Multiple Relations

**When to use:** When a class can form relationships with multiple different parent classes.

**Example :** A Rider can sit on either a TwoWheeler or a Bicycle

Consider the relationship:

* between Rider (child) and TwoWheeler (parent)
* between Rider (child) and Bicycle (parent)

**How it works:**

1. Select the Rider annotation (child).
2. The tool prompts you to choose which relationship type since Rider can relate to two different parents.
3. Select the appropriate relationship (e.g., "sits on TwoWheeler" or "sits on Bicycle").
   * **Note:** If you select the parent first (TwoWheeler or Bicycle), no prompt appears, the relationship is automatically determined.

### Use Case 3: Cyclic Relations

#### **A. Class Category is Both Child and Parent**

> <img src="/files/mXHEiGg35kYjwl0I4r5p" alt="" data-size="line"> Tip: When objects of the same class can connect to each other.

**Example:** A pedestrian holding hands with another pedestrian, or a vehicle towing another vehicle.

Consider the relationship between Vehicle (child) and Vehicle (parent)

**How it works:**

1. Select a Vehicle annotation.
2. The tool prompts you to choose the direction of the relationship:
   * Outgoing: Selected annotation becomes the parent (the one towing)
   * Incoming: Selected annotation becomes the child (the one being towed)
3. Select the direction, then select the second vehicle to complete the relationship.

#### **B. A Class Category is a Parent in One Relationship and Child in Another**

> <img src="/files/mXHEiGg35kYjwl0I4r5p" alt="" data-size="line"> Tip: When an object connects to objects on both sides, forming a chain.

**Example:** A bi-articulated bus where the center segment is attached to both the front and rear segments.

Consider the relationship:

* between BusCenter (child) and BusFront (parent)
* between BusRear (child) and BusCenter (parent)

**How it works:**

1. Select the BusCenter annotation.
2. The tool prompts you to choose which relationship to create:
   * BusCenter attached to BusFront (BusCenter is the child)
   * BusRear attached to BusCenter (BusCenter is the parent)
3. Select the appropriate relationship and then select the corresponding annotation (BusFront or BusRear).
4. Repeat to create the second relationship if needed.
5. The BusCenter annotation now appears in both child and parent roles across different relationships.

***

## Visual Guide: Sphere Size Indicators

Across all relationship types:

* **Small sphere** = Child (dependent/attached object)
* **Big sphere** = Parent (supporting/base object)

This consistent visual language helps annotators quickly identify relationship hierarchies in the point cloud.


---

# 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.imerit.net/3d-multi-sensor-fusion/labeling/category-schema/relations.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.
