Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ekolve
Copy link

@ekolve ekolve commented Jan 19, 2022

When using the renderInstanceSegmentation flag, we generate a colorBounds property which is used to populate the instance_detections2D field in the event (Python side). The current way this is done is extremely inefficient since we effectively grab the data twice for the segmented image. We then iterate pixel by pixel to determine the bounds. This is has been moved to the Python side and is done using numpy. I observed a performance improvement of ~60%. If for some reason colorBounds is being used on the Python side by an end user or for some reason we decide we need it, we can populate the metadata directly from the python side with the bounding boxes and corresponding colors.

@ekolve ekolve requested review from AlvaroHG and mattdeitke January 19, 2022 20:38
@AlvaroHG
Copy link
Collaborator

Great find, LGTM

Copy link
Contributor

@mattdeitke mattdeitke left a comment

Choose a reason for hiding this comment

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

LGTM :)

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.

4 participants