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 kernel updation for some decoder heads. #1299

Merged
merged 12 commits into from
Feb 27, 2022

Conversation

MengzhangLI
Copy link
Contributor

@MengzhangLI MengzhangLI commented Feb 17, 2022

Motivation

To support K-Net(https://arxiv.org/abs/2106.14855). In several decoder heads, add kernel_update to decide whether (1) feature map before self.cls_seg and (2) learnable semantic kernels becoming output for kernel updation.

Decoder heads needed to be modified

  • ASPPHead
  • PSPHead
  • FCNHead
  • UPerHead

This pr would be merged as soon as possible to proceed the K-Net PR: #1289.

@MengzhangLI MengzhangLI self-assigned this Feb 17, 2022
@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #1299 (5cc452a) into master (9522b4f) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1299      +/-   ##
==========================================
+ Coverage   90.22%   90.26%   +0.03%     
==========================================
  Files         130      131       +1     
  Lines        7560     7611      +51     
  Branches     1258     1264       +6     
==========================================
+ Hits         6821     6870      +49     
  Misses        531      531              
- Partials      208      210       +2     
Flag Coverage Δ
unittests 90.26% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
mmseg/models/decode_heads/aspp_head.py 100.00% <100.00%> (ø)
mmseg/models/decode_heads/fcn_head.py 100.00% <100.00%> (ø)
mmseg/models/decode_heads/psp_head.py 100.00% <100.00%> (ø)
mmseg/models/decode_heads/uper_head.py 100.00% <100.00%> (ø)
mmseg/datasets/__init__.py 100.00% <0.00%> (ø)
mmseg/datasets/coco_stuff.py 87.50% <0.00%> (ø)
mmseg/datasets/dark_zurich.py 83.33% <0.00%> (ø)
mmseg/models/necks/ic_neck.py 100.00% <0.00%> (ø)
mmseg/models/utils/__init__.py 100.00% <0.00%> (ø)
mmseg/datasets/night_driving.py 83.33% <0.00%> (ø)
... and 6 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 9522b4f...5cc452a. Read the comment docs.

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.

minor revise

mmseg/models/decode_heads/aspp_head.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Junjun2016 Junjun2016 left a comment

Choose a reason for hiding this comment

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

How about other decode_heads?

@MengzhangLI
Copy link
Contributor Author

How about other decode_heads?

Keep others current contents while these four decoder heads would add docstrings in self._forward_feature() to remind it would be used for downstream usage.

@MeowZheng MeowZheng merged commit 4912ea2 into open-mmlab:master Feb 27, 2022
@MengzhangLI MengzhangLI deleted the kernel_update_decoderhead branch February 28, 2022 12:31
@MengzhangLI MengzhangLI changed the title [Feature] Support kenerl updation for some decoder heads. [Feature] Support kernel updation for some decoder heads. Mar 4, 2022
ZhimingNJ pushed a commit to AetrexTechnology/mmsegmentation that referenced this pull request Jun 29, 2022
…#1299)

* [Feature] Add kenerl updation for some decoder heads.

* [Feature] Add kenerl updation for some decoder heads.

* directly use forward_feature && modify other 3 decoder heads

* remover kernel_update attr

* delete unnecessary variables in forward function

* delete kernel update function

* delete kernel update function

* delete unnecessary docstrings

* modify comments in self._forward_feature()

* modify docstrings in self._forward_feature()

* fix docstring

* modify uperhead
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* add conversion script for vae

* up

* up

* some fixes

* add text model

* use the correct config

* add docs

* move model in it's own file

* move model in its own file

* pass attenion mask to text encoder

* pass attn mask to uncond inputs

* quality

* fix image2image

* add imag2image in init

* fix import

* fix one more import

* fix import, dummy objetcs

* fix copied from

* up

* finish

Co-authored-by: patil-suraj <surajp815@gmail.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.

4 participants