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

训练代码图片预处理中flip时,x未取反,这是个bug吗? #11

Closed
DuZzzs opened this issue Aug 19, 2021 · 7 comments
Closed

Comments

@DuZzzs
Copy link

DuZzzs commented Aug 19, 2021

图片预处理代码中当flip时,并未对x取反,这样会导致box3d在图中投影不对。这是一个bug吗?

if random_flip_flag:

是否要加入:

object.pos[0] = -object.pos[0]

@xinzhuma

@DuZzzs DuZzzs closed this as completed Aug 19, 2021
@xinzhuma
Copy link
Owner

xinzhuma commented Aug 19, 2021

@DuZzzs 不是BUG,图像flip并不对应直接在世界坐标系下取反,因为二者的对称轴并不是对齐的。要先把3D位置投影到图像中,然后flip。对应代码在Line220-221.

@DuZzzs DuZzzs reopened this Aug 19, 2021
@DuZzzs
Copy link
Author

DuZzzs commented Aug 19, 2021

因为最终xy是通过图像上的点反推到相机坐标系下的,所以投下来做flip就行。谢谢。@xinzhuma

@DuZzzs DuZzzs closed this as completed Aug 19, 2021
@DuZzzs
Copy link
Author

DuZzzs commented Sep 7, 2021

@xinzhuma 您好,在看代码时存在几个疑问,您能否解答下:

  1. 我自己训练的模型中sigma计算出的值有的大于1有的小于1,导致乘以score后最终输出score存在大于1的,这是哪里有问题吗?又或者是,我观察到训练后期depth_loss的输出逐渐变为负数,即variance落在了0到1之间,此时是否应该用torch.exp(log_variance),而不是torch.exp(-log_variance)?测试了readme您提供的模型,存在同样问题,即sigma输出并不是在0~1之间,与score相乘后的结果不能用。
  2. 用score_threshold卡的时候是对热力图输出score进行卡的,没有不确定度的参与,那么这个不确定度预测了没用?
  3. 其他论文中一般采用hwl预测相对均值的变化,但是代码config中cls_meanshape=False,哪种设置性能更好呢?
    谢谢。

@xinzhuma
Copy link
Owner

xinzhuma commented Sep 7, 2021

  1. KITTI score并没有要求为 0-1 之间,所以并不影响;
  2. score参与了AP计算;
  3. 在类别较少的情况下,二者的差别很小。

@DuZzzs
Copy link
Author

DuZzzs commented Sep 7, 2021

score不在0到1之间我还不太理解,我需要去看下ap计算的代码。非常感谢您的回复。

@xinzhuma
Copy link
Owner

xinzhuma commented Sep 7, 2021

score 在(0, 1)只是方便人为理解。实际上,整个AP计算过程,score起到的是一个ranking的作用,只要ranking不变,任何范围的score取值都是没有影响的。实际上,你可以用任何一个单调函数将它映射到(0,1)区间,结果理论上保持不变。

@DuZzzs
Copy link
Author

DuZzzs commented Sep 7, 2021

明白了,非常感谢。

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

No branches or pull requests

2 participants