zhoubolei/CAM

Applying threshold on negative weight values or not?

ozancaglayan opened this issue · 3 comments

Hello,

I saw that in Places365 CAM code, a thresholding is applied over the softmax layer weights while in this repository and in the original paper, there's no mention about this trick.

Is there an explanation for this?

Thanks!

Thresholding the softmax weight will make the heatmap highlight all the positively contributed areas. Also previously I found the rendering code for the heatmap didn't handle the negative feature map very well.

But it is interesting to explore the negative image region for the prediction, for example, a sofa region would have a negative effect on predicting beach category.

thanks for the quick reply!

Hi, I also find negative weights in my implementation. I also used the threshold for avoiding negative weights. However, I am curious what have you done in your experiments. Could you explain it in more detail? Thanks.