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

Improve flat shading in render to have more separate colours #380

Open
hdoi5324 opened this issue Dec 3, 2024 · 2 comments
Open

Improve flat shading in render to have more separate colours #380

hdoi5324 opened this issue Dec 3, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@hdoi5324
Copy link

hdoi5324 commented Dec 3, 2024

Colours for flat shading are chosen randomly which can make it difficult to distinguish between instances for downstream tasks like generating bounding box. Suggestion is to use separation of colours similar to BlenderProc _colorize_objects_for_instance_segmentation. Requires replacing random_shader() in render.py

@hdoi5324 hdoi5324 added the enhancement New feature or request label Dec 3, 2024
@araistrick
Copy link
Contributor

We dont intend for the RGB segmentation visualizations to be used for any downstream tasks. Instead, there should be a corresponding .npy file which has integer class indices for each pixel, which is simpler to parse since you dont have to detect unique colors etc.

Nonetheless thanks a ton for the PRs, I will look into merging all of them soon including the segmentation recoloring as it is still a useful QOL improvement.

@hdoi5324
Copy link
Author

hdoi5324 commented Dec 5, 2024

Thanks for taking a look and considering the PRs.

I use InstanceSegementation to generate bounding boxes as I need the instances within an object eg the instances from a factory object like CoralFactory. The npy file for InstanceSegmentation is actually the RGB values from the InstanceSegmentation image so there isn't unique integer class indices for the instances (where there is for ObjectSegmentation).

I've found that the colour can vary very slightly across an InstanceSegmentation mask (npy or png file) so more separate colours between instances helps to identify bounding box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants