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

[_Custom.cp38.pyd=>rotate_iou_matrix] calculate wrong value when boxes are exactly same. #46

Open
p890040 opened this issue Sep 10, 2021 · 1 comment

Comments

@p890040
Copy link

p890040 commented Sep 10, 2021

🐛 Bug

To Reproduce

testing code:

from maskrcnn_benchmark import _Custom as _C
from apex import amp
rotate_iou_matrix = amp.float_function(_C.rotate_iou_matrix)

boxes1
tensor([[672.4067, 290.7776, 791.0275,  38.9333,  34.1454]]
boxes2
tensor([[672.4067, 290.7776, 791.0275,  38.9333,  34.1454]
rotate_iou_matrix(boxes1, boxes2)
tensor([[0.3333]], device='cuda:0') # Should be 1.0!

#If I shift boxes1 a little bit.
boxes2[0][0] = 672.3
boxes2
tensor([[672.3000, 290.7776, 791.0275,  38.9333,  34.1454]], device='cuda:0')
rotate_iou_matrix(boxes1, boxes2)
tensor([[0.9967]], device='cuda:0' # Seems correct

Expected behavior

  • When boxes1 is exactly same as boxes2, IOU value should be 1.0 but it return 0.333.
  • But if I shift boxes1 a little bit, it return 0.9967 and it seems correct.
@mrlooi
Copy link
Owner

mrlooi commented Sep 11, 2021

hmm you're right, that is a bug
I'm no longer maintaining this repo at the moment unfortunately, but feel free to submit a PR!

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