isht7 / pytorch-deeplab-resnet

DeepLab resnet v2 model in pytorch
MIT License
602 stars 118 forks source link

The size of the prediction #40

Closed wmmxk closed 6 years ago

wmmxk commented 6 years ago

Thanks for sharing your code.

I am not sure it is an issue. I did a sanity check on the deeplab model: input = Variable(torch.randn(1, 3, 512, 512)).cuda() print(model(input).size())

The prediction is of such a size: torch.Size([1,21, 65, 65]. So how is a dense prediction of the same size of the input is generated? I understand atrous convolution can capture features on different scales, but atrous convolution does not do upsampling, am I right?

isht7 commented 6 years ago

Using Bilinear interpolation. See here.

wmmxk commented 6 years ago

Thanks for your reply.

As far as know, the Bilinear interpolation does not have learnable parameters. So I can resize the prediction to whatever size I want after the model generates predictions. So does the size of the prediction affect the performance of the model?