COCO and Pascal VOC

We provide a Python package for post-processing JSON exports into common formats such as COCO and Pascal VOC.

To install the package:

pip install labelbox

Converting to COCO

Use labelbox.exporters.coco_exporter.from_json (source).

import labelbox.exporters.coco_exporter as lb2coco

labeled_data = ... # file path to JSON export with XY paths
coco_output = ... # file path to where COCO output should be written

lb2coco.from_json(labeled_data, coco_output, label_format='XY')

Converting to VOC

Use labelbox.exporters.voc_exporter.from_json (source).

import labelbox.exporters.voc_exporter as lb2pa

labeled_data = ... # file path to JSON export with XY paths

# where to write VOC annotation and image outputs
annotations_output_dir = ...
images_output_dir = ...

lb2pa.from_json(labeled_data, annotations_output_dir, images_output_dir, label_format='XY')

COCO and Pascal VOC

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.