Bug: rotate_iou CUDA mode
See original GitHub issue🐛 Bug
from maskrcnn_benchmark.layers.rotate_nms import rotate_iou
a=torch.tensor([[50.7325,50.7325,100.7325,300.7325,-3.4]]).float().to('cuda')
b=torch.tensor([[50.7325,50.7325,100.7325,300.7325,-3.4]]).float().to('cuda')
rotate_iou(a,b) # get the result 0.3333
a=torch.tensor([[50.7325,50.7325,100.7325,300.7325,-3.4]]).float()
b=torch.tensor([[50.7325,50.7325,100.7325,300.7325,-3.4]]).float()
rotate_iou(a,b) # get the result 1.0
however, when I test on the cpu mode, It return the result, tensor=1.0 Quite surprised to debug the result, maybe the rotate_iou cuda version is wrong? Whats more, I test the rotated ops file (maskrcnn_benchmark/modeling/rotate_ops.py) the rotated version used in GPU mode is slower than CPU mode. It’s because the test box array is small? @mrlooi , hope for your updates, Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
There are different output data of rotate function between ...
There are different output data of rotate function between nppiRotate(Npp of cuda) and ippiRotate(Ipp of intel) ?
Read more >cudaMemPrefetchAsync bug on GTX 1080 (Pascal)?
On my machine the call to cudeMemPrefetchAsync in the code below returns 10 (cuda error invalid device) rather than 0.
Read more >[BUG] rotation isnt working on GPU · Issue #286 - GitHub
i am trying to do a simple rotation of a batch on GPU and it fails. on CPU the rotation works: transform =...
Read more >Download Azure Kinect Body Tracking SDK - Microsoft Learn
Understand how to download each version of the Azure Kinect Sensor SDK on Windows or Linux.
Read more >Ultra High Quality Image Rotation on a GPU - CodeProject
We will be developing in .NET and target NVIDIA GPUs and therefore make use of CUDAfy.NET, a CUDA wrapper for .NET. Frequency Domain...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mrlooi Thanks for your reply. I have used rotated iou script in detectron2 project. successfully ported to your project.
excuse me, may I ask one more question.
I have read your code, and it seems you have do some tricks in this project. such as dir maskrcnn_benchmark/rrpn/inference.py function add_gt_proposals, you defind aug_rrect, rather than directly use gt_rrect, do you find this tricks matters?
Also, the way you compute angle loss is cos function, rather than smooth loss, which seems different from RRPN paper. Do you find this also matters?
Also, in the file maskrcnn_benchmark/modeling/rrpn/loss.py, the call function has the comments old and new. Do you forget to uncomment this, or maybe these comments is redundant.
looking forward to your reply. thanks