grumpybavarian / mnist_deblurring

8 stars 6 forks source link

How did you get these blur kernels? #1

Closed huizhang0110 closed 5 years ago

huizhang0110 commented 5 years ago

Thanks for your code, but are these blur kernels randomly generated?

grumpybavarian commented 5 years ago

The blur kernels were created using Matlab's fspecial (https://uk.mathworks.com/help/images/ref/fspecial.html). Several lengths and angles were used in order to capture different blurs.

huizhang0110 commented 5 years ago

In this case, will the network be over-fitting to such predefined 2-D filter?

grumpybavarian commented 5 years ago

Yes, it will eventually, just as every network would eventually overfit the training data given a large enough network size and long enough training. Deblurring is all about artificially modelling realistic blurs as closely as possible, so if you knew the blur kernel that occurred in reality, you'd want to overfit on this kernel. However, this kernel is unknown, so my approach was to train on a large variety of blur kernels. This prevents overfitting to one specific motion blur kernel. However, it does overfit to linear motion blur kernels (as I have only used linear motion blur), so the trained network could not be used for deblurring images that have been blurred with other kernels.