Megvii-BaseDetection / BEVStereo

Official code for BEVStereo
MIT License
257 stars 14 forks source link

Why there are two kinds of ego2global. #9

Open rockywind opened 1 year ago

rockywind commented 1 year ago

Hi, I'm confused about the two kinds of ego2global value in the line 342 and in the line 419. Why there are two kinds of ego2global. What's the difference between them.

        # Get mean pose of all cams.
        ego2global_rotation = np.mean(
            [key_info[cam]['ego_pose']['rotation'] for cam in cams], 0)
        ego2global_translation = np.mean(
            [key_info[cam]['ego_pose']['translation'] for cam in cams], 0)
                # sweep ego to global
                w, x, y, z = cam_info[cam]['ego_pose']['rotation']
                sweepego2global_rot = torch.Tensor(
                    Quaternion(w, x, y, z).rotation_matrix)
                sweepego2global_tran = torch.Tensor(
                    cam_info[cam]['ego_pose']['translation'])