HumanSignal / HumanSignal/label-studio-sdk
import multiple segmentations from coco format json
- Dominant language
- Python
- Stars
- 192
- Forks
- 127
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
# 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)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.