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

amodal segmentation #1182

Open
kamdkslansgka opened this issue Mar 3, 2025 · 0 comments
Open

amodal segmentation #1182

kamdkslansgka opened this issue Mar 3, 2025 · 0 comments
Labels
question Question, not yet a bug ;)

Comments

@kamdkslansgka
Copy link

Describe the issue

Dear author, thank you for your wonderful work?
I don't know if Blenderproc supports amodal segmentation. Even the obscured part needs to have a segmentation mask.
If there are any suggestions, I would be extremely grateful

Minimal code example

data = bproc.renderer.render()

# 
image_dir = os.path.join(args.output_dir, "images")
os.makedirs(image_dir, exist_ok=True)
for i, image in enumerate(data["colors"]):
    save_array_as_image(image, "colors", os.path.join(image_dir, f"image_{i}.png"))

# 
instance_dir = os.path.join(args.output_dir, "instance_segmaps")
os.makedirs(instance_dir, exist_ok=True)
for i, mask in enumerate(data["instance_segmaps"]):
    save_array_as_image(mask, "instance_segmaps", os.path.join(instance_dir, f"instance_{i}.png"))

# *
for obj in objs:
    obj.blender_obj.hide_render = False  
    obj.blender_obj.hide_viewport = False

# bproc.renderer.enable_segmentation_output(map_by=["object_name", "instance"], default_values={'object_name': 'default'})
bproc.renderer.enable_segmentation_output(map_by=["object_name", "instance"], default_values={'object_name': 'default'})

Files required to run the code

No response

Expected behavior

I want to obtain a amodal mask

BlenderProc version

2.8

@kamdkslansgka kamdkslansgka added the question Question, not yet a bug ;) label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question, not yet a bug ;)
Projects
None yet
Development

No branches or pull requests

1 participant