layumi / 2016_super_resolution

ICCV2015 Image Super-Resolution Using Deep Convolutional Networks
MIT License
85 stars 43 forks source link

I have one more question about stride. #12

Open star4s opened 7 years ago

star4s commented 7 years ago

I have one more question about stride. When I read the reference paper, "Image Super-Resolution Using Deep Convolutional Networks" on 6 page, it mentioned about 24,800 sub-images, which are extracted from original images with a stride of 14 and 33. In you program, what do you use a stride? When I see your code in "SRnet.m", you used like conv2_1Block = dagnn.Conv('size',[9 9 1 64],'hasBias',true,'stride',[1,1],'pad',[0,0,0,0]);. I think you use 'stride',[1,1]. I would like to use a stride of 14. Did you use the stride of 14? I am so sorry every time, I am bother you. Thank you very much for your attention.

layumi commented 7 years ago

It is unreasonable to use a too large stride step like 14. It means every time you sample a pixel then you need to skip 14 pixel to sample the next pixel. If the size of input is 28x28 and the stride is 14, the size of output is 2x2. In super-resolution problem, we do not want to lose the information from the original image so we use the stride 1 to do dense sampling.

You can find more detail information about CNN in http://cs231n.github.io/convolutional-networks/ If you are not clear with the code in the convolution layer, you may refer to http://www.vlfeat.org/matconvnet/mfiles/vl_nnconv/.

layumi commented 7 years ago

Or do you mean padding 14?? You can do it by change the pad setting like [7,7,7,7]. It will pad 14 pixels in width and height.

star4s commented 7 years ago

I got it! Thank you for your help! I confused about stride. stride will make more approximation.