sanghviyashiitb / structured-kernel-cvpr23

Official Code for "Structured Kernel Estimation for Photon-Limited Deconvolution" (CVPR 2023)
https://sanghviyashiitb.github.io/structured-kernel-webpage/
MIT License
32 stars 8 forks source link

Alpha value #4

Open SaharHusseini opened 5 months ago

SaharHusseini commented 5 months ago

Hello,

First of all, thank you for your work. I have a question regarding the use of the alpha value in the demo_grayscale.py file. Specifically, I'm curious about the appropriateness of calculating the alpha value as np.mean(yn/0.33) in scenarios where no additional noise is introduced to the image.

As an example: x_list, k_list = iterative_scheme(yn, np.mean(yn/0.33), networks, opts) In this context, yn represents my input image, and I intend to process it without manually adding any noise.

sanghviyashiitb commented 5 months ago

Hi Sahar, Thank you for the question. The method is designed for images corrupted for shot noise and hence we require a heuristic to estimate the average photon level in these images. Assuming the unnormalized image y = Poisson (\alpha H*x), where the clean image x is between [0,1], np.mean(y)/0.33 has turned out to be a good heuristic from one of my previous papers here.

As to your question about deblurring noiselss images, the original method cannot be applied directly but can be done with a few changes. You can use the pretrained non-blind solver DWDN from here. This network is designed for noisless blurry images and can be plugged into our method by replacing the non-blind solver we provided. Some hyperparameter tuning may be required for optimal performance.

Hope this helps! Please let me know if you have any further questions. If your noiseless deblurring method works well, we can add it to this repository as well!