Unverified Commit 6d3518d0 authored by lianqing01's avatar lianqing01 Committed by GitHub
Browse files

[Features] Support waymo challenge solution (#1716)



* update evaluation metric to support waymo cam only evaluation

* add transformation for bev detection

* add multiview dfm

* support multiview detection in datasets with transformation, dfm model and metric

* remove deprecated config and update doc string

* remove file_client_args=file_client_args and update docstr

* add doc string and remove pdb

* fix the doc string of voxel fusion

* add doc string

* remove lidar2img

* add doc string

* update doc string

* support waymo dataset for replace_ceph and modify path of pkl in config

* update evaluation metrics; and the config for waymo solution

* fix the index error in waymo metric and add lidar2img utils function

* replace __call_ to transform

* fix doc string

* rename configs

* update the config name

* update the lidar2cam calib in waymo data creater
Co-authored-by: default avatarlianqing <lianqing1997@gmail.com>
Co-authored-by: default avatarTai-Wang <tab_wang@outlook.com>
parent 25e38012
...@@ -333,3 +333,25 @@ def yaw2local(yaw, loc): ...@@ -333,3 +333,25 @@ def yaw2local(yaw, loc):
local_yaw[small_idx] += 2 * np.pi local_yaw[small_idx] += 2 * np.pi
return local_yaw return local_yaw
def get_lidar2img(cam2img, lidar2cam):
"""Get the projection matrix of lidar2img.
Args:
cam2img (torch.Tensor): A 3x3 or 4x4 projection matrix.
lidar2cam (torch.Tensor): A 3x3 or 4x4 projection matrix.
Returns:
torch.Tensor: transformation matrix with shape 4x4.
"""
if cam2img.shape == (3, 3):
temp = cam2img.new_zeros(4, 4)
temp[:3, :3] = cam2img
cam2img = temp
if lidar2cam.shape == (3, 3):
temp = lidar2cam.new_zeros(4, 4)
temp[:3, :3] = lidar2cam
lidar2cam = temp
return torch.matmul(cam2img, lidar2cam)
...@@ -58,6 +58,11 @@ def replace_ceph_backend(cfg): ...@@ -58,6 +58,11 @@ def replace_ceph_backend(cfg):
'LoadImageFromFileMono3D\'', 'LoadImageFromFileMono3D\'',
'LoadImageFromFileMono3D\',' + replace_strs) 'LoadImageFromFileMono3D\',' + replace_strs)
# replace LoadMultiViewImageFromFiles
cfg_pretty_text = cfg_pretty_text.replace(
'LoadMultiViewImageFromFiles\'',
'LoadMultiViewImageFromFiles\',' + replace_strs)
# replace LoadPointsFromFile # replace LoadPointsFromFile
cfg_pretty_text = cfg_pretty_text.replace( cfg_pretty_text = cfg_pretty_text.replace(
'LoadPointsFromFile\'', 'LoadPointsFromFile\',' + replace_strs) 'LoadPointsFromFile\'', 'LoadPointsFromFile\',' + replace_strs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment