ArcherFMY / sal_eval_toolbox

evaluation toolbox for salient object detection
MIT License
146 stars 40 forks source link

evalution results of PASCAL-S contain NaN. (results from BASNet) #7

Open pengqianli opened 4 years ago

zhuguanglueying commented 4 years ago

这个问题是由于图片中无显著物体,导致求Recall时分母为0,得到Nan,求Recall时将分母加上1e-16,防止分母为0.

StormArcher commented 4 years ago

遇到了同样的问题,AFNet

StormArcher commented 4 years ago

1e-16 请问是这个位置吗? PreFtem = NumAnd/NumRec; RecallFtem = NumAnd/(num_obj+1e-16); % 防止出现NaN FmeasureF = ( ( 1.3 PreFtem RecallFtem ) / ( .3 * PreFtem + RecallFtem ) );

StormArcher commented 4 years ago

910997316 QQ能否请教下

ArcherFMY commented 4 years ago

是的,有时候真值gtMap里没object

StormArcher commented 4 years ago

是的,有时候真值gtMap里没object

请问作者你们是这么解决这个问题的,我换了台机器尝试也不行,楼上那个建议加一个小的数好像不行?

ArcherFMY commented 4 years ago

是的,有时候真值gtMap里没object

请问作者你们是这么解决这个问题的,我换了台机器尝试也不行,楼上那个建议加一个小的数好像不行?

我是直接把gt中没有object的图片删掉了

zhuguanglueying commented 4 years ago

我又把代码下载看了看,应该是将performCalcu.m中177行加1e-16,像这样 Pre = targetHist ./ (targetHist + nontargetHist); Recall = targetHist / (gtPxlNum + 1e-16); TPR = Recall; 这样求maxF是就不会出错了,至于AUC我没看,可以自己去调试嘛。