Li-Tong-621 / DMID

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

Prediction results not using the input image? #1

Closed syrfan12 closed 10 months ago

syrfan12 commented 10 months ago

Thank you for the code and model you provided. I have tried the model provided and tried to use my original image. The result is that the output image is an image that comes from the original dataset instead of my original image. I tried to modify the noise variable part and finally the result is the denoise result of my original image. Is it a bug or something wrong with what I did?

from

data_start = time.time() 
 b, c, h, w = noise.shape 
 clean = clean.to(device) 
 noise = noise.to(device)

become

 data_start = time.time() 
 b, c, h, w = noise.shape 
 noise = clean.to(device)
 clean = clean.to(device) 

https://github.com/Li-Tong-621/DMID/blob/2dd4b60c9c967fbb4ae144af85e2af1c72c440b2/main_for_real.py#L145-L152

Li-Tong-621 commented 10 months ago

Hi, I'm glad that my work has caught your attention.

In the current public code version (October 2023 or May 2023), we have only released the inference code that can reproduce the experiments mentioned in our paper. The current code only supports using your own images for Gaussian denoising. The code for denoising arbitrary real images will be made public later.

Please refer to main_for_gaussian.py for implementation, and we look forward to seeing your results.