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

Avoid converting label ids twice by label map during evaluation #1417

Merged
merged 3 commits into from
Apr 12, 2022
Merged

Avoid converting label ids twice by label map during evaluation #1417

merged 3 commits into from
Apr 12, 2022

Conversation

panfeng-hover
Copy link
Contributor

seg_map or gt_seg_maps are already converted by the label_map during self.get_gt_seg_map_by_idx or self.get_gt_seg_maps, pass the self.label_map to intersect_and_union or eval_metrics will do the conversion again.

#1415

@CLAassistant
Copy link

CLAassistant commented Mar 25, 2022

CLA assistant check
All committers have signed the CLA.

@MengzhangLI
Copy link
Contributor

Hi, thanks for your contribution. Plesae fix the lint error!

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #1417 (d1ebb3d) into master (98984bf) will decrease coverage by 0.09%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master    #1417      +/-   ##
==========================================
- Coverage   90.39%   90.30%   -0.10%     
==========================================
  Files         133      139       +6     
  Lines        7906     8304     +398     
  Branches     1318     1395      +77     
==========================================
+ Hits         7147     7499     +352     
- Misses        536      567      +31     
- Partials      223      238      +15     
Flag Coverage Δ
unittests 90.30% <75.00%> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
mmseg/datasets/custom.py 94.73% <75.00%> (+0.05%) ⬆️
mmseg/datasets/hrf.py 77.77% <0.00%> (-2.23%) ⬇️
mmseg/datasets/drive.py 77.77% <0.00%> (-2.23%) ⬇️
mmseg/datasets/chase_db1.py 77.77% <0.00%> (-2.23%) ⬇️
mmseg/datasets/pascal_context.py 75.00% <0.00%> (-1.48%) ⬇️
mmseg/core/evaluation/metrics.py 93.61% <0.00%> (-1.07%) ⬇️
mmseg/apis/train.py 20.51% <0.00%> (-0.83%) ⬇️
mmseg/models/backbones/mit.py 86.98% <0.00%> (-0.70%) ⬇️
mmseg/datasets/isaid.py 93.93% <0.00%> (-0.18%) ⬇️
mmseg/core/__init__.py 100.00% <0.00%> (ø)
... and 15 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 01e35aa...d1ebb3d. Read the comment docs.

@panfeng-hover
Copy link
Contributor Author

Failed due to

yapf.....................................................................Failed
- hook id: yapf
- files were modified by this hook
- 

I saw a similar error here, pre-commit/pre-commit#747, but not sure how to fix it

@MengzhangLI
Copy link
Contributor

Failed due to

yapf.....................................................................Failed
- hook id: yapf
- files were modified by this hook
- 

I saw a similar error here, pre-commit/pre-commit#747, but not sure how to fix it

Its ok. Try more times git add . + pre-commit run --all-files. Then it would be modified automatically.

@panfeng-hover
Copy link
Contributor Author

The new commit is added by git add . + pre-commit run --all-files, would u like to re-run the test? @MengzhangLI

panfeng-hover and others added 2 commits April 9, 2022 19:34
Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
@panfeng-hover
Copy link
Contributor Author

Not sure about the codecov/patch and codecov/project fails, need to merge master?

@MeowZheng MeowZheng merged commit 91b1bcb into open-mmlab:master Apr 12, 2022
mob5566 pushed a commit to mob5566/mmsegmentation that referenced this pull request Apr 13, 2022
…-mmlab#1417)

* Avoid converting label ids twice by label map during evaluation

* Update mmseg/datasets/custom.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* lint

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
ZhimingNJ pushed a commit to AetrexTechnology/mmsegmentation that referenced this pull request Jun 29, 2022
…-mmlab#1417)

* Avoid converting label ids twice by label map during evaluation

* Update mmseg/datasets/custom.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* lint

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
@OpenMMLab-Assistant003
Copy link

Hi @panfeng-hover!First of all, we want to express our gratitude for your significant PR in the MMSegmentation project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

If you are Chinese or have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution❤ @panfeng-hover

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.

5 participants