KernelGAN icon indicating copy to clipboard operation
KernelGAN copied to clipboard

the settings for 2x downsampling

Open jiandandan001 opened this issue 5 years ago • 6 comments

Hi. Thank you for sharing the code. Could you tell me how to set the following parametres when generating 2x downsampled lr testing images, so make the gererated images are consistent with the dataset you used? Thanks

scale_factor = np.array([4, 4]) # choose scale-factor avg_sf = np.mean(scale_factor) # this is calculated so that min_var and max_var will be more intutitive min_var = 0.175 * avg_sf # variance of the gaussian kernel will be sampled between min_var and max_var max_var = 2.5 * avg_sf k_size = np.array([21, 21]) # size of the kernel, should have room for the gaussian noise_level = 0.4 # this option allows deviation from just a gaussian, by adding multiplicative noise noise

jiandandan001 avatar Aug 03 '20 13:08 jiandandan001

also the parameters for 4x downsampling

jiandandan001 avatar Aug 03 '20 13:08 jiandandan001

The dataset was generated with some randomness. You can either take what we generated or generate them yourself but it will not be identical.

sefibk avatar Aug 06 '20 07:08 sefibk

The dataset was generated with some randomness. You can either take what we generated or generate them yourself but it will not be identical.

Thanks. Could you tell me the values of the following parameters you used to generate 2x/4x testing images?

scale_factor = np.array([4, 4]) # choose scale-factor avg_sf = np.mean(scale_factor) # this is calculated so that min_var and max_var will be more intutitive min_var = 0.175 * avg_sf # variance of the gaussian kernel will be sampled between min_var and max_var max_var = 2.5 * avg_sf k_size = np.array([21, 21]) # size of the kernel, should have room for the gaussian noise_level = 0.4 # this option allows deviation from just a gaussian, by adding multiplicative noise noise

jiandandan001 avatar Aug 06 '20 07:08 jiandandan001

See section 5.2 in the paper. It includes all details, parameters and links

sefibk avatar Aug 06 '20 07:08 sefibk

Section 5.2 doesn't specify the scale factors. Did you use the same settings (e.g. kernel width, rotation and noise) for both scale factor 2 and 4?

JingyunLiang avatar Sep 29 '20 08:09 JingyunLiang

Yes we generated x2 kernels with those parameters and downscaled the image twice or generated a x4 kernel analytically and downscaled once by 4 (2 identical possible ways)

sefibk avatar Sep 29 '20 17:09 sefibk