HuangJunJie2017 / BEVDet

Code base of the BEVDet series .
Apache License 2.0
1.45k stars 265 forks source link

Camera intrinsic matrixes cam2imgs not adapted to the input size in get_lidar_coor(...) #342

Open dyou-dev opened 7 months ago

dyou-dev commented 7 months ago

In class LSSViewTransformer -> def get_lidar_coor(...), the camera intrinsic matrixes cam2imgs is of the src size (900, 1600), not of the input size (256, 704).

Reproduction

  1. Add the following code in class LSSViewTransformer -> def get_lidar_coor(...). print(self.frustum.shape) print(self.frustum[0, -1, -1, ...].to(int)) print(cam2imgs.to(int)) quit()

  2. Run the test. python3 tools/test.py configs/bevdet/bevdet-r50.py ../bevdet-r50.pth --format-only --eval-options jsonfile_prefix=out

  3. Get the log. torch.Size([59, 16, 44, 3]) tensor([703, 255, 1]) tensor([[[[1257, 0, 827], [ 0, 1257, 450], [ 0, 0, 1]],

It shows that the (u, v) of input size (256, 704) will be operated with the camera intrinsic matrix of src size (900, 1600). It looks like an issue, or is there any special consideration here?

dyou-dev commented 7 months ago

The issue was found with the branch dev2.0, commit 2ae6a02d7a569c5b300a0b57c77ce50bb4e17bc9. I haven't checked other branches yet.

441599828 commented 7 months ago

hi. i have the same question, any explanation?

BozhouZha commented 1 month ago

The resize ratio seems to be blended into post_rot already, which was also applied to frustum points.