raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.97k stars 664 forks source link

I am working on gray scale images, but visualize_saliency returns three channels. What does each channel mean? #86

Open hw449 opened 6 years ago

hw449 commented 6 years ago

Hi @raghakot ,

Sorry to bother you. I am using saliency map on some gray scale image that has only one channel, but visualize_saliency still returns saliency maps with three channels. So what's the meaning for each channel? Is it possible to generate a saliency map with only one channel?

Thank you for developing tools that are so cool for our community!

Regards, Hai

Awerick commented 6 years ago

You are probably using the official keras-vis version (e.g. from pip): There the saliency values are mapped to an RGB heat color coding (thus 3 channels). This behavior was updated in the last months: Now the raw saliency values are returned. You can see the change (old vs updated code) in this diff. So if you build the current version from source, you should have the desired behavior where only the raw saliency value is returned.

a6225301 commented 5 years ago

Still not work, gray scale image input and it outputs three channels features. @Awerick @hw449 any solution ? What is the meaning of each channel ?