Attribute & Classification
π Guides on creating class attributes and classifications.
# **Attribute**
In ontology, an attribute refers to a property or characteristic associated with a class or an instance. For further explanation of the concept, please read our [Term Dictionary](https://docs.basic.ai/docs/terms-dictionary#attribute).
When creating a class, it is essential to add attributes to it.
<Image align="center" className="border" width="600px" border={true} src="https://files.readme.io/beb3687-class5.png" />
The image below on the left shows the interface for attribute management. The left panel displays the structure of attributes and options, while the right allows you to apply specific settings.
> For `LiDAR Fusion` datasets, attribute directories are displayed at the top right. You can configure them separately to meet different project requirements. Please refer to the [*Attributes for LiDAR Fusion*](https://docs.basic.ai/docs/attributes-classifications#attributes-for-lidar-fusion) section for details.
The right image below demonstrates how class attributes appear in Tools.
<div class="row">
<div class="col-6">
<Image alt="annotate data, data annotation platform, data labeling, ontology, dataset" align="center" width="500px" border={true} src="https://files.readme.io/b101dec-21.png">
Configure class attributes in Ontology
</Image>
</div>
<div class="col-6">
<Image alt="annotate data, data annotation platform, data labeling, ontology, dataset" align="center" width="501px" border={true} src="https://files.readme.io/8c7e5c3-2024-02-22_14.11.35.png">
Assign class attributes in tools
</Image>
</div>
</div>
> π **'Attribute Names'** are more like the questions you want to ask annotators, while **'Options'** are the responses they provide.
>
> For example, when labeling a truck, the annotator will select the **option** *"Moving"* for the **attribute** *"Motion Type."*
>
> If additional details about "Moving" are needed, **nested attributes** should be set for this option. The annotator will indicate whether the speed of the vehicle in motion is *"Fast"* or *"Slow"*. (as shown in the images above)
## Manage Attributes
In the beginning, there is only a "root" (the class). Click `+ Add` to add a new attribute and name it. Press the key <kbd>Entr</kbd> or click the `β` icon to enter the configure page.
* <span style={{ color: "#576FF3" }}>**Name and Alias:**</span> Enter the name *(required)* and alias *(optional)* for the new attribute. Please follow the [rules](https://docs.basic.ai/docs/class#configure-basic-info) consistent with the Class's.
* <span style={{ color: "#576FF3" }}>**Input Type:**</span> Select the appropriate input type for the attribute.
* <span style={{ color: "#576FF3" }}>**Required:**</span> You can switch on the `Required` option to ensure that annotators provide the necessary information.
* <span style={{ color: "#576FF3" }}>**Options:**</span> Click `+ Add` and name options. You can optionally set one of them as default.
> βοΈ Don't forget to include options, otherwise, annotators can NOT set the necessary attributes for the class.
<Image align="center" className="border" border={true} src="https://files.readme.io/510cbb2-1.5.gif" />
Click the `β` button to return. Similarly, you can create and configure other attributes.
<Image align="center" className="border" border={true} src="https://files.readme.io/dec9dd1-1.6.gif" />
Clicking on the attributes and options in the tree graph enables quick access to their respective settings pages.
Additionally, BascAI supports <span style={{ color: "#576FF3" }}>**multiple levels of nested attributes**</span>, which can enhance metadata during annotation. Select an option in the Tree Graph, and add attributes and options.
<Image align="center" src="https://files.readme.io/c1cb1d2-1.7.gif" />
After setting up, remember to click `Save` and `Create`.
## Attributes for LiDAR Fusion
`LiDAR Fusion` datasets combine 2D images with 3D LiDAR data and possess intricate attributes. In BasicAI, these attributes are classified into three categories:
* ### General Attributes
`General Attributes` refer to attributes that can be derived from both LiDAR data and 2D images. For example, the general attribute *Motion Type* of the class *Car* is observable in both the image and LiDAR data.
<Image align="center" className="border" width="433px" border={true} src="https://files.readme.io/afee0ea-attr1.png" />
* ### LiDAR Attributes
`LiDAR Attributes` refer to attributes that can only be derived from LiDAR data, such as spatial location and speed.
<Image align="center" className="border" width="433px" border={true} src="https://files.readme.io/8ebe542-attr2.png" />
* ### Image Attributes
`Image Attributes` refer to attributes that can only be derived from 2D images, such as colors. Furthermore, the options for these attributes may vary when the same LiDAR object is mapped to multiple images. For example, options for the attribute *Occlusion Level* differ in each image because of varying angles.
<Image align="center" className="border" width="433px" border={true} src="https://files.readme.io/fe6e32d-attr3.png" />
> π For detailed information on configuring attributes and options, please refer to [Manage Attributes](https://docs.basic.ai/docs/ontology-creation#manage-attributes).
### Preview in Tools
On the Tool page, annotate LiDAR data and provide information for the **Class**, **General Attributes**, and **LiDAR Attributes**. The annotations will be mapped to 2D images.
Double-click to enter the image annotation interface, where you can set the **Image Attributes** for objects. The attributes for each image data are independent of each other.
> π Tips: Press the shortcut key <kbd>T</kbd> to show/hide class and attributes pad.
<Image align="center" className="border" border={true} src="https://files.readme.io/ccaca1e-attr_4.gif" />
<br />
***
# **Classification**
A classification refers to a special attribute that targets the data or scene itself. For further explanation of the concept, please read our [Term Dictionary](https://docs.basic.ai/docs/terms-dictionary#classification).
Go to the `Classification` category. Click the `+ Create` button to configure a new classification, or `Edit` an existing one.
<Image align="center" className="border" border={true} src="https://files.readme.io/7260485-2024-06-21_16.27.57.png" />
## Configure Basic Info
* <span style={{ color: "#576FF3" }}>**Name, Alias, Tags, Classification ID**</span> are similar to those for [Class](https://docs.basic.ai/docs/classes#basic-info).
* <span style={{ color: "#576FF3" }}>**Input Type:**</span> Select the appropriate input type for the classification.
* <span style={{ color: "#576FF3" }}>**Target on:**</span> You can choose to apply this classification to individual <Glossary>Data</Glossary> or <Glossary>Scene</Glossary>.
* <span style={{ color: "#576FF3" }}>**Required:**</span> You can switch on the `Required` option to ensure that annotators provide this classification.
<Image align="center" className="border" border={true} src="https://files.readme.io/86eac9b-1.12.gif" />
## Manage Attributes
The attributes interface is similar to that of classes. The left panel displays the structure of attributes and options, while the right allows you to apply specific settings.
A demonstration of how classifications appear in Tools is shown in the right image below.
<div class="row">
<div class="col-6">
<Image alt="annotate data, data annotation platform, data labeling, ontology, dataset" align="center" width="367px" border={true} src="https://files.readme.io/9814ab0-int2.png">
Attribute management interface
</Image>
</div>
<div class="col-6">
<Image alt="annotate data, data annotation platform, data labeling, ontology, dataset" align="center" width="366px" border={true} src="https://files.readme.io/6ce85c5-7.pre_classi.png">
Preview in Tools
</Image>
</div>
</div>
**However, for classification, a special attribute that targets the data or scene itself, you can add options directly to the root.** Click `+ Add` and enter the name.
<Image align="center" className="border" border={true} src="https://files.readme.io/393f68e-1.13.gif" />
Still, you can create <span style={{ color: "#576FF3" }}>**multiple levels of nested attributes**</span>.
Select an option in the Tree Graph, and add attributes on the right panel. Set up the <span style={{ color: "#576FF3" }}>**Name, Input Type, Options**</span>. Remember to save.
<Image align="center" className="border" border={true} src="https://files.readme.io/0ff1cea-1.14.gif" />
Updated 11 days ago