Tencent/Real-SR

Strategies for noise collection? How are max_var and min_mean set? Is there any principle?

yanghedada opened this issue · 9 comments

Hi

hi, how are max_var and min_mean set in the noise collection method? Do you have any experience and skills? When I collected it myself, I found that most of the noise pictures are white environment pictures. Is it because the sky pictures have more obvious noise? For face data max_var = 20, min_mean = 50 is appropriate?

  if opt.dataset == 'df2k':
        img_dir = PATHS[opt.dataset][opt.artifacts]['source']
        noise_dir = PATHS['datasets']['df2k'] + '/Corrupted_noise'
        sp = 256
        max_var = 20
        min_mean = 0
    else:
        img_dir = PATHS[opt.dataset][opt.artifacts]['hr']['train']
        noise_dir = PATHS['datasets']['dped'] + '/DPEDiphone_noise'
        sp = 256
        max_var = 20
        min_mean = 50

thanks for your sharing! ! !

Have the same troubles. Looking forward the author's answer

+1
i train my face/portrait data ,the noise is to strong ,the relust is not real , seems 美颜一样。
不晓得怎么调这个noise的参数

I cannot collect any noise patchs from face data, have you solved it? @yanghedada

The author's noise is a flat area noise. @JingzheLyp

I cannot collect any noise patchs from face data, have you solved it? @yanghedada

@JingzheLyp me too, have you solve the problem?

@yanghedada I did not find the noise generation code. I think the noise_collect.py just cuts the noise patch but not collects the noise. Could you please tell me where is the noise collection function? Thanks.

I cannot collect any noise patchs from face data, have you solved it? @yanghedada

Depending on your data, I would try to collect noise patches without the condition of minimum patch mean. This enforces only bright flat patches (e.g. empty sky) which may not exist in your data.
Also, notice that the script uses a variance condition, as opposed to standard deviation as explained in the paper.
Moreover, it may be hard to find large empty patches, so you can try to use smaller patch sizes, which are still larger then your input low resolution size.

You can try and play with the different thresholds and see if patches are collected successfully.

It is important to visualize the resulting patches (normalize to [0,255]) and make sure that they contain only noise and not content. Otherwise, the model will learn to erase the injected content.

Lcjgh commented

How to select the threshold for extracting noise from uneven areas?I don't understand the selection trigger condition of this threshold.