Skip to content

Commit

Permalink
Fix issue with DVA missing subsample parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
cwloka committed Apr 15, 2019
1 parent 6468c36 commit 4ad67c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions models/matlab/DVA/DVA_wrap.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,19 @@

%% Calculating the saliency map

load('AW.mat', 'A', 'W');
% resize the image
[imgH, imgW, ~] = size(img);
img = imresize(img, params.size);

load('AW.mat', 'A', 'W');


% Building Saliency Map
myEnergy = im2Energy(img, W);
salmap = vector2Im(myEnergy, imgH, imgW);
salmap = vector2Im(myEnergy, params.size(1), params.size(2));

%resize to original size
salmap = imresize(salmap, [imgH, imgW]);

% do any final post-processing as specified by the parameters
salmap = fmtOutput(salmap, params);
5 changes: 5 additions & 0 deletions models/matlab/DVA/smiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"model_type": "matlab",
"model_files": [],
"parameters": {
"size": {
"default": [80, 120],
"description": "The size to which the image is rescaled during the saliency calculation.",
"valid_values": "Any integer tuple with values greater than 0."
}
}
}

0 comments on commit 4ad67c2

Please sign in to comment.