-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 bug about label_map #1445
fix bug about label_map #1445
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.
Many thanks for your contribution. There is indeed such a problem that you described.
Codecov Report
@@ Coverage Diff @@
## master #1445 +/- ##
==========================================
- Coverage 90.34% 90.31% -0.04%
==========================================
Files 139 139
Lines 8300 8304 +4
Branches 1393 1395 +2
==========================================
+ Hits 7499 7500 +1
- Misses 564 567 +3
Partials 237 237
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
might fix lint problem |
There is the same bug in core/evaluation/metrics.py when calculating IoU. |
* fix bug about label_map * Update mmseg/datasets/pipelines/loading.py Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> * lint Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: MeowZheng <meowzheng@outlook.com>
* fix bug about label_map * Update mmseg/datasets/pipelines/loading.py Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> * lint Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: MeowZheng <meowzheng@outlook.com>
Motivation
When I use label_map to change train_label, I found that when the label map is complex, the current code is likely to repeatedly replace gt_semantic_seg.
For example, when my label_map is dict{6:9, 9:7}, the intention is to replace 6 with 9 and 9 with 7, but the result does replace 6 with 7.
Modification
Record the initial gt_semantic_seg with a copy!