Question: How to get binary segmentation mask?
eendru opened this issue · 3 comments
eendru commented
Could you provide an example for obtain binary segmentation mask from
result = renderer.render(scene)
Thanks.
xqms commented
Hey, this is documented here: https://ais-bonn.github.io/stillleben/stillleben.RenderPassResult.html
If you just want to segment all objects against the background, you can use something like result.class_index() != 0
to get a mask of all the pixels which do not contain background (background has class index 0).
xqms commented
I have to correct myself: use result.instance_index() != 0
. The class index is not automatically set up, you have to set it using mesh.class_index = N
.
eendru commented
Thank you!