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

fix(app): render bounding boxes on media panel without points #3158

Merged
merged 5 commits into from
Dec 10, 2024

Conversation

brianlund-wandb
Copy link
Contributor

@brianlund-wandb brianlund-wandb commented Dec 5, 2024

Description

When logging a point cloud via wandb.Object3D with an empty list of points we still end up including a single, empty point in the file we use to generate the panel.

{
    "boxes":[
        {
            "color":[255, 0, 10],
            "corners":[ ... omitted for brevity ... ],
            "label":"Box"
        },
        {
            "color":[0, 255, 10],
            "corners":[... omitted for brevity...],
            "label":"Box-2"
        }
    ],
    "points":[
        []
    ],
    "type":"lidar/beta",
    "vectors":[]
}

The library we use to generate the panel, Babylon, fails to interpret that point, and generates a confusing panel.

image

The fix

  • coerces that empty point to the position [0, 0, 0]
  • ensures the camera focuses on the first bounding box (if it exists)

image

Testing

Reproduction steps are included in the ticket. The fix was tested locally, and includes a unit test for the coercion logic.

Copy link
Contributor

github-actions bot commented Dec 5, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@brianlund-wandb brianlund-wandb changed the title WB-16623 coercing empty point to default, targeting camera on bounding box when point cloud empty fix: WB-16623 empty media panel Dec 5, 2024
@circle-job-mirror
Copy link

circle-job-mirror bot commented Dec 5, 2024

@brianlund-wandb
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 6, 2024
@brianlund-wandb brianlund-wandb changed the title fix: WB-16623 empty media panel fix(app): render bounding boxes on media panel without points Dec 6, 2024
@brianlund-wandb brianlund-wandb marked this pull request as ready for review December 6, 2024 18:11
@brianlund-wandb brianlund-wandb requested a review from a team as a code owner December 6, 2024 18:11
@brianlund-wandb brianlund-wandb self-assigned this Dec 6, 2024
Copy link
Contributor

@nhusher nhusher left a comment

Choose a reason for hiding this comment

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

this seems reasonable to me

@brianlund-wandb brianlund-wandb merged commit c19fe6b into master Dec 10, 2024
120 checks passed
@brianlund-wandb brianlund-wandb deleted the brianl/empty-point-cloud branch December 10, 2024 18:36
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants