# Bounding Box Labels

### Bounding Box Labels

A core extension to the bounding box labeling project, the **Bounding box labels** extension contains the label set or taxonomy used for the project. There are two ways to add a label set:

1. Upload a label set with a `.csv` , `.tsv` or `.json`format
2. Type the labels in manually

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

{% hint style="info" %}
You can now click on a label instance to automatically jump to the corresponding bounding box and open the label box for that item.
{% endhint %}

### Label Set Modification

If you've created a project but forgot to add a label set, there is no need for concern. You can either drag and drop or click the three-dot menu to add a new label set.

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

If you've initially set up a label set while creating a bounding box labeling project but need to make edits, simply click the three-dot button and select **Edit label set**. This will open a pop-up section where you can make your edits.

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

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

If you need to replace the current label set, you can do so by clicking the three dots and choosing **Replace existing label set**. This will provide a drag-and-drop area where you can upload your desired label set.

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

<figure><img src="/files/2evC7i2LpSd3P0XWayFv" alt=""><figcaption></figcaption></figure>

By default, both reviewers and labelers have access to these capabilities. However, if you prefer to restrict this capability (modifying label sets) for your labelers, you can adjust it in **File > Settings > Administrator** and toggle off the option.

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

### Custom Attributes for Label Classes

Each label class in the label set can have multiple custom attributes (questions). The question types are limited to [Text](https://docs.datasaur.ai/advanced/extensions/pages/sjMjHjQsHtR5BrPf3PUF#id-1.-text-field) and [Dropdown](https://docs.datasaur.ai/advanced/extensions/pages/sjMjHjQsHtR5BrPf3PUF#id-3.-dropdown). Each question can also have a default answer.

To modify the custom attributes within the label set, follow these steps:

1. Open the label set editor via **Add new label set**, **Edit label set**, or **Replace existing label set**. Please check the [Label Set Modification](/data-studio-projects/lets-get-labeling/bounding-box-labeling.md#label-set-modification) section above.

   ![](/files/sprYc4OVHpmr6Fq7xTYd)
2. Switch to the **JSON** tab.

   ![](/files/JPt3rNIbnrwZWF3zLeVX)
3. Add or modify the <mark style="color:red;">`questions`</mark> field as needed for each label class.

   💡 We do not support the modification of the <mark style="color:red;">`type`</mark> and <mark style="color:red;">`internalId`</mark> values of existing questions, as it will affect labels that are already applied in unexpected ways.

   To add questions, include a <mark style="color:red;">`questions`</mark> field in the desired label class within the JSON structure. The `questions` field can contains multiple data with the following structures:

   1. **id**: ID of the question.
   2. **label**: The question name.
   3. **type**: The type of question. It can be <mark style="color:red;">`TEXT`</mark> or <mark style="color:red;">`DROPDOWN`</mark>.
   4. **config**: Configuration settings for the question
      1. **required**: Determines whether the question must be answered. It can be <mark style="color:red;">`true`</mark> or <mark style="color:red;">`false`</mark>.
      2. **defaultValue**: The default answer for the question
         1. For <mark style="color:red;">`TEXT`</mark> questions, it can be any text.
         2. For <mark style="color:red;">`DROPDOWN`</mark> questions, it must be an <mark style="color:red;">`options.id`</mark> value.
      3. **multiline**: Specifies if the <mark style="color:red;">`TEXT`</mark> question allows multiple lines. It can be <mark style="color:red;">`true`</mark> or <mark style="color:red;">`false`</mark>.
      4. **options**: An array of options for the <mark style="color:red;">`DROPDOWN`</mark> question, each containing:
         1. **id**: ID of the dropdown option. It can be used in the <mark style="color:red;">`defaultValue`</mark>.
         2. **label**: The text label for the dropdown option.
   5. **internalId**: readonly, unique id Datasaur uses to keep track of each individual question

   For a detailed example, refer to the [Label Sets](/data-studio-projects/lets-get-labeling/bounding-box-labeling.md#label-sets) section for a sample of the BBox label set with custom attributes.


---

# 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.datasaur.ai/advanced/extensions/bounding-box-labels.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.
