Real-SR icon indicating copy to clipboard operation
Real-SR copied to clipboard

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

Open yanghedada opened this issue 4 years ago • 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! ! !

yanghedada avatar Oct 24 '20 07:10 yanghedada

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

jolt2017 avatar Nov 30 '20 07:11 jolt2017

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

zhangyunming avatar Jan 07 '21 08:01 zhangyunming

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

JingzheLyp avatar Jan 07 '21 10:01 JingzheLyp

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

yanghedada avatar Jan 09 '21 06:01 yanghedada

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

@JingzheLyp me too, have you solve the problem?

lxy5513 avatar Jan 21 '21 08:01 lxy5513

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

shengbokang avatar Feb 01 '21 09:02 shengbokang

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.

ira7bar avatar May 05 '21 15:05 ira7bar

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

Lcjgh avatar Oct 27 '22 14:10 Lcjgh

@yanghedada @ira7bar

Lcjgh avatar Oct 27 '22 14:10 Lcjgh