tyshiwo / DRRN_CVPR17

Code for our CVPR'17 paper "Image Super-Resolution via Deep Recursive Residual Network"
226 stars 82 forks source link

in your test file, what does the 'rf' mean? #9

Closed XiaotianM closed 6 years ago

XiaotianM commented 6 years ago

In your DRRN test file, you have split the patches from input image because of the memory limit. But I am not sure the usage of 'rf'. You defined as follows:

iter_interval = 6536;
startNUM = 101;
endNUM = 101;
thresh = 1;
thresh_hei = 150; % threshold patch size for inference, since too big image may cost too much memory
thresh_wid = 150;
rf = 16;  % I am not sure about the usage of rf

What's more, It seems that your input patches are more larger than output patches? I am not sure.

subim_input = im_y_b(ext_start_x : ext_end_x, ext_start_y : ext_end_y);  % input
data = permute(subim_input,[2, 1, 3]);
model = [model_path '.prototxt'];
subim_output = do_cnn(model,weights,data);
subim_output = subim_output';
subim_output = subim_output(posext_start_x:posext_end_x,posext_start_y:posext_end_y);

can you expalain this for me? Thank you very much.

tyshiwo commented 6 years ago

We use rf here because when the test image is very large, our model cannot directly process it since the memory is limited. Therefore, we have to split the large image to several patches. The rf means the overlap of the two neighbouring patches. We average the pixel values in the 'rf' region for the final reconstructed image so that to avoid the border effects.

XiaotianM commented 6 years ago

Thanks