question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrlooicommented, Nov 17, 2019
  1. augmented gt_proposals - I did this to augment the shape of the rotated boxes. The motivation was to increase segmentation robustness to differences in rotated box width + height, since there is more variability in rotated boxes than bounding boxes
  2. cos function - I found a very slight AP improvement using cos (+0.02 AP). But this may vary. Bottom line: I found somewhat negligible impact, and marginal improvement at best
  3. Comments: those are just there for reference
0reactions
WeihongMcommented, Nov 15, 2019

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found