to_COCO_file#
- ethology.io.annotations.save_bboxes.to_COCO_file(ds, output_filepath)[source]#
Save an
ethology
bounding box annotations dataset to a COCO file.- Parameters:
ds (xarray.Dataset) – Bounding boxes annotations xarray dataset.
output_filepath (str or pathlib.Path) – Path for the output COCO file.
- Returns:
Path for the output COCO file.
- Return type:
Examples
Save annotations to a COCO file:
>>> from ethology.io.annotations import save_bboxes >>> save_bboxes.to_COCO_file(ds, "path/to/output_file.json")