forked from YuejiaoGong/PDP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_PDP.m
More file actions
31 lines (24 loc) · 872 Bytes
/
run_PDP.m
File metadata and controls
31 lines (24 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
%% Saliency Detection Using Pseudo Depth Prior (PDP)
clear, clc,
close all
%% 1. Parameter Settings
%dataset = 'ECSSD';
dataset = 'PASCAL-S';
algname = 'PDP';
multiscale = [150 250 350];
SRC = ['Data\',dataset,'\Imgs']; %Path of input images
RES = ['Data\',dataset,'\saliency_',algname ]; %Path for saving saliency maps
srcSuffix = '.jpg'; %suffix for your input image
if ~exist(RES, 'dir')
mkdir(RES);
end
addpath(genpath('Funcs'));
%% 2. Saliency Map Calculation
files = dir(fullfile(SRC, strcat('*', srcSuffix)));
for k=1 : length(files)
srcName = files(k).name;
noSuffixName = srcName(1:end-length(srcSuffix));
% disp(k); disp(srcName);
srcImg = imread(fullfile(SRC, srcName));
PDP_multiLayer(srcImg, multiscale, algname, RES, noSuffixName);
end