e-lab / LinkNet

166 stars 42 forks source link

linknet architecture #5

Open vishnureghu007 opened 7 years ago

vishnureghu007 commented 7 years ago

iam trying to build linknet in caffe. Could you please help me in below qns: 1)Found that there are 5 downsampling and 6 updsampling by 2. if we have different no of up sampling and down sampling(6,5) how can we get the same output shape as input. Referred:https://arxiv.org/pdf/1707.03718.pdf 2)how many iterations you ran to get the proper results. 3)To match the encoder and decoder output shape i used crop layer before Eltwise instead of adding extra row or column. Will it make any difference?

codeAC29 commented 7 years ago
  1. There are 5 downsampling convnets but there is a maxpool layer in the beginning. That is why there is an extra upsampling layer.
  2. I ran ~200 epochs but never more than 300.
  3. Input of each encoder has same resolution as output of corresponding decoder. So you do not need to crop. Or are you talking about padding the convolution layers?

@vishnureghu007 thank you for this and let me know if you need any other help.

vishnureghu007 commented 7 years ago

you have mentioned in BlogSpot that "The first encoder block does not perform strided convolution and every convolution layer is followed by batch-normalization and ReLU as non-linearity" 1)so does it mean that first encoder block doesn't downscales input by 2, if It does then no of up sampling will be equal to no of down sampling. 3)From my understanding of the design of network the spatialfullconvolution (upsampling*2) will result in one row-column less than encoder output so to match you gave the value of 1 in adjs.

nn.SpatialFullConvolution(iFeatures, oFeatures, 3, 3, stride, stride, 1, 1, adjS, adjS) From torch 7 doc: adjW : Extra width to add to the output image. Default is 0 . Cannot be greater than dW-1. adjH : Extra height to add to the output image. Default is 0 . Cannot be greater than dH-1 In caffe I didn't find such a facility, so i used crop layer. Please validate my changes to the network.

codeAC29 commented 7 years ago

1) there is no downsampling done in first encoder block and therefore no upsampling done in its corresponding decoder block. 2) You are right and if there is no way to adjust the output in caffee then you can try cropping.

vishnureghu007 commented 7 years ago

thanks a lot. :)

vishnureghu007 commented 7 years ago

loss not converging after 50-100 epochs. capture have doubt in my encoder block. Could you please check this.

codeAC29 commented 7 years ago

Encoder block looks ok to me. What about the learning rate and optimizer?

sunpeng1996 commented 6 years ago

Can you provide the linkNet prototxt for training? Thanks a lot.@vishnureghu007