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]: add semantic FPN for panoptic segmentation #4969

Closed
wants to merge 4 commits into from

Conversation

ZwwWayne
Copy link
Collaborator

This PR continues on PR #953.

It refactors the semantic head and adds semantic FPN for panoptic segmentation. The semantic FPN is used as a decoder in the semantic segmentation head. The FusedSemanticHead for HTC is refactored and inherits from the new SemanticHead. Thus, it can also be used for panoptic segmentation while providing semantic features in HTC and SCNet.

The BC-breaking of names of convolutional layers in the semantic head is handled by _load_from_state_dict. Therefore, the old models can still be successfully loaded for inference and the new models will have different key names in the semantic heads.

@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #4969 (f1835e2) into master (5795367) will decrease coverage by 0.06%.
The diff coverage is 73.17%.

❗ Current head f1835e2 differs from pull request most recent head 16cb22a. Consider uploading reports for the commit 16cb22a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4969      +/-   ##
==========================================
- Coverage   65.55%   65.49%   -0.07%     
==========================================
  Files         257      259       +2     
  Lines       20066    20219     +153     
  Branches     3413     3444      +31     
==========================================
+ Hits        13155    13243      +88     
- Misses       6208     6262      +54     
- Partials      703      714      +11     
Flag Coverage Δ
unittests 65.49% <73.17%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
mmdet/datasets/api_wrappers/coco_api.py 83.33% <0.00%> (-4.17%) ⬇️
mmdet/datasets/lvis.py 14.86% <0.00%> (-0.31%) ⬇️
...models/roi_heads/mask_heads/fused_semantic_head.py 55.88% <46.42%> (-44.12%) ⬇️
mmdet/models/roi_heads/mask_heads/semantic_head.py 60.78% <60.78%> (ø)
mmdet/models/necks/fpn_mapper.py 87.61% <87.61%> (ø)
mmdet/datasets/utils.py 100.00% <100.00%> (ø)
mmdet/models/losses/cross_entropy_loss.py 100.00% <100.00%> (ø)
mmdet/models/necks/__init__.py 100.00% <100.00%> (ø)
mmdet/models/roi_heads/mask_heads/__init__.py 100.00% <100.00%> (ø)
...models/roi_heads/mask_heads/scnet_semantic_head.py 92.30% <100.00%> (+0.64%) ⬆️
... and 5 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 a616886...16cb22a. Read the comment docs.

@liming-ai
Copy link

Hi, @ZwwWayne

How is this PR going?

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.

3 participants