bregaldo / pywph

Wavelet Phase Harmonics in PyTorch for Images
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

denoising results: a way to improve? #8

Open jecampagne opened 4 months ago

jecampagne commented 4 months ago

Dear Bruno, Me again concerning the denoising.py example that I've run asis.

Below I have put the results where I have added the SNR defined as

def snr(x,x_ref):
    return 10*np.log10(np.mean(x_ref**2)/np.mean((x-x_ref)**2))

with for x_ref the "true signal real part" for the first row and the "true signal imaginary part" for the second row, and xis either the noisy signal or the denoised signal.

I was wandering if one can get better denoising performances by some adaptation of the current script? Thanks.

image

bregaldo commented 3 months ago

Hi Jean-Eric,

Yes indeed, this script has not been updated for a while and was originally mostly illustrative. Statistical denoising/component separation methods have been explored from different angles in the past years, and there are certainly several ways you could improve these results (see e.g., Regaldo+2021, Regaldo+2023, Delouis+2022, Auclair+2023), but any adaptation would remain quite specific to your problem/data and your goals.

For example you could play on the representation used for the method (if you stick to WPH statistics, you can for example explore different subsets of coefficients, or tune the L/J/dn parameters). Also, in Regaldo+2021, we found that the normalization of the coefficients played an important role for the regularization of the optimization, and the quality of the power spectrum reconstruction, that's why we chose to divide the optimization in two stages: 1) optimization using S11 coefficients only, and 2) optimization using all coefficients but with a normalization of the coefficients based on the S11 coefficients reconstructed in 1). Finally, you can also explore alternative losses (cf Delouis+2022 or Auclair+2023).

But, I guess the most important question here is first: in what sense do you want to improve these results? (i.e., which metric?) Originally, statistical denoising methods arose from the necessity of recovering non-Gaussian statistical properties of a target signal from noisy observations with a priori complicated noise, and of which we only had access to samples. If your goal is to get the best PSNR for noisy data under Gaussian noise, I would rather orient you to more standard image denoising methods (BM3D, DnCNN, etc). I would recommend looking into Regaldo+2023 (Sect. 2 and 3) to get a sense of the importance of the choice of the representation with respect to the metric one picks.

Hope this helps, Best, Bruno