main
rajeevyasarla 6 years ago
parent 117d2ccd9d
commit e38595c194

@ -12,8 +12,13 @@ We propose a novel multi-stream architecture and training methodology that explo
2. Python 2 or 3
3. CPU or NVIDIA GPU + CUDA CuDNN (CUDA 8.0)
## To test UMRL:
python test_face_deblur.py --dataroot ./facades/github/ --valDataroot <path_to_test_data> --netG ./pretrained_models/Deblur_epoch_Best.pth
1. Download test datasets provided the authors of Ziyi et al.
- https://sites.google.com/site/ziyishenmi/cvpr18_face_deblur
2. run test_data_generation.m
- It renames the files counting from example 000001.png
3. python test_face_deblur.py --dataroot ./facades/github/ --valDataroot <path_to_test_data> --netG ./pretrained_models/Deblur_epoch_Best.pth
## To train UMRL:
python train_face_deblur.py --dataroot <path_to_train_data> --valDataroot ./facades/github/ --exp ./face_deblur --batchSize 10

@ -0,0 +1,31 @@
close all;
clear all;
clc;
%Download Test Data provided by authors Ziyi et al. from,
%https://sites.google.com/site/ziyishenmi/cvpr18_face_deblur
listinfo = dir('./Test_data_Helen/final_Helen_gt');
m = length(listinfo);
count =1;
for i = 3:m
imgname = strcat('./Test_data_Helen/final_Helen_gt','/',listinfo(i).name);
tmp = listinfo(i).name;
tmp1 = split(tmp,'.');
I = imread(imgname);
im_name = tmp1{1};
for j = 1:10
for k = 13:2:27
blrname = strcat('./Test_data_Helen/final_Helen_blur/',im_name,'_ker',num2str(j,'%02d'),'_blur_k',num2str(k),'.png');
B = imread(blrname);
blrname = strcat('./final_Helen_result/',im_name,'_ker',num2str(j,'%02d'),'_blur_k',num2str(k),'_random.png');
S = imread(blrname);
filename = strcat('./Testh_gt/',num2str((count),'%06d'),'.png');
imwrite(I,filename);
filename = strcat('./Testh/',num2str((count),'%06d'),'.png');
imwrite(B,filename);
filename = strcat('./Testh_st/',num2str((count),'%06d'),'.png');
imwrite(S,filename);
count = count+1;
end
end
i
end
Loading…
Cancel
Save