Shakarim94 / Net-SURE

Training deep learning based denoisers without ground truth data - Official Tensorflow implementation of the NeurIPS 2018 paper
GNU General Public License v3.0
58 stars 14 forks source link

Get negative SURE value during training photo images #1

Closed jjdbear closed 5 years ago

jjdbear commented 5 years ago

Using your code and change it with data input and model, not fix the SURE function. I found I get the negative SURE value during training. I study the function and found this item" batchx_dimx_dim*self.var" may be a constant value during training with var is given as a constant value, which play little role on convergence and back propagation? Should var be a variable learned from model ?

Shakarim94 commented 5 years ago

There can be many reasons for getting negative SURE values (wrong sigma, non-gaussian noise etc.). Can you send your code here so I can find what is wrong?

Var is not a learned variable of the model. Var is just the variance (sigma^2) of the additive gaussian noise. It is important to know it to approximate the MSE.

If we are dealing with simple models with fixed var, i.e. single nose level for all images, then batchx_dimx_dim*self.var should have no effect when optimizing the SURE cost function as it effectively becomes a constant as you pointed out.

However it is not the case when we have variable noise levels (e.g. sigma=[0,55]) as in CDnCNN-B. Each image in a minibatch will have different noise level sigma and thus batchx_dimx_dim*self.var will no longer be a constant. You can look at the sections 3.2 and 4.5 of our extended paper (https://arxiv.org/pdf/1803.01314.pdf) for the modified SURE cost function for cases like this.

jjdbear commented 5 years ago

Thank you very much for your patient answer. According to your answer and paper, I think I use the wrong sigma, which should not be a constant value, and there is Poisson noise in real photo images, should I use function in section 3.4? Could I email you for some detail questions?

Shakarim94 commented 5 years ago

I would say the real noise in the photos is closer to the mixture of poisson and gaussian noise. There are a lot of papers that try to model the real noise. The equation in the section 3.4 is only for pure Poisson noise.

You can email me for more detailed questions.