Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation is removed in coco export when a single polygon is supplied #62

Open
jrdalenberg opened this issue Sep 27, 2023 · 0 comments

Comments

@jrdalenberg
Copy link

jrdalenberg commented Sep 27, 2023

When annotation['segmentation'] contains a single polygon list that is not provided as a list of lists but as a single list of coordinates, the logic in https://github.com/jsbroks/imantics/blob/master/imantics/annotation.py#L286 removes the entire segmentation.

I do not get any warnings or errors in my pseudo code below when I start creating a dataset:

                        # Add image to coco database
                        ds_im = Image.from_path(im_path)
                        ds_poly = Polygons(json.loads(im_polygon_path))
                        ds_im.add(ds_poly, category=Category(polygon_label))
                        img_set.append(ds_im)

Perhaps a quick fix for you @george-gca in #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant