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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mAP calculation for areas with 0 predictions #1080
Conversation
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.
Can you add a test for this configuration? 馃惏
Codecov Report
@@ Coverage Diff @@
## master #1080 +/- ##
======================================
- Coverage 95% 95% -0%
======================================
Files 181 181
Lines 8103 8103
======================================
- Hits 7672 7660 -12
- Misses 431 443 +12 |
Hi @Borda , I am having issues running the test locally (make test assumes to have I've added what I expect to be a sensible test (0 gt, 0 predictions), but hard to evaluate if it's the right spot or if it impacts some of the numerical test you have already set. Or laternatively make a case like this with flipped gt/pred? |
good point we will add it to our make file... |
Thanks! I assume also in .requirements/text.txt one needs to add tensorflow (because of bert -> huggingface_hub -> keras_mixin -> tf)
Is there a way to run just detection tests? edit: |
The issue was first dicussed here: Lightning-AI#1061 (comment)
* Fix mAP calculation for areas with 0 predictions The issue was first dicussed here: #1061 (comment) * chlog Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com> (cherry picked from commit 84274ab)
Do you folks have any pointers to when the next patch version would be released? |
we can do one next week :) |
Ran into the same issue, for now will build from current master! |
If there is interest in getting people just to improve documentation, I would be willing to help! |
please do 馃惏 |
The issue was first dicussed here: #1061 (comment)
In cases of iou_type
segm
mAP calculation with 0 predictions, the standardbox_area
calculation is needed. This is fixed to use the updatedcompute_area
method.Sidenotes:
gt_label_mask
is with len>0, accessing a python list would fail -> need to castingcompute_area
assumes a list of areas to be computed, thus the need to expand dims in cases a single element is selected from the array.Has been tested to work with
bbox
andsegm
.What does this PR do?
Fixes part of a bug first highlighted as in #1061.
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 馃檭
Would appreciate if this is added to the next patch release! Maybe I was too late for 0.9.1 :(