SCUNet
SCUNet copied to clipboard
Data range is clipped for 8 bit images with noise?
Hi
I am using 8-bit greyscale as input, and note the usual /255
operations to put data in the range 0-1
. However the operation
if args.need_degradation: # degradation process
np.random.seed(seed=0) # for reproducibility
img_L += np.random.normal(0, args.noise_level_img/255., img_L.shape)
can result in values outside this range, as shown in the image below:
I note that the values are later clipped by util.single2uint
so what is saved is not precisely what is processed. Furthermore I wonder the effect on inferencing - presumably values are also clipped to 0-1 range?
I noted also if I add significant noise (say noise_level_img = 100
) then the output image has a very distorted histogram:

It is a common setting for Gaussian denoising, please refer to https://webpages.tuni.fi/foi/GCF-BM3D/ If you retrain the model with clipping setting, the PSNR results would not change. https://github.com/cszn/FFDNet/blob/master/Demo_AWGN_Gray_Clip.m