-
Notifications
You must be signed in to change notification settings - Fork 402
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
Fixed bug in computing map metric for images with either no ground tr… #884
Conversation
…uth or no prediction
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #884 +/- ##
=====================================
- Coverage 95% 95% -0%
=====================================
Files 171 171
Lines 7149 7181 +32
=====================================
+ Hits 6801 6818 +17
- Misses 348 363 +15 |
Hello guys, just wanted to check if you're expecting some changes from my side? Maybe I'm missing something? I read the guidelines but I'm not used to making contributions. Please let me know how should we proceed. |
@SkafteNicki or @twsl mind have look... 🐰 ^^ |
The change seems fine to me, but tests are missing. Mind adding them for validation, @mtailanian ? |
Hi @twsl, I just added some unit tests, and also fixed a bug that I encountered thanks to them :) |
Hi @mtailanian could you please move your unit tests to this file: https://github.com/PyTorchLightning/metrics/blob/master/tests/detection/test_map.py |
Hi @SkafteNicki, I'm not sure I did what was expected, but I just added my unit tests to the specified file. Some of them were actually duplicated, so I just omitted them. Thanks, |
#884) * Fixed bug in computing map metric for images with either no ground truth or no prediction * fixed bug. added unit tests * simple * - main * Tensor * moved unit tests * Delete test_map.py * changelog Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com> (cherry picked from commit 7240bc9)
…uth or no prediction
What does this PR do?
Fixes #794
When either the prediction or the ground truth is empty, the image was not taken into account for the metric computation.
This PR fixes that, by returning proper values
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 🙃