ADLab-AutoDrive / BEVHeight

An official code release of our CVPR'23 paper, BEVHeight
MIT License
196 stars 25 forks source link

issue about get_denorm and ego2sensor #53

Open WjzZwd opened 4 days ago

WjzZwd commented 4 days ago

image image

I have a question about the get_reference_height function? https://github.com/ADLab-AutoDrive/BEVHeight/blob/fa3bf883b0a804c2d23941d26d14f573c849ca78/dataset/nusc_mv_det_dataset.py#L80 ` ref_height = np.abs(denorm[3])/np.sqrt(denorm[0]2 + denorm[1]2 + denorm[2]2) ** This function represents the distance from the origin to the plane According to this schematic from BEVHeight , It's the distance from the origin of the blue(sensor) coordinate system to the xy plane of the green(ego) coordinate system so denorm represents the xy plane of the green (ego)coordinate system BUT!!! in get_denorm https://github.com/ADLab-AutoDrive/BEVHeight/blob/fa3bf883b0a804c2d23941d26d14f573c849ca78/dataset/nusc_mv_det_dataset.py#L59 if you think of **ground_points_lidar = np. array ([[0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0]])** represents the xy plane of the bule( sensor )coordinate system ** ground_points_cam = np.matmul(sweepego2sweepsensor, ground_points_lidar.T).T** then can be understood as the xy plane of the green (ego) coordinate system. So!!! i wonder whether ** np.matmul(sweepego2sweepsensor, ground_points_lidar.T).T** need to be changed to ** np.matmul(sweepsensor2sweepego, ground_points_lidar.T).T`**

WjzZwd commented 4 days ago

looking forward to your reply ,thanks!!!! @yanglei18

yanglei18 commented 4 days ago
  • step 1: ground_points_lidar represents some points in ego coordinate system.
  • step 2: ground_points_cam = np.matmul(sweepego2sweepsensor, ground_points_lidar.T).T represents the same points in camera coordinate system.
  • step 4: denorm is based on the ground_points_cam
  • step 5: ref_height is based on the denorm.
WjzZwd commented 4 days ago
  • step 1: ground_points_lidar represents some points in ego coordinate system.
  • step 2: ground_points_cam = np.matmul(sweepego2sweepsensor, ground_points_lidar.T).T represents the same points in camera coordinate system.
  • step 4: denorm is based on the ground_points_cam
  • step 5: ref_height is based on the denorm.

thanks!for your reply ~ and i still get some doubt that

1.ego coordinate system corresponds to the green coordinate system in this picture, right?

2.based on the formula in picture image

we can infer that the func https://github.com/ADLab-AutoDrive/BEVHeight/blob/fa3bf883b0a804c2d23941d26d14f573c849ca78/dataset/nusc_mv_det_dataset.py#L80 aim to get the distace from the origin to the plane determined by denorm . so ----1)who is the origin(the coordinates of the inf camera? or other)? ----2)and who is the plane (xy plane in the ego system? or xy plane in the sensor system? )

thanks for your reply~~~

WjzZwd commented 3 days ago

my question is based on the reproduction in DAIR-V2X dataset @yanglei18 thanks you !~

yanglei18 commented 3 days ago
  • All the origin and the plane used in def get_reference_height(denorm): is represented in camera coordinates system.
  • The origin corresponds to the origin of camera coordinates system.
  • The plane is the xy plane of ego coordinates system.
  • The ego coordinates system is the virtual LiDAR system in DAIR dataste.