cszn / BSRGAN

Designing a Practical Degradation Model for Deep Blind Image Super-Resolution (ICCV, 2021) (PyTorch) - We released the training code!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about Gaussain Noise

ShijianXu opened this issue · comments

Hi, thank you for your work.
I have a question about the degradation. For the Gaussian noise, in the general case, why you only set L=noise_level2/255.0 (https://github.com/cszn/BSRGAN/blob/main/utils/utils_blindsr.py#L371) instead of generating a random value between noise_level1 and noise_level2, like for the grayscale and color Gaussian noises?

Thanks!

I have the same question.

commented

I think the randomness of noise level is generated by following code:
D = np.diag(np.random.rand(3))
U = orth(np.random.rand(3,3))
conv = np.dot(np.dot(np.transpose(U), D), U)

D and U are randomly sampled from 0~1.

This is for randomness, not for the noise level. The degradation level is controlled by L: img += np.random.multivariate_normal([0,0,0], np.abs(L**2*conv), img.shape[:2]).astype(np.float32)
This line simply means they only use the highest degradation level. This needs to be explained.

The noise level of 3D multivariate Gaussian noise is determined by six parameters, see Figure 1. This means we should not characterize the noise level of 3D Gaussian noise by a single scalar. For example, the covariance matrix of [1.21, 0, 0; 0, 0, 0; 0, 0, 0] means only the Red channel is added with the Gaussian noise with noise level 1.1, we cannot say the noise level of this RGB image is 1.1 or others. Due to limited space, I use a rough expression. noise_level1 is a small value, even if you set it to 0, and also even if you remove this multivariate Gaussian noise, the performance would not change too much.

We claimed in the paper that
"One can conveniently modify the degradation model by changing the degradation parameter settings and adding more reasonable degradation types (e.g., speckle noise and unaligned double JPEG compression [21]) to improve the practicability for certain applications"
It is not necessary to strictly follow my degradation design.
We mainly sell the idea of "random shuffle+double degradation+different degradation types" for more realistic degradation design.