Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Demo_test_DnCNN.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

% clear; clc;
addpath('utilities');
folderTest = 'testsets\Set12'; %%% test dataset
%folderTest = 'testsets\BSD68';
testDir = 'testsets';
folderTest = 'BSD68'; %%% test dataset
folderModel = 'model';
noiseSigma = 25; %%% image noise level
showResult = 1;
useGPU = 1;
useGPU = 0; %%% GPU status
pauseTime = 1;

%%% load [specific] Gaussian denoising model
Expand All @@ -23,8 +23,8 @@
% load(fullfile(folderModel,'GD_Gray_Blind.mat'));


%%%
% net = vl_simplenn_tidy(net);
%%% uncomment if necessary for different MatConvNet versions
%net = vl_simplenn_tidy(net);

% for i = 1:size(net.layers,2)
% net.layers{i}.precious = 1;
Expand All @@ -36,6 +36,7 @@
end

%%% read images
folderTest = fullfile(testDir, folderTest);
ext = {'*.jpg','*.png','*.bmp'};
filePaths = [];
for i = 1 : length(ext)
Expand Down
5 changes: 3 additions & 2 deletions Demo_test_DnCNN3.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

%%% testing set
tasks = {'GD','SR','DB'}; %%% three tasks
imageSets = {'BSD68','Set5','Set14','BSD100','Urben100','classic5','LIVE1'}; %%% testing dataset
imageSets = {'BSD68','Set5','Set14','BSD100','Urban100','classic5','LIVE1'}; %%% testing dataset

%%% setting
taskTest = tasks([1 2 3]); %%% choose the tasks for evaluation
setTest = {imageSets([1]),imageSets([2:5]),imageSets([6 7])}; %%% select the datasets for each tasks
showResult = [1 1 1]; %%% save the restored images
pauseTime = 1;
folderModel = 'model';
useGPU = 1; % 1 or 0, true or false
useGPU = 0; % 1 or 0, true or false

folderTest = 'testsets';
folderResult= 'results';
Expand All @@ -36,6 +36,7 @@
%%% load DnCNN-3 model
load(fullfile(folderModel,'DnCNN3.mat'));

%%% uncomment if necessary for different MatConvNet versions
%net = vl_simplenn_tidy(net);
% for i = 1:size(net.layers,2)
% net.layers{i}.precious = 1;
Expand Down
Loading