Skip to content

avoid nan value caused by divide by zero while computing box IoU #3405

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

Closed
wants to merge 1 commit into from

Conversation

developer0hye
Copy link
Contributor

fix #3404

avoid nan value caused by divide by zero
@NicolasHug
Copy link
Member

Thanks for the PR @developer0hye .

The union will only be zero for degenerate boxes, and we don't allow those. As you noted in #3404 a proper way of doing this would be to have an assertion, which we hope to implement in the future: #2582 (comment)

Meanwhile we have properly documented the expected format of these boxes, which will hopefully limit user errors. As introducing an eps isn't the desired solution here, I'll close this PR if you don't mind

@NicolasHug NicolasHug closed this Jun 18, 2021
@developer0hye developer0hye deleted the patch-3 branch June 18, 2021 11:40
@developer0hye
Copy link
Contributor Author

@NicolasHug Thanks for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

box_iou function can return nan value
3 participants