com.unity.perception icon indicating copy to clipboard operation
com.unity.perception copied to clipboard

Layer mask for ground truth

Open ChristianWiele opened this issue 2 years ago • 6 comments

Hi,

is there any option to ignore certain layers when generating the ground truth? I have a mesh in my scene that needs to be ignored.

Thanks, Christian

ChristianWiele avatar May 27 '22 16:05 ChristianWiele

Hey @ChristianWiele, for clarification, would you want a GameObject to only be ignored in a particular labeler (for example, having its bounding box show up but hide it in say instance segmentation) or ignored by all labelers?

aryan-mann avatar Jun 01 '22 19:06 aryan-mann

I want some meshes not to be rendered for the ground truth, but for the image itself. The issue is the following: I use an ocean shader that uses vertex shaders for displacing the vertices, but this is not supported by the Perception package. So I want to create a second mesh that is deformed by a compute shader, and mimics the ocean surface. For the image itself I use the ocean shader to get the visual side correct. For the ground truth I want the ocean mesh to be ignored (as it is just a flat mesh). Instead, the generated mesh (with a transparent material) should be taken into account.

ChristianWiele avatar Jun 01 '22 19:06 ChristianWiele

Hey @ChristianWiele, I checked with the team and it seems like we have this feature (overriding the layer mask for the perception camera) implemented already 🎉 (not yet available in the latest Perception release). Is this issue a blocker for your project?

aryan-mann avatar Jun 03 '22 19:06 aryan-mann

Hey @aryan-mann, thanks for the update. When is the release planned? If I know it is coming, I can start implementing the work around. And I have enough other things to implement before I really need the feature. So, an upfront delivery is probably not necessary.

ChristianWiele avatar Jun 03 '22 19:06 ChristianWiele

I got the compute shader working, only need the overriding of the layer mask. ocean_sematic_segmentation

ChristianWiele avatar Jun 07 '22 11:06 ChristianWiele

Looks super slick @ChristianWiele 🎉 ! For information about the release timing and other features we have in the works, you can reach out to @shounakmitra at [email protected]. Otherwise, let me know if the perception team or I can help out with anything else 😄!

aryan-mann avatar Jun 07 '22 15:06 aryan-mann

Hey all! The Perception team just released 🎉 Perception 1.0 🎉, a major update to the toolset! Along with all of the new major improvements, we have fixed a lot of other bugs that we have discovered along the way, including this one reported by you. Thanks for being an active user and reporting this issue.

There are a bunch of cool features to check out such as ray tracing, depth, a new output format SOLO, normals, and more! Here is the full list of changes: Perception 1.0 Changelog

StevenBorkman avatar Nov 22 '22 18:11 StevenBorkman

@ChristianWiele how would one exclude certain objects from some ground truth renders? I'm trying to do something similar here where I want to remove Synthetic Human clothes: https://github.com/Unity-Technologies/com.unity.cv.synthetichumans/issues/3

davidfant avatar Feb 02 '23 00:02 davidfant

Looks like you go into the perception camera component and look for a field called "layerMaskOverride". Not sure if you can set it for just the depth labeler or if it needs to apply to that + the color image as well.

From there, you can move all of your clothing objects to a specific layer. I detailed how to do that in your issue on the synthetichumans repo

csun avatar Feb 02 '23 19:02 csun