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

Assertion for number of objects #2

Open
nileshkumar0726 opened this issue Dec 3, 2021 · 1 comment
Open

Assertion for number of objects #2

nileshkumar0726 opened this issue Dec 3, 2021 · 1 comment

Comments

@nileshkumar0726
Copy link

In spatial_transform.py there is an assertion assert n_obj <= z_wheres.shape[1] in function add_bounding_boxes. Shoudln't the index here be 0 because the z_where is (max_objects, features)?

@addtt
Copy link
Owner

addtt commented Sep 10, 2022

Hi, I'm terribly sorry for the very late reply.

In principle z_wheres could have shape (1, max_n_objects, 3) or (max_n_objects, 3). I think the right thing to do is to change the index to 0 as you suggest, and move this assertion after this block:

if len(z_wheres.shape) == 3:
    assert z_wheres.shape[0] == 1
    z_wheres = z_wheres[0]

such that the shape of z_where is always (max_n_objects, 3).

Feel free to update that and open a PR :) Thank you!

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

No branches or pull requests

2 participants