Skip to content

Using different H and W resolution #66

@michaelbaltaxe

Description

@michaelbaltaxe

I have changed tpv_h_ and tpv_w_ in config/tpv04_occupancy.py so that the resolution of the grid is different in each direction.
Now I am getting the following error when calculating the loss function during training for occupancy estimation (line 205 in train.py):
Screenshot from 2024-05-29 16-54-05

The issue seems to come from an inconsistency in the use of H and W dimensions.
According to config/tpv04_occupancy.py, H corresponds to the first dimension and W to the second:
grid_size = [tpv_h_*scale_h, tpv_w_*scale_w, tpv_z_*scale_z]

However, in tpvformer04/tpv_aggregator.py the role of H and W are inverted (W is used for the first dimension and H is used for the second dimension):
Screenshot from 2024-05-29 17-01-05
Screenshot from 2024-05-29 17-01-18

When using the code in the repository this error does not happen because H = W = 100 and the calculations are consistent. However when tpv_h_ != tpv_w_ the shapes do not correspond.

It seems to me that I need to work on tpvformer04/tpv_aggregator.py and on tpvformer04/tpv_head.py to be able to run with tpv_h_ != tpv_w_. However, I am not sure if this is correct and if there are other sections of the code that need to be updated. Could you point me on how to address this issue? Is there an easier way to do it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions