Skip to content

Camera intrinsics overwritten #82

Open

Description

@Byte247

Hi, I am trying to understand the Fast BEV projection code. I noticed that in the NuScenesMultiView_Map_Dataset2 , or more precisely in the NuScenesMultiViewDataset the camera intrinsics are overritten with the identity matrix. Why is that done? In the following pipelines this is not set back to the original values.

new_info = dict(
            sample_idx=data_info['sample_idx'],
            img_prefix=[None] * n_cameras,
            img_info=[dict(filename=x) for x in data_info['img_filename']],
            lidar2img=dict(
                extrinsic=[tofloat(x) for x in data_info['lidar2img']],
                intrinsic=np.eye(4, dtype=np.float32),
                lidar2img_aug=data_info['lidar2img_aug'],
                lidar2img_extra=data_info['lidar2img_extra']
            )
        )

Activity

  1. arnoldfychen commented on May 17, 2024

    @arnoldfychen

    My understanding:

    Because data_info['lidar2img']  is  lidar2img_rt, which is actually intrinsic@lidar2cam_rt.T in NuScenesDataset's get_data_info():
                viewpad = np.eye(4)
                viewpad[:intrinsic.shape[0], :intrinsic.shape[1]] = intrinsic
                lidar2img_rt = (viewpad @ lidar2cam_rt.T)
    

    I guess the code owner wanted to re-establish the intrinsic item in lidar2img (used later in FastBEV's _compute_projection() for scaling) in NuScenesMultiViewDataset's get_data_info(), so, assigned it with an identity matrix, as you know, the value of a matrix doesn't change when the matrix multiply with an identity matrix, i.e., I@A = A

  2. BaophanN commented on Jan 3, 2025

    @BaophanN

    I am also confused with this. Since I want to adopt FastBEV as a view transformer module using OpenLane-V2 dataset. In Openlane-V2, extrinsics are sensor2ego matrix. Can you help me clarify is it true that extrinsics from nuscnenes also use sensor2ego matrix?

  3. venkataramanas1 commented on May 13, 2025

    @venkataramanas1

    Have you up the project ? can you provide me steps to build and run properly ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions