Skip to content

How to write instance segmentation example result into a coco dataset? #778

Answered by NowLoadY
NowLoadY asked this question in Q&A
Discussion options

You must be logged in to vote

Solved, instead of using:

# activate depth rendering
bproc.renderer.enable_depth_output(activate_antialiasing=False)
# enable segmentation masks (per class and per instance)
bproc.renderer.enable_segmentation_output(map_by=["category_id", "instance", "name"])

I should use:

# activate normal rendering
bproc.renderer.enable_normals_output()
# enable segmentation masks (per class and per instance)
bproc.renderer.enable_segmentation_output(map_by=["category_id", "instance", "name"])

😀
and refer to examples/advanced/main.py:

# Write data to coco file
bproc.writer.write_coco_annotations(args.output_dir,
                                    instance_segmaps=data['instance_segmaps'],
             …

Replies: 2 comments

Comment options

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