yinboc / liif

Learning Continuous Image Representation with Local Implicit Image Function, in CVPR 2021 (Oral)
https://yinboc.github.io/liif/
BSD 3-Clause "New" or "Revised" License
1.27k stars 145 forks source link

Why div2k and benchmarks have different calc_psnr? #50

Closed xiximelon closed 1 year ago

xiximelon commented 1 year ago
 if dataset == 'benchmark': 
      shave = scale  
      if diff.size(1) > 1:  
          gray_coeffs = [65.738, 129.057, 25.064]  
          convert = diff.new_tensor(gray_coeffs).view(1, 3, 1, 1) / 256  
          diff = diff.mul(convert).sum(dim=1)  
     elif dataset == 'div2k':  
          shave = scale + 6

In benchmark situation, shave =scale, and in div2k situation, shave=scale+6 My question is

  1. Why these 2 situation need shave ?
  2. Why shave size is related to scale?
  3. Why div2k shave =scale+6 Look forward to your favourable reply! Thanks in advance!
xiximelon commented 1 year ago

i found this operation follows EDSR