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

[Feature] Support Mask2former in MMSeg 1.x #2255

Merged
merged 16 commits into from
Dec 5, 2022

Conversation

xiexinch
Copy link
Collaborator

@xiexinch xiexinch commented Nov 2, 2022

Motivation

Support Mask2former.

Ref:

  1. Official repo
  2. MMDetection

Modification

  1. add mask2former head
  2. configs

Current results:

dataset backbone mIoU
Cityscapes R50 80.44
Cityscapes R101 80.80
Cityscapes swin-t 81.71
Cityscapes swin-s 82.57
Cityscapes swin-b (in22k) 83.52
Cityscapes swin-l (in22k) 83.65
ADE20K R50 47.87
ADE20K R101 48.60
ADE20K swin-t 48.66
ADE20K swin-s 51.24
ADE20K swin-b 52.44
ADE20K swin-b (in22k) 53.90
ADE20K swin-l (in22k) 56.01

@MeowZheng MeowZheng added the 1.x Related issue of 1.x version label Nov 8, 2022
Copy link
Collaborator

@MeowZheng MeowZheng left a comment

Choose a reason for hiding this comment

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

please add readme metafile and ut

@MeowZheng
Copy link
Collaborator

update requirements/optional and add mmdet in it

@MeowZheng MeowZheng added this to the 1.0.0rc2 milestone Nov 11, 2022
@xiexinch xiexinch changed the title [WIP][Feature] Support Mask2former in MMSeg 1.x [Feature] Support Mask2former in MMSeg 1.x Dec 1, 2022
@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

Base: 83.26% // Head: 83.33% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (bfc4636) compared to base (933e4d3).
Patch coverage: 89.83% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2255      +/-   ##
===========================================
+ Coverage    83.26%   83.33%   +0.07%     
===========================================
  Files          142      143       +1     
  Lines         8068     8127      +59     
  Branches      1205     1211       +6     
===========================================
+ Hits          6718     6773      +55     
- Misses        1163     1165       +2     
- Partials       187      189       +2     
Flag Coverage Δ
unittests 83.33% <89.83%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
mmseg/models/decode_heads/mask2former_head.py 89.65% <89.65%> (ø)
mmseg/models/decode_heads/__init__.py 100.00% <100.00%> (ø)
mmseg/models/backbones/timm_backbone.py 45.83% <0.00%> (+8.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines 99 to 100
sem_seg_mask = torch.einsum('bqc, bqhw->bchw', cls_score, mask_pred)
return sem_seg_mask
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sem_seg_mask = torch.einsum('bqc, bqhw->bchw', cls_score, mask_pred)
return sem_seg_mask
seg_logits = torch.einsum('bqc, bqhw->bchw', cls_score, mask_pred)
return seg_logits

@MeowZheng MeowZheng merged commit 163277b into open-mmlab:dev-1.x Dec 5, 2022
MeowZheng pushed a commit to MeowZheng/mmsegmentation that referenced this pull request Dec 30, 2022
* init commits

* fix crop size

* add seg_data2instance_data method

* add ut and update requirement

* update configs and readme

* add model-indel

* update optional requirements

* fix results

* fix lint error

* update results

* update results

* remove mmdet from requirements/optional.txt

* use try import and update README

* add docstring to overwrtied method

* minor change

Co-authored-by: MengzhangLI <[email protected]>
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
* init commits

* fix crop size

* add seg_data2instance_data method

* add ut and update requirement

* update configs and readme

* add model-indel

* update optional requirements

* fix results

* fix lint error

* update results

* update results

* remove mmdet from requirements/optional.txt

* use try import and update README

* add docstring to overwrtied method

* minor change

Co-authored-by: MengzhangLI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Related issue of 1.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants