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

有关hrnet的问题 #9

Closed
wanghao15536870732 opened this issue Aug 25, 2021 · 2 comments
Closed

有关hrnet的问题 #9

wanghao15536870732 opened this issue Aug 25, 2021 · 2 comments

Comments

@wanghao15536870732
Copy link

wanghao15536870732 commented Aug 25, 2021

你好,非常感谢开源的代码!
但是在运行代码的时候有些问题,当hrnet作为主干网络提取特征时,backbone的channels列表中只加入了stage4的通道总和。

self.stage4_cfg = extra['STAGE4']
num_channels = self.stage4_cfg['NUM_CHANNELS']
block = blocks_dict[self.stage4_cfg['BLOCK']]
num_channels = [num_channels[i] * block.expansion for i in range(len(num_channels))]
self.transition3 = self._make_transition_layer(pre_stage_channels, num_channels)
self.stage4, pre_stage_channels = self._make_stage(self.stage4_cfg, num_channels, multi_scale_output=True)

last_inp_channels = np.int(np.sum(pre_stage_channels))
self.channels = [last_inp_channels]

在获取低层和高层特征的通道时,会出现越界的情况。

 low_level_channels = self.backbone.channels[1]
 high_level_channels = self.backbone.channels[-1]

应该将henet每一阶段的pre_stage_channels加入到channels中,但是这种方式感觉不太对,还是说我的运行方式有问题?

@LiheYoung
Copy link
Owner

你好,

此处实现的HRNet只能支持FCN、PSPNet这种无需融合低层特征的分割网络,不适用于DeepLabv3+和U-Net。

如果需要使用DeepLabv3+或U-Net,可以使用ResNet系列的骨干网络。

@wanghao15536870732
Copy link
Author

我好像懂了,非常感谢。

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