class documentation
class CocoExporter(BaseExporter):
Constructor: CocoExporter(dataset_identifier, output_path, max_partition_size_gb, format, skeletons)
Exporter for COCO dataset format.
| 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 | allow |
Whether keypoint annotations can be exported. |
| Instance Variable | class |
Category IDs per split and class name. |
| Instance Variable | current |
Undocumented |
| Instance Variable | format |
COCO output layout variant. |
| Instance Variable | image |
Exported image metadata per split. |
| Instance Variable | last |
Last assigned category ID per split. |
| Instance Variable | skeletons |
Optional keypoint skeleton metadata. |
| Method | _dump |
Undocumented |
| Method | _fill |
Undocumented |
| Method | _fill |
Undocumented |
| Method | _fill |
Undocumented |
| Method | _get |
Return the folder path to store data files for this split. |
| Method | _get |
Undocumented |
| Method | _maybe |
Undocumented |
| Method | _process |
Undocumented |
Inherited from BaseExporter:
| 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, format: COCOFormat = COCOFormat.ROBOFLOW, *, skeletons: dict[ str, Any] | None = 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_splits:
dict[ str, dict[ str, Any]], output_path: Path, part: int | None = None):
¶
Undocumented
def _fill_bbox(self, ann:
dict[ str, Any], data: dict[ str, Any], w: int, h: int, split: str, cname: str):
¶
Undocumented
def _fill_instance_segmentation(self, ann:
dict[ str, Any], data: dict[ str, Any], split: str, cname: str):
¶
Undocumented
def _fill_keypoints(self, ann:
dict[ str, Any], data: dict[ str, Any], w: int, h: int, split: str, cname: str):
¶
Undocumented
def _get_or_register_image(self, path:
Path, split: str, annotation_splits: dict[ str, dict[ str, Any]]) -> tuple[ int, int, int, str]:
¶
Undocumented
def _maybe_roll_partition(self, annotation_splits:
dict[ str, dict[ str, Any]], additional_size: int) -> dict[ str, dict[ str, Any]]:
¶
Undocumented
def _process_row(self, row:
dict[ str, Any], split: str, annotation_splits: dict[ str, dict[ str, Any]], ann: dict[ str, Any], w: int, h: int) -> tuple[ dict[ str, Any], bool]:
¶
Undocumented