# metadata

Python API: `luxonis_ml.data.datasets.metadata`

## Classes

| Name | Description |
| --- | --- |
|
[`Metadata`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/datasets/metadata.md)
| Stored metadata for a Luxonis Data Format dataset. |
|
[`Skeletons`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/datasets/metadata.md)
| Keypoint skeleton metadata. |

### class `Metadata`

```python
class Metadata(BaseModelExtraForbid)
```

Stored metadata for a Luxonis Data Format dataset.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `categorical_encodings` | `dict[str, dict[str, int]]` | Integer encodings for categorical metadata. |
| `classes` | `dict[str, dict[str, int]]` | Class-index mappings per task. |
| `ldf_version` | `str` | Luxonis Data Format version. |
| `metadata_types` | `dict[str, Literal['float', 'int', 'str', 'Category']]` | Metadata value types per metadata task. |
| `parent_dataset` | `str | None` | Optional identifier of the source dataset this dataset was derived from. |
| `skeletons` | `dict[str, Skeletons]` | Keypoint skeleton definitions per task. |
| `source` | `LuxonisSource | None` | Dataset source description. |
| `tasks` | `dict[str, list[str]]` | Task types per task name. |

Methods

| Name | Description |
| --- | --- |
|
[`merge_with`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/datasets/metadata.md)
| Merge two metadata objects together. |
|
[`set_classes`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/datasets/metadata.md)
| |

#### method `merge_with`

```python
def merge_with(other: Metadata) -> Metadata
```

Merge two metadata objects together.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `other` | `Metadata` | Metadata object to merge into this one. | required |

Returns

| Type | Description |
| --- | --- |
| `Metadata` | New metadata object containing merged classes, tasks, skeletons, categorical encodings, metadata types, and source
information. |

Raises

| Type | Description |
| --- | --- |
| `ValueError` | If the two metadata objects use different LDF versions. |

#### method `set_classes`

```python
def set_classes(classes: list[str] | dict[str, int], task: str)
```

### class `Skeletons`

```python
class Skeletons(TypedDict)
```

Keypoint skeleton metadata.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `edges` | `list[tuple[int, int]]` | Keypoint graph edges as 0-based index pairs. |
| `labels` | `list[str]` | Keypoint names in index order. |
