alterzero / DBPN-Pytorch

The project is an official implement of our CVPR2018 paper "Deep Back-Projection Networks for Super-Resolution" (Winner of NTIRE2018 and PIRM2018)
https://alterzero.github.io/projects/DBPN.html
MIT License
565 stars 164 forks source link

set14——test #18

Closed qingchuanhuajuan closed 5 years ago

qingchuanhuajuan commented 6 years ago

There is a picture (bridge) in set 14 that is single-channel, but the trained model requires that the input picture be three-channel. How did you solve this problem in the experiment?

Zheng222 commented 5 years ago

@qingchuanhuajuan you can simply duplicate the data to another two channels.

qingchuanhuajuan commented 5 years ago

Thank you! When I tested the X4 model, the image size in set14 was not a multiple of 4. I used the imresize() function in matlab to adjust the test image to an integer multiple of 4. How do you solve this problem?

Zheng222 commented 5 years ago

@qingchuanhuajuan According to conventional practice, you should crop the right and bottom parts of image.

def modcrop(im, module):
      sz = im.shape
      h = np.int32(sz[0]/module) * module
      w = np.int32(sz[1]/module)* module
      ims = im[0:h, 0:w, ...]
      return ims