資源簡介
zw_u012395517-10466514-PR_curve.zip

代碼片段和文件信息
clear?all
clc
inpath_o?=?‘.\SED2_FinalSaliencyMap\‘;%生成的顯著圖
dir_o?=?dir([inpath_o?‘*.png‘]);
inpath_m?=?‘.\SED2_GT\‘;%GT圖
dir_m?=?dir([inpath_m?‘*.png‘]);
reca?=?zeros(length(dir_o)255);
prec?=?zeros(length(dir_o)255);
for?i?=?1:length(dir_o)
????oName?=?dir_o(i).name;
????out?=?imread([inpath_o?oName]);
????mName?=?dir_m(i).name;
????mark?=?imread([inpath_m?mName]);
????
????mark?=?mark(::1);
????mark?=?mark/max(mark(:));
????
????[r?c?k]?=?size(out);
????label?=?imresize(mark[r?c]);
????
????label?=?reshape(label1r*c);
????score?=?reshape(out1r*c);
????
????for?j?=?1:256
????????thresh?=?j/256;
????????sco_th?=?im2bw(scorethresh);
????????TP?=?length(find((label?==?1)?&?(sco_th?==?1)));
????????FP?=?length(find((label?==?0)?&?(sco_th?==?1)));
????????FN?=?length(find((label?==?1)?&?(sco_th?==?0)));
????????reca(ij)?=?TP/(TP+FN);
????????prec(ij)?=?TP/(TP+FP);
????end
????
????count?=?i
end
X?=?sum(reca1)/length(dir_o);
Y?=?sum(prec1)/length(dir_o);
figure
plot(X1Y1‘r‘‘LineWidth‘1.5);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1077??2019-07-19?11:24??\u012395517-10466514-PR_curve.m
?????文件??????????36??2019-07-19?11:24??\no.txt
評論
共有 條評論