HumanSignal / label-studio-converter

Tools for converting Label Studio annotations into common dataset formats
https://labelstud.io/
262 stars 130 forks source link

Issue with COCO JSON conversion failing in certain cases #289

Open ajmalrasi opened 6 months ago

ajmalrasi commented 6 months ago

label-studio-converter import coco -i result.json -o output.json

WARNING:root:Segmentation in COCO is experimental Traceback (most recent call last): File "/home/ajmalrasi/.virtualenvs/dl/bin/label-studio-converter", line 8, in sys.exit(main()) File "/home/ajmalrasi/.virtualenvs/dl/lib/python3.10/site-packages/label_studio_converter/main.py", line 189, in main imports(args) File "/home/ajmalrasi/.virtualenvs/dl/lib/python3.10/site-packages/label_studio_converter/main.py", line 171, in imports import_coco.convert_coco_to_ls( File "/home/ajmalrasi/.virtualenvs/dl/lib/python3.10/site-packages/label_studio_converter/imports/coco.py", line 219, in convert_coco_to_ls item = create_segmentation( File "/home/ajmalrasi/.virtualenvs/dl/lib/python3.10/site-packages/label_studio_converter/imports/coco.py", line 54, in create_segmentation segmentation = annotation['segmentation'][0] IndexError: list index out of range