Blur Kernel Estimation
Torch and Computing
This project is based on deep learning using the
torch framework. This code is GPU ready too. To get torch see torch7. Install
cudnn from Nvidia's website.
Put all the images you wish to invariantly blur in the
images folder. Edit according to the channels of the image. Open a MATLAB interpreter and run
create on MATLAB. This will load the images in the folder and blur each of them with the all different sigma values.
matlab -nodisplay -r create
This will output two 4-D MATLAB Arrays saved in the
torch convention (
nCols) of images.
create.lua file according to filenames you'd like to save by. Run
th create.lua. This output two .t7 storages including shuffling them.
Create the Network
createModel.lua for the desired depth and size of the network. Run
Training & Validating model
main.lua for an appropriate criterion (NLL or MSE). Incase of classification, edit the size of the confusion matrix.
Edit and run
Evaluation is done by predicting the class of every 32x32 patch striding the image by 1px using
evaluator.lua. It accepts a argument from the CLI and outputs a mat of the predicted sigma map. One can visulize it using the
mesh command from matlab. Alternatively you may use
savemesh command in
scripts/ to output files in 3 views.