class documentation
class FiftyOneClassificationExporter(BaseExporter):
Constructor: FiftyOneClassificationExporter(dataset_identifier, output_path, max_partition_size_gb)
Export FiftyOne classification data.
Output structure:
<dataset_name>/
train/
data/
000001.jpg
000002.jpg
...
labels.json
validation/
data/
...
labels.json
test/
data/
...
labels.json
The labels.json file has structure:
{
"classes": ["class1", "class2", ...],
"labels": {
"000001": 0, # index into classes array
"000002": 1,
...
}
}
| Method | __init__ |
Undocumented |
| Method | export |
Convert the prepared dataset into the exporter's format. |
| Method | get |
Undocumented |
| Method | supported |
Return task types supported by this exporter. |
| Instance Variable | class |
Class-name to index mapping. |
| Instance Variable | split |
Per-split image counter used for exported filenames. |
| Instance Variable | split |
Per-split image-stem to class-index mapping. |
| Method | _dump |
Undocumented |
| Method | _get |
Return the folder path to store data files for this split. |
Inherited from BaseExporter:
| Instance Variable | current |
Current partition size in bytes. |
| Instance Variable | dataset |
Name or identifier used for exported paths. |
| Instance Variable | image |
Per-image export indices used by concrete exporters. |
| Instance Variable | max |
Optional maximum partition size in bytes. |
| Instance Variable | max |
Optional maximum partition size in GiB. |
| Instance Variable | output |
Directory where the export is written. |
| Instance Variable | part |
Current partition index, or None when partitioning is disabled. |
def __init__(self, dataset_identifier:
str, output_path: Path, max_partition_size_gb: float | None):
¶
Undocumented
Convert the prepared dataset into the exporter's format.
| Parameters | |
preparedPreparedLDF | Dataset data prepared for export. |
| Raises | |
NotImplementedError | Always raised by the abstract base implementation. |
Return task types supported by this exporter.
| Returns | |
list[ | Supported annotation task types. |
| Raises | |
NotImplementedError | Always raised by the abstract base implementation. |
def _dump_annotations(self, annotation_data:
dict[ str, Any], output_path: Path, part: int | None = None):
¶
Undocumented