Matlab显著性检测模型性能度量之NSS

% created: Zoya Bylinskii, Aug 2014

% This finds the normalized scanpath saliency between two different 
% saliency maps as the mean value of the normalized saliency map at 
% fixation locations.

function score = NSS(saliencyMap, fixationMap)
% saliencyMap is the saliency map
% fixationMap is the human fixation map (binary matrix)  % 二值图
map = double(imresize(saliencyMap,size(fixationMap)));

% normalize saliency map  //经过处理的数据符合标准正态分布,即均值为0,标准差为1
map = (map - mean(map(:)))/std(map(:)); 

% mean value at fixation locations
score = mean(map(logical(fixationMap))); 
% 比如map(i,j)== 0.4,fixationMap(i,j) == 1,则这个点保存下来,保存所有类似的map上点,求均值
% 模型越好,map(i,j)值越趋向于1

关键代码:

score = mean(map(logical(fixationMap))); 

map即为saliency map,

fixationMap即为ground truth

原文:NSS is the average of the response values at human eye positions  in a model’s saliency map (S) that has been normalized to have zero mean and unit standard deviation。

一句话,模型在真实正类上的平均反应,即为NSS

拆开分析:1)先将ground truth map二值化;2)模型得到的显著图归一化为0均值,标准差为1;3)将显著图中对应于ground truth map上值为1的所有显著值的平均值,即为NSS值,也可以saliency map和ground truth map点乘相加求均值,即为NSS值。

没有更多推荐了,返回首页