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

Bug in cal_dious_3d function #27

Open
ShuojieMo opened this issue Jul 29, 2021 · 1 comment
Open

Bug in cal_dious_3d function #27

ShuojieMo opened this issue Jul 29, 2021 · 1 comment

Comments

@ShuojieMo
Copy link

.Bug was found when I use the cal_iou_3d() . IoU result of two bbox3d will get wrong when the angle = np.pi/4 , but get correct when the angle = np.pi/4 + 1e-6. Following is my test case:

import torch
from oriented_iou_loss import cal_diou_3d

x = torch.tensor([0., 0., 0., 2., 2., 2., np.pi/4]
                 ).view(1, 1, 7).cuda()
y = torch.tensor([0., 0., 0., 2., 2., 2., -np.pi/4]).view(1, 1, 7).cuda()

_, iou3d = cal_diou_3d(x, y)
## iou3d = 0 , wrong

x = torch.tensor([0., 0., 0., 2., 2., 2., np.pi/4+1e-6]
                 ).view(1, 1, 7).cuda()
y = torch.tensor([0., 0., 0., 2., 2., 2., -np.pi/4+1e-6]).view(1, 1, 7).cuda()

_, iou3d = cal_diou_3d(x, y)
## iou3d =1, Right
@lilanxiao
Copy link
Owner

Hi, I cannot reproduce this bug. I got iou3d=1 in both cases.

Did you use the latest version of my code? I fixed some bugs several months ago. Please consider pulling this repo again and re-compiling the CUDA extension. Also, you might need to delete the generated files under cuda_op before the re-compilation.

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