Skip to content

convert labelme2coco from AI Mask #1447

Answered by ksv87
ksv87 asked this question in Q&A / Help
Discussion options

You must be logged in to vote

I try change this

for shape in label_file.shapes:
points = shape["points"]
label = shape["label"]
group_id = shape.get("group_id")
shape_type = shape.get("shape_type", "polygon")
mask = labelme.utils.shape_to_mask(img.shape[:2], points, shape_type)
if group_id is None:
group_id = uuid.uuid1()

        for shape in label_file.shapes:
            points_origin = shape["points"]
            label = shape["label"]
            group_id = shape.get("group_id")
            shape_type = "polygon"#shape.get("shape_type", "polygon")
            mask = shape.get…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ksv87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant