Skip to content

Conversation

@daphne-cornelisse
Copy link
Contributor

No description provided.

# Convert the BEV observation to a colored segmentation map
# If the tensor is one-hot encoded segmentation data
colored_bev = color_onehot_segmentation_map(bev, 'cpu')
agent_idx = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is always the sdc_index right? (I think so if I am following json_serialization.hpp well.
Maybe you would call this variable sdc_index just to it is clear we are logging that agent?

Copy link
Contributor Author

@daphne-cornelisse daphne-cornelisse Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the 0th index is always the sdc (we follow json_serialization.hpp too)

Note: The implementation doesn't work yet: the raster image I get is black and white. Also, do you think it would be possible to display the raster image in the case when we control multiple agents?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to permute the bev map so that the number of classes is the first dimension
bev.permute(2, 0, 1) or something like this.

For your second question, if im understanding correctly, I dont see an issue, you just might have to modify the colorization function to accept a first batch dimesion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants