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

Different types of IoU #2545

Closed
kennyFF92 opened this issue Aug 3, 2020 · 5 comments · Fixed by #2642
Closed

Different types of IoU #2545

kennyFF92 opened this issue Aug 3, 2020 · 5 comments · Fixed by #2642

Comments

@kennyFF92
Copy link

🚀 Feature

Implementation of 3 other types of IoU metric in torchvision.ops.boxes:

  1. Generalized IoU
  2. Distance IoU
  3. Complete IoU

Motivation

Since these metrics can lead to better results in some cases (object detection, etc.) it could be useful to have them natively implemented.

Pitch

Users who need IoU computation can simply choose from 4 different implementation using the same inputs (e.g. two lists of boxes).

Additional context

Mathematical details can be found here:

  1. Generalized IoU: Generalized Intersection over Union
  2. Distance/Complete IoU: Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression
@fmassa
Copy link
Member

fmassa commented Aug 3, 2020

Hi,

This is a good request. I have seen benefits for Generalized IoU in the past, although for us Distance / Complete IoU didn't show any benefits.

From a number of citations perspective, I would say that we could currently add Generalized IoU to torchvision, and wait a bit more on Distance / Complete IoU to see if more people find it helpful.

@fmassa
Copy link
Member

fmassa commented Aug 3, 2020

For information, here is an implementation for Generalized IoU that fits the same API as the IoU from torchvision

@kennyFF92
Copy link
Author

For information, here is an implementation for Generalized IoU that fits the same API as the IoU from torchvision

I already had an implementation and now I aligned it to the one you mentioned. I'd like to contribute with a pull request but I can't find a guide for contributing and I don't want to create too many problems

@fmassa
Copy link
Member

fmassa commented Aug 4, 2020

For contributing, the standard guidelines apply:

  • fork the repo and create a branch for the feature
  • add tests and documentation
  • send the pull request and make sure that all tests pass (including lint)

@oke-aditya
Copy link
Contributor

oke-aditya commented Sep 3, 2020

Hello, @fmassa can I contribute to this issue by creating a PR?
I am new to contributing to torchvision but highly interested.
I will try my best to add this but please do help me.

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

Successfully merging a pull request may close this issue.

3 participants