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

Question about auxiliary_head #1410

Closed
ChenJiangxi opened this issue Mar 23, 2022 · 6 comments
Closed

Question about auxiliary_head #1410

ChenJiangxi opened this issue Mar 23, 2022 · 6 comments
Assignees

Comments

@ChenJiangxi
Copy link

Thank you for your wonderful framework!
I have a question about the auxiliary decoder. For a auxiliary FCNdecoder to HRNet-w48, if I set in_index = [0,1,2], and in_channels=[48,96,192], does that mean the FCNdecoder get the output from stage3 of HRNet-w48?

Thanks in advance!

@MengzhangLI
Copy link
Contributor

What is current config file, could you give me a link?

@MengzhangLI MengzhangLI self-assigned this Mar 23, 2022
@ChenJiangxi
Copy link
Author

@ChenJiangxi
Copy link
Author

And I have some problems on other issue #1040
I'm confused about this answer. The config file for FCN decoder and HRNet is:
in_channels = [48, 96, 192, 384]
so I think the decode_head could only support four feature maps as input. Am I right?

@MengzhangLI
Copy link
Contributor

No, you can set

in_channels=[18, 36, 72],
in_index=(0, 1, 2),
channels=sum([18, 36, 72]),

And theorically it could work (but it means you need to train new model on your own and I think it is necessary).

the function of it is concating all feature maps (after resizing to similar height and width) from backbone (HRNet-w48 in this case) in here:

https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/models/decode_heads/decode_head.py#L173

whose channels = #Chennel_featuremap1 + #Chennel_featuremap2 + #Chennel_featuremap3 + #Chennel_featuremap4.

See here channels=sum([18, 36, 72, 144]),.

@ChenJiangxi
Copy link
Author

ChenJiangxi commented Mar 23, 2022

I think my set is correct accordingly, which is suitable for HRNet-w48. And yours is suitable for HRNet-w18
in_channels=[48,96,192], in_index=(0, 1, 2), channels=sum([48,96,192]),
oh god! it's embarrassing, I fogot that in_index means Input feature index. so the decoder head just get the feature map from stage4 of hrnet.
Thank you for your late night reply! Sorry to bother you.

@MengzhangLI
Copy link
Contributor

MengzhangLI commented Mar 23, 2022

I totally do not suggest you modify the number of feature maps for input of decoder/auxiliary heads.

As for deeplabv3_r50-d8, its decoder in_index=3 and auxiliary in_index=2, which is index of feature maps of backbone (i.e., its backbone has output [OUTPUT0, OUTPUT1, OUTPUT2, OUTPUT3], OUTPUT2 is input of auxiliary head and OUTPUT3 is input of decoder head).

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

No branches or pull requests

2 participants