HuangJunJie2017 / BEVDet

Official code base of the BEVDet series .
Apache License 2.0
1.4k stars 264 forks source link

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

Open dyou-dev opened 5 months ago

dyou-dev commented 5 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 5 months ago

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

441599828 commented 5 months ago

hi. i have the same question, any explanation?