# native_exporter

Python API: `luxonis_ml.data.exporters.native_exporter`

## Classes

### NativeExporter

Exporter for native LDF directory format.

Native export writes split directories with copied media and an `annotations.json` file. Each annotation entry follows the same
record-level shape accepted by
[NativeParser](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/parsers/native_parser.md)
and
[LuxonisDataset.add](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/datasets/luxonis_dataset.md).

`sample_metadata` is exported as a JSON object next to `file` or `files`. It is record-level metadata, not an annotation label.

> **Example**
> ```json
{
  "file": "images/0.jpg",
  "task_name": "detection",

  "sample_metadata": {
    "record_id": 123,
    "camera": "left",
    "tags": ["night", "warehouse"]
  },

  "annotation": {
    "instance_id": 0,
    "class": "person",
    "boundingbox": {
      "x": 0.1,
      "y": 0.2,
      "w": 0.3,
      "h": 0.4
    }
  }
}
```

#### Methods

##### export

```python
def export(prepared_ldf: PreparedLDF):
```

Convert the prepared dataset into the exporter's format.

Parameters

 * `prepared_ldf` (`PreparedLDF`): Dataset data prepared for export.

Raises

 * `NotImplementedError`: Always raised by the abstract base implementation.

##### get_split_names

```python
def get_split_names() -> dict[str, str]:
```

##### supported_ann_types

```python
def supported_ann_types(self) -> list[str]:
```

Return task types supported by this exporter.

Returns

 * `list[str]`: Supported annotation task types.

Raises

 * `NotImplementedError`: Always raised by the abstract base implementation.

#### Attributes

##### current_size
