codeslake / IFAN

[CVPR 2021] Official PyTorch Implementation for "Iterative Filter Adaptive Network for Single Image Defocus Deblurring"
GNU Affero General Public License v3.0
222 stars 37 forks source link

ResolutionCard issue #8

Closed excllent123 closed 2 years ago

excllent123 commented 2 years ago

Hi Lee, Thanks for your kindly share the code I train your model on my own data, it works well on most case,but on resolutioncard may introduce artifact,it show on img,can you help me?

img

Thanks

codeslake commented 2 years ago

Hi,

I am afraid that I can help with this. If the camera and lens used for creating the dataset are different from the camera and lens used for capturing the resolution card, artifacts may occur. Even if they are the same, artifacts may still occur, if training patches do not contain similar contents as the resolution card.

One solution that I can think of is to include training images of different resolution cards so that the network can be exposed to similar patterns.

excllent123 commented 2 years ago

Even if my dataset contain resolution card with the same sensor,i still face this issue, i train the model on mix precision, and modify input to raw, just simple modify input channel 3 to 1, can you give me more advices?

Thanks

codeslake commented 2 years ago

As I said, even if the dataset and the test images are taken with the same camera and lens, the artifact still can occur.

Try to include images of other resolution cards into the dataset and retrain the network. I will also try to reduce sigma value used for augmenting the dataset with Gaussian noises.

excllent123 commented 2 years ago

Thanks for you kindly help, I will try it