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

FilterAnnotations bug fix #8136

Merged
merged 6 commits into from
Jun 14, 2022
Merged

FilterAnnotations bug fix #8136

merged 6 commits into from
Jun 14, 2022

Conversation

MiXaiLL76
Copy link

@MiXaiLL76 MiXaiLL76 commented Jun 5, 2022

Fix #8131
FilterAnnotation bug fix for #8131

@CLAassistant
Copy link

CLAassistant commented Jun 5, 2022

CLA assistant check
All committers have signed the CLA.

@chhluo chhluo changed the base branch from master to dev June 5, 2022 17:30
@chhluo chhluo self-requested a review June 5, 2022 17:49
mmdet/datasets/pipelines/loading.py Outdated Show resolved Hide resolved
mmdet/datasets/pipelines/loading.py Show resolved Hide resolved
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
Copy link

codecov bot commented Jun 6, 2022

Codecov Report

Merging #8136 (9600433) into dev (240d7a3) will decrease coverage by 0.53%.
The diff coverage is n/a.

@@            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     
Flag Coverage Δ
unittests 64.14% <ø> (-0.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdet/apis/train.py 13.68% <ø> (ø)
mmdet/core/__init__.py 100.00% <ø> (ø)
mmdet/core/bbox/assigners/atss_assigner.py 92.04% <ø> (-1.47%) ⬇️
mmdet/core/evaluation/eval_hooks.py 82.71% <ø> (+0.89%) ⬆️
mmdet/core/evaluation/mean_ap.py 70.08% <ø> (-1.11%) ⬇️
mmdet/core/hook/__init__.py 100.00% <ø> (ø)
mmdet/core/hook/memory_profiler_hook.py 95.65% <ø> (ø)
mmdet/core/hook/wandblogger_hook.py 15.04% <ø> (ø)
mmdet/core/optimizers/__init__.py 100.00% <ø> (ø)
mmdet/core/optimizers/builder.py 33.33% <ø> (ø)
... and 56 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 240d7a3...9600433. Read the comment docs.

@ZwwWayne ZwwWayne requested a review from Czm369 June 8, 2022 04:06
@Czm369
Copy link
Collaborator

Czm369 commented Jun 8, 2022

It's better to add a unit test for filtering PolygonMasks.

@MiXaiLL76
Copy link
Author

I've added testing that only works with the new filtering.

Copy link
Collaborator

@Czm369 Czm369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Czm369 Czm369 requested a review from chhluo June 10, 2022 08:50
@chhluo
Copy link
Collaborator

chhluo commented Jun 10, 2022

please fix the following problems
image

@MiXaiLL76
Copy link
Author

not everything is as simple as we would like =)
I'll fix this in a bit, can I run these checks locally?

@Czm369 Czm369 requested a review from ZwwWayne June 11, 2022 07:11
@ZwwWayne ZwwWayne merged commit 2b05497 into open-mmlab:dev Jun 14, 2022
ZwwWayne added a commit to ZwwWayne/mmdetection that referenced this pull request Jul 28, 2022
* 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>
SakiRinn pushed a commit to SakiRinn/mmdetection-locount that referenced this pull request Mar 17, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FilterAnnotations does not work properly with PolygonMasks
5 participants