class documentation
class VOCExporter(BaseExporter):
Constructor: VOCExporter(dataset_identifier, output_path, max_partition_size_gb)
Undocumented
| Static Method | get |
Undocumented |
| Method | export |
Convert the prepared dataset into the exporter's format. |
| Method | supported |
Return task types supported by this exporter. |
| Instance Variable | current |
Undocumented |
| Static Method | _estimate |
Approximate byte-count. |
| Static Method | _etree |
Undocumented |
| Method | _build |
Undocumented |
| Method | _dump |
Undocumented |
| Method | _get |
Return the folder path to store data files for this split. |
| Method | _maybe |
Undocumented |
Inherited from BaseExporter:
| Method | __init__ |
Undocumented |
| 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. |
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. |
Approximate byte-count.
The alternative is to serialize, pretty-print and discard every time just to compute the true xml size.
def _build_voc_xml_string(self, folder:
str, filename: str, abs_path: Path, size: tuple[ int, int, int], objects: list[ dict[ str, Any]]) -> str:
¶
Undocumented
def _dump_annotations(self, per_split_data:
dict[ str, dict[ str, dict[ str, Any]]], output_path: Path, part: int | None = None):
¶
Undocumented
def _maybe_roll_partition(self, per_split_data:
dict[ str, dict[ str, dict[ str, Any]]], additional_size: int) -> dict[ str, dict[ str, dict[ str, Any]]]:
¶
Undocumented