DIYer22 / bpycv

Computer vision utils for Blender (generate instance annoatation, depth and 6D pose by one line code)
MIT License
470 stars 58 forks source link

Easy way to get un occluded segmentation maps? #37

Closed singhularAdi closed 2 years ago

singhularAdi commented 2 years ago

I'm trying to get segmentation maps for each object in the scene with and without occlusions, is there an easy way to do this built in? I'm currently using

bpy.ops.object.hide_view_set(unselected=True)

inside the loop that loads up the objects and segmenting them once, and then segmenting the entire image, but this seems to be really inefficient.

DIYer22 commented 2 years ago

If you only need segmentation maps, you could disable render image. Render image needs long compute.

bpycv.render_data(render_image=False)
singhularAdi commented 2 years ago

That might help a little bit, thanks.

singhularAdi commented 2 years ago

Is it possible to ignore certain objects while segmenting?

DIYer22 commented 2 years ago

You can set the corresponding object to invisible in render, in view setting