# fiftyone_classification_exporter

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

## Classes

### FiftyOneClassificationExporter

Export FiftyOne classification data.

Output structure:

```text
<dataset_name>/
    train/
        data/
            000001.jpg
            000002.jpg
            ...
        labels.json
    validation/
        data/
            ...
        labels.json
    test/
        data/
            ...
        labels.json
```

The `labels.json` file has structure:

```text
{
    "classes": ["class1", "class2", ...],
    "labels": {
        "000001": 0,  # index into classes array
        "000002": 1,
        ...
    }
}
```

#### Methods

##### init

```python
def __init__(dataset_identifier: str, output_path: Path, max_partition_size_gb: float | None):
```

##### 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(self) -> 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

##### class_to_idx

Class-name to index mapping.

##### split_image_counter

Per-split image counter used for exported filenames.

##### split_labels

Per-split image-stem to class-index mapping.
