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

fix a possible divided-by-zero bug #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huangzhengxiang
Copy link

Motivation

Since we have
poly_center.x /= cnt;
poly_center.y /= cnt;
in iou3d_kernel.cu, we potentially face divided-by-zero issue when bboxes aren't intersecting with each other, as no intersection exists, cnt=0. (We do encounter such issue during experiments.)

Modification

Add zero prevention for denominator. No changes at other places.

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
No.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Higher stability for your scale-nms

Checklist

The correctness is checked via experiments.

Since we have   
  poly_center.x /= cnt;
  poly_center.y /= cnt;
in the code, we potentially face divided-by-zero issue when bboxes aren't intersecting with each other, as no intersection exists, cnt=0.
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

Successfully merging this pull request may close these issues.

1 participant