Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于vis.py中LidarinstanceBOX #172

Open
leslie27ch opened this issue Mar 22, 2023 · 4 comments
Open

关于vis.py中LidarinstanceBOX #172

leslie27ch opened this issue Mar 22, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@leslie27ch
Copy link

No description provided.

@leslie27ch
Copy link
Author

共有如下几次变换:
1 。训练前:
create_data 从 nuscenes wlh 改变为 lwh 且保持yaw角不改
get_data_info中 形成lidar_instance3dbox 开始训练

  1. 训练后:
    在_format_box中lwh 变为wlh:
    Nuscene(locs,wlh,yaw,vel)此时形成result.json

  2. 可视化vis时:
    读取result.json ,变为:Lidar_intance3dbox([loc,wlh,yaw+pi/2])
    这里为什么不改变为lwh?根据mmdet3d对 Lidar_intance3dbox的定义,是朝向旋转到x轴时的(xsize,ysize,zsize)。

然后我用Lidar_intance3dbox([ 0,0,0,5,2,1,0]) , 其中5,2,1位lwh,0为yaw, 去测试查看了8个corner角点,直到也是如我预想的一样,可为什么最后按lwh写入显示反而不对?

是在具体哪一步产生了反转?

感谢回复

@leslie27ch
Copy link
Author

vis.py中把pred_box形成了LiDARInstance3DBoxs,对应它由定义:而针对 3D 框的尺寸 (x_size, y_size, z_size),按惯例我们定义为物体 3D 框在朝向角 yaw 角度为 0 时沿着 x, y, z 轴三个方向的长度。 yaw的0度角为x轴正方向。代码没有按照这个定义而是强行拼凑结果看起来是对的。
在vis.py中应该 :

  1. yaw角的定义从nuscene开始到训练前后就没有变过,应该nuscenes本身定义yaw就是相对于x轴的偏角。而nusce 是wlh,而现在要变成lwh。
    Lidar_intance3dbox([loc,wlh,yaw])
  2. 在画朝向线时, 应改为: head_bev=corner_bev[:,[4,7],:2],mean(axis=1)

此时结果正确,而且按照数据变化的定义。

@HuangJunJie2017
Copy link
Owner

@leslie27ch I designed this script performance-oriented. I will offer a revision in nearby future with a more reasonable data processing pipeline.

@HuangJunJie2017 HuangJunJie2017 added the enhancement New feature or request label Mar 23, 2023
@BaophanN
Copy link

BaophanN commented Feb 6, 2025

Hi, given the checkpoint, how can I obtain the result.json file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants