-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Enhance] Remove CUDA part from diff_iou_rotated #2067
base: master
Are you sure you want to change the base?
Conversation
Hi @filaPro , thanks for your contributions. Could you add some benchmark results in the PR description? You can refer to #1718 (comment). |
Hi @zhouzaida , done. I haven't tried |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Only need to fix minor comments. Others LGTM. |
@filaPro Great contribution! BTW, I am curious about the iou computation used in mmdet3d. Sometimes I feel like there are also some corner cases that BEV IoU can not be precisely computed, for example, for two strictly overlapped boxes on KITTI. Do you have any idea about it and is it related to similar problems as shown in this PR? |
Hi, @Tai-Wang. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! LGTM.
LGTM. Just need to resolve conflicts |
Hi @filaPro , this PR can be merged after resolving conflicts. |
Motivation
Fix #1922. Following lilanxiao/Rotated_IoU#39#issuecomment-1146352088 we remove
cuda
andcpp
part ofdiff_iou_rotated
in favour of purepytorch
implementation. It has negligible affect on speed however the overall accuracy in corner cases is much better.Modification
Replace sorting vertices from
cuda
topytorch
. Split test to GPU and CPU.BC-breaking (Optional)
No, the public API is not changed. However we may want to move it from
mmcv.ops
as it does not requirecuda
now.mmdet3d
does not use it inmaster
. I've checked this PR with my FCAF3D PR mmdetection3d#1547. Alsodiff_iou_rotated
is used inmmrotate
master
. Maybe @ZwwWayne or @Tai-Wang can have a look onmmdetection3d
connection and @zytx121 formmrotate
.Benchmark
Setup: ubuntu 18.04.6, nvidia driver 470.129.06, nvidia geforce rtx 3090, pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
master >>> mean=7.1313, std=0.2482
this pr >>> mean=11.1537, std=0.3251