-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
FilterAnnotations bug fix #8136
Conversation
Bump version to v2.25.0
since we changed the filtering type from mask to indexes, we can no longer use ```keep.any()``` to check, because it does not work at index zero. But we can use ``` if keep.size == 0: if self.keep_empty: return None ```
Codecov Report
@@ Coverage Diff @@
## dev #8136 +/- ##
==========================================
- Coverage 64.69% 64.16% -0.54%
==========================================
Files 351 361 +10
Lines 28463 29526 +1063
Branches 4807 5019 +212
==========================================
+ Hits 18414 18945 +531
- Misses 9057 9576 +519
- Partials 992 1005 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
It's better to add a unit test for filtering PolygonMasks. |
I've added testing that only works with the new filtering. |
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
not everything is as simple as we would like =) |
* Bug fix: open-mmlab#8131 * The better solution from chhluo * open-mmlab#8136 since we changed the filtering type from mask to indexes, we can no longer use ```keep.any()``` to check, because it does not work at index zero. But we can use ``` if keep.size == 0: if self.keep_empty: return None ``` * add a unit test for filtering PolygonMasks * W293 blank line contains whitespace Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com> Co-authored-by: m.stepanov <m.stepanov@redmadrobot.com>
* Bug fix: open-mmlab#8131 * The better solution from chhluo * open-mmlab#8136 since we changed the filtering type from mask to indexes, we can no longer use ```keep.any()``` to check, because it does not work at index zero. But we can use ``` if keep.size == 0: if self.keep_empty: return None ``` * add a unit test for filtering PolygonMasks * W293 blank line contains whitespace Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com> Co-authored-by: m.stepanov <m.stepanov@redmadrobot.com>
Fix #8131
FilterAnnotation bug fix for #8131