-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 IoU score for classes not present in target or pred #3098
Fix IoU score for classes not present in target or pred #3098
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3098 +/- ##
=======================================
+ Coverage 86% 91% +5%
=======================================
Files 109 107 -2
Lines 8031 8034 +3
=======================================
+ Hits 6904 7300 +396
+ Misses 1127 734 -393 |
@abrahambotros how is it going here? I the PR still WIP? |
@SkafteNicki from my side, this is ready for review. However, it's still marked as WIP/draft since I haven't gotten feedback / confirmation on the related issue (#3097). Not sure of the etiquette for this repo, but in case it's just in limbo here, I'll remove the |
340fbbf
to
87fc42f
Compare
This pull request is now in conflict... :( |
87fc42f
to
e75f32f
Compare
@SkafteNicki I also rebased on master and added this change to the changelog, requiring the force push above. Still ready for review. |
@abrahambotros PR is looking good. One question: |
Hello @abrahambotros! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-09-15 20:33:29 UTC |
67439be
to
0d5516c
Compare
@SkafteNicki that sounded like a reasonable addition here; added that change in 0d5516c |
This pull request is now in conflict... :( |
Ah, looks like there's a new merge conflict in the changelog; I should include the |
295d4b2
to
a2576e1
Compare
@SkafteNicki changes done and ready for final review. A few of the CI tests apparently were cancelled, and looks like PRs that were merged today also had some skipped; nothing seems related to this PR, but let me know if I need to change anything else. |
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
a63d403
to
8b84b04
Compare
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.
There is a failing test for IOU. @abrahambotros can you check?
Use macro instead of micro averaging in sklearn's jaccard score, to match multi-class IoU, which conventionally takes per-class scores before averaging.
@abrahambotros I am not familiar with IoU that much, but does it require new reduction methods just like in other classification metrics? Same for dice_score? |
@rohitgr7 good question to discuss. My understanding is that IoU (and I believe dice score as well) is always computed per-class (analogous to I think
I could be wrong on some of these points though. Maybe @SkafteNicki or others have some input/corrections? |
@abrahambotros I agree with your analysis. |
Thanks @SkafteNicki ! |
@rohitgr7 if you are happy with changes made, will you go ahead and approve so we can get this merged? |
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 :)
@justusschock mind check last version... |
What does this PR do?
Fixes #3097
Fixes #2736
num_classes
parameter through from iou metric class down to its underlying functional iou call.Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃