Tencent / Real-SR

Real-World Super-Resolution via Kernel Estimation and Noise Injection
Apache License 2.0
788 stars 118 forks source link

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

Open yanghedada opened 4 years ago

yanghedada commented 4 years ago

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! ! !

jolt2017 commented 4 years ago

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

zhangyunming commented 3 years ago

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

JingzheLyp commented 3 years ago

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

yanghedada commented 3 years ago

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

lxy5513 commented 3 years ago

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

@JingzheLyp me too, have you solve the problem?

shengbokang commented 3 years ago

@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.

ira7bar commented 3 years ago

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 2 years ago

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

Lcjgh commented 2 years ago

@yanghedada @ira7bar