diff --git a/datasets/dnd/dnd_rgb/noisy/0001_1.png b/datasets/dnd/dnd_rgb/noisy/0001_1.png new file mode 100644 index 0000000..6e0d3b8 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_1.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_10.png b/datasets/dnd/dnd_rgb/noisy/0001_10.png new file mode 100644 index 0000000..5467ca5 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_10.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_11.png b/datasets/dnd/dnd_rgb/noisy/0001_11.png new file mode 100644 index 0000000..04b89ac Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_11.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_12.png b/datasets/dnd/dnd_rgb/noisy/0001_12.png new file mode 100644 index 0000000..5e6f4d3 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_12.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_13.png b/datasets/dnd/dnd_rgb/noisy/0001_13.png new file mode 100644 index 0000000..2d9fb8a Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_13.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_14.png b/datasets/dnd/dnd_rgb/noisy/0001_14.png new file mode 100644 index 0000000..79e6814 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_14.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_15.png b/datasets/dnd/dnd_rgb/noisy/0001_15.png new file mode 100644 index 0000000..6cefe81 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_15.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_16.png b/datasets/dnd/dnd_rgb/noisy/0001_16.png new file mode 100644 index 0000000..bbb56fb Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_16.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_17.png b/datasets/dnd/dnd_rgb/noisy/0001_17.png new file mode 100644 index 0000000..f8c840a Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_17.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_18.png b/datasets/dnd/dnd_rgb/noisy/0001_18.png new file mode 100644 index 0000000..014712c Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_18.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_19.png b/datasets/dnd/dnd_rgb/noisy/0001_19.png new file mode 100644 index 0000000..1a6621d Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_19.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_2.png b/datasets/dnd/dnd_rgb/noisy/0001_2.png new file mode 100644 index 0000000..a4b0d3f Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_2.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_20.png b/datasets/dnd/dnd_rgb/noisy/0001_20.png new file mode 100644 index 0000000..00e480e Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_20.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_3.png b/datasets/dnd/dnd_rgb/noisy/0001_3.png new file mode 100644 index 0000000..2de8ceb Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_3.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_4.png b/datasets/dnd/dnd_rgb/noisy/0001_4.png new file mode 100644 index 0000000..686adb8 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_4.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_5.png b/datasets/dnd/dnd_rgb/noisy/0001_5.png new file mode 100644 index 0000000..38149be Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_5.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_6.png b/datasets/dnd/dnd_rgb/noisy/0001_6.png new file mode 100644 index 0000000..878eeb4 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_6.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_7.png b/datasets/dnd/dnd_rgb/noisy/0001_7.png new file mode 100644 index 0000000..02ec957 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_7.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_8.png b/datasets/dnd/dnd_rgb/noisy/0001_8.png new file mode 100644 index 0000000..9de1f51 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_8.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0001_9.png b/datasets/dnd/dnd_rgb/noisy/0001_9.png new file mode 100644 index 0000000..b95f7d0 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0001_9.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_1.png b/datasets/dnd/dnd_rgb/noisy/0002_1.png new file mode 100644 index 0000000..f26916e Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_1.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_10.png b/datasets/dnd/dnd_rgb/noisy/0002_10.png new file mode 100644 index 0000000..f0e4cb0 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_10.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_11.png b/datasets/dnd/dnd_rgb/noisy/0002_11.png new file mode 100644 index 0000000..3b771c0 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_11.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_12.png b/datasets/dnd/dnd_rgb/noisy/0002_12.png new file mode 100644 index 0000000..52f1048 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_12.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_13.png b/datasets/dnd/dnd_rgb/noisy/0002_13.png new file mode 100644 index 0000000..f6572c0 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_13.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_14.png b/datasets/dnd/dnd_rgb/noisy/0002_14.png new file mode 100644 index 0000000..01abfa1 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_14.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_15.png b/datasets/dnd/dnd_rgb/noisy/0002_15.png new file mode 100644 index 0000000..590853b Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_15.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_16.png b/datasets/dnd/dnd_rgb/noisy/0002_16.png new file mode 100644 index 0000000..31f5ffb Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_16.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_17.png b/datasets/dnd/dnd_rgb/noisy/0002_17.png new file mode 100644 index 0000000..d7720aa Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_17.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_18.png b/datasets/dnd/dnd_rgb/noisy/0002_18.png new file mode 100644 index 0000000..ff0193e Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_18.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_19.png b/datasets/dnd/dnd_rgb/noisy/0002_19.png new file mode 100644 index 0000000..013e269 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_19.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_2.png b/datasets/dnd/dnd_rgb/noisy/0002_2.png new file mode 100644 index 0000000..9503c25 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_2.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_20.png b/datasets/dnd/dnd_rgb/noisy/0002_20.png new file mode 100644 index 0000000..e95efda Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_20.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_3.png b/datasets/dnd/dnd_rgb/noisy/0002_3.png new file mode 100644 index 0000000..5c4c1f7 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_3.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_4.png b/datasets/dnd/dnd_rgb/noisy/0002_4.png new file mode 100644 index 0000000..19719bd Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_4.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_5.png b/datasets/dnd/dnd_rgb/noisy/0002_5.png new file mode 100644 index 0000000..60f4cc3 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_5.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_6.png b/datasets/dnd/dnd_rgb/noisy/0002_6.png new file mode 100644 index 0000000..56e6604 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_6.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_7.png b/datasets/dnd/dnd_rgb/noisy/0002_7.png new file mode 100644 index 0000000..70cd79d Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_7.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_8.png b/datasets/dnd/dnd_rgb/noisy/0002_8.png new file mode 100644 index 0000000..05a4f76 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_8.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0002_9.png b/datasets/dnd/dnd_rgb/noisy/0002_9.png new file mode 100644 index 0000000..0eeb6a6 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0002_9.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_1.png b/datasets/dnd/dnd_rgb/noisy/0003_1.png new file mode 100644 index 0000000..04f750f Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_1.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_10.png b/datasets/dnd/dnd_rgb/noisy/0003_10.png new file mode 100644 index 0000000..c667a77 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_10.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_2.png b/datasets/dnd/dnd_rgb/noisy/0003_2.png new file mode 100644 index 0000000..5ba79c9 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_2.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_3.png b/datasets/dnd/dnd_rgb/noisy/0003_3.png new file mode 100644 index 0000000..b1ad28c Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_3.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_4.png b/datasets/dnd/dnd_rgb/noisy/0003_4.png new file mode 100644 index 0000000..16e5069 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_4.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_5.png b/datasets/dnd/dnd_rgb/noisy/0003_5.png new file mode 100644 index 0000000..413ddab Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_5.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_6.png b/datasets/dnd/dnd_rgb/noisy/0003_6.png new file mode 100644 index 0000000..fe428c7 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_6.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_7.png b/datasets/dnd/dnd_rgb/noisy/0003_7.png new file mode 100644 index 0000000..d8701bb Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_7.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_8.png b/datasets/dnd/dnd_rgb/noisy/0003_8.png new file mode 100644 index 0000000..f817d9b Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_8.png differ diff --git a/datasets/dnd/dnd_rgb/noisy/0003_9.png b/datasets/dnd/dnd_rgb/noisy/0003_9.png new file mode 100644 index 0000000..5ee4824 Binary files /dev/null and b/datasets/dnd/dnd_rgb/noisy/0003_9.png differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3b37ec1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +cmake +build-essential +libjpeg-dev +libpng-dev +conda create -n pytorch1 python=3.7 +conda activate pytorch1 +conda install pytorch=1.1 torchvision=0.3 cudatoolkit=9.0 -c pytorch +pip install matplotlib scikit-image yacs lycon natsort h5py tqdm diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..58b4552 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.7 diff --git a/utils/image_utils.py b/utils/image_utils.py index e0df7a3..d47d22f 100644 --- a/utils/image_utils.py +++ b/utils/image_utils.py @@ -1,9 +1,9 @@ import torch import numpy as np -from skimage.measure.simple_metrics import compare_psnr +from skimage.metrics import peak_signal_noise_ratio import pickle import lycon -from skimage.measure import compare_ssim +from skimage.metrics import structural_similarity def is_numpy_file(filename): @@ -47,7 +47,7 @@ def batch_PSNR(img, imclean, data_range): Iclean = imclean.data.cpu().numpy().astype(np.float32) PSNR = [] for i in range(Img.shape[0]): - psnr = compare_psnr(Iclean[i,:,:,:], Img[i,:,:,:], data_range=data_range) + psnr = peak_signal_noise_ratio(Iclean[i,:,:,:], Img[i,:,:,:], data_range=data_range) if np.isinf(psnr): continue PSNR.append(psnr) @@ -59,7 +59,7 @@ def batch_SSIM(img, imclean): Iclean = imclean.data.cpu().numpy().astype(np.float32) SSIM = [] for i in range(Img.shape[0]): - ssim = compare_ssim(Iclean[i,:,:,:], Img[i,:,:,:], gaussian_weights=True, use_sample_covariance=False, multichannel =True) + ssim = structural_similarity(Iclean[i,:,:,:], Img[i,:,:,:], gaussian_weights=True, use_sample_covariance=False, multichannel =True) SSIM.append(ssim) return sum(SSIM)/len(SSIM)