Li-Tong-621 / DMID

Stimulating the Diffusion Model for Image Denoising via Adaptive Embedding and Ensembling
18 stars 0 forks source link

imgs in Polyu.pt is not noisy imgs? #3

Closed xiaofeinot closed 2 months ago

xiaofeinot commented 2 months ago

Hi Li-Tong, firstly thanks for your great work!

I download Polyu.pt from "v1.0 release -- pretrained.zip", but I found that imgs in Polyu.pt is not noisy imgs. In fact the imgs are clean and smooth. So if I run "python main_for_real.py --noisy_path ./pre-trained/Polyu.pt --clean_path ./data/PolyU/GT/ --datatype PolyU", though the "denoise" output looks clean, it's not correct .

I also pack 100 PolyU noisy JPG imgs into Polyu.pt and run main_for_real.py script, but the result tends to be not well, the noise remain much.

I'm not sure if I follow correct pipeline. If there are any mistake during my code running, please point it, thanks again!

Li-Tong-621 commented 2 months ago

Hello. It is very noteworthy that the imgs in Polyu.pt are noisy images !!!!

The results saved in Polyu.pt are intermediate results after noise transformation. Our method first goes through a noise transformation so that the noise can more closely resemble Gaussian noise to align with the capabilities of the diffusion model.

1."The imgs are clean and smooth"

This is because the noise in the original PolyU dataset is very small, and after noise transformation, it is equivalent to Gaussian noise with sigma=5.

A simple way to determine if the images are clean is by calculating the PSNR (38.42) of this intermediate result and comparing it with our DMID-d result (38.62). Since the noise level is relatively low, the PSNR of this intermediate result is high, but it is lower than that of DMID-d, which aligns with the characteristic of the transformed noise being equivalent to Gaussian noise with sigma=5.

2."I also packed 100 PolyU noisy JPG imgs into Polyu.pt and ran the main_for_real.py script, but the result tends to be not well, the noise remains much."

This is because a noise transformation is required first, as the diffusion model cannot directly handle real noise. You can try performing a noise transformation first (python main_for_real_NT.py), and then use the diffusion model for denoising (python main_for_real.py). (Actually, we have integrated the denoising code in python main_for_real_NT.py, but it seems there are some issues, so it is best to use python main_for_real.py for denoising).

Li-Tong-621 commented 2 months ago

If it was helpful, feel free to give us a star.