import multiple segmentations from coco format json
Problem
when converting coco annotation to label studio format, only the first item is used as a segmentation.
https://github.com/HumanSignal/label-studio-sdk/blob/5fceb54cc74766f5666db8a835c8301e3d5b4c32/src/label_studio_sdk/converter/imports/coco.py#L54
for example
expected
actual
Suggestion
can we use all segmentations instead? or am I misunderstanding something?
from
https://github.com/HumanSignal/label-studio-sdk/blob/5fceb54cc74766f5666db8a835c8301e3d5b4c32/src/label_studio_sdk/converter/imports/coco.py#L218-L227
to
something like this
if "segmentation" in annotation and len(annotation["segmentation"]):
for single_segmentation in annotation["segmentation"]:
item = create_segmentation(
annotation["category_id"],
single_segmentation,
categories,
segmentation_from_name,
image_height,
image_width,
to_name,
)
task[out_type][0]["result"].append(item)
It seems it's just not implemented. Could you submit a PR with this?
@makseq thank you very much for the comment. I opened a PR: https://github.com/HumanSignal/label-studio-sdk/pull/251
Thanks for reporting this and for opening a PR @Ljung323, our team will take a look at get back to you with comments in the PR
thank you for acknowledging the report and the PR, look forward to a feedback.