class documentation
class SegmentationMaskDirectoryExporter(BaseExporter):
Constructor: SegmentationMaskDirectoryExporter(dataset_identifier, output_path, max_partition_size_gb)
Export semantic segmentation masks in directory format.
| Method | __init__ |
Undocumented |
| Method | export |
Export semantic segmentation masks and class CSV files. |
| Method | get |
Undocumented |
| Method | supported |
Return task types supported by this exporter. |
| Instance Variable | BACKGROUND |
Background class name written to class CSV files. |
| Instance Variable | CLASS |
Class-name column in class CSV files. |
| Instance Variable | ID |
Class-ID column in class CSV files. |
| Instance Variable | split |
Per-split class-to-ID maps used for _classes.csv. |
| Method | _class |
Undocumented |
| Method | _dump |
Undocumented |
| Method | _ensure |
Undocumented |
| Method | _get |
Return the folder path to store data files for this split. |
| Method | _write |
Undocumented |
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
Export semantic segmentation masks and class CSV files.
| Parameters | |
preparedPreparedLDF | Dataset data prepared for export. |
| Raises | |
ValueError | If a class ID exceeds 255, because the matching parser reads masks as 8-bit grayscale images. |
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_splits:
dict[ str, dict[ str, Any]], output_path: Path, part: int | None = None):
¶
Undocumented