Dootmaan / DSRL

Implementation of CVPR 2020 Dual Super-Resolution Learning for Semantic Segmentation
MIT License
96 stars 17 forks source link

关于上采样 #18

Open kaigelee opened 1 year ago

kaigelee commented 1 year ago

您好,非常感谢您的分享,我想请问您, x_seg_up = F.interpolate(x_seg, size=input.size()[2:], mode='bilinear', align_corners=True) x_seg_up = F.interpolate(x_seg_up,size=[2*i for i in input.size()[2:]], mode='bilinear', align_corners=True) 这里为什么要上采样两次,而不是直接一次上采样到原始大小呢?

Dootmaan commented 1 year ago

Hi @kaigelee thank you for your question. The code is written in this way to correspond to the description of DSRL paper that they added a simple 2x upsampling layer at the end of the network. The first line of upsampling operation is in the original code of Deeplab v3+ and I just leave it as it was. Of course you can directly replace these two lines with a simple 4x upsampling and it makes no difference.