Ankush96/grad-cam.tensorflow

How can i use Grad_CAM on my own networks?

wmchen opened this issue · 7 comments

Hi, i would like to use this tool to visualize my own network(such as LightCNN29), how can i transform your code from vgg16 to other network?
I would appreciate it if you can help me!

S0soo commented

Sir, have you solved this problem, please?

Sir, have you solved this problem, please?

Hello, I have solved this problem on my own network(LCNN-29). What problem did you get? Can you describe your problem in details?

S0soo commented

I tried to use it on faster-rcnn, but I failed. I don't understand what this got.
image
Thank you for taking the time to reply to me.

I tried to use it on faster-rcnn, but I failed. I don't understand what this got.
image
Thank you for taking the time to reply to me.

This code is computing the average gradient of your choosing conv layer. You may change the parameter in 'feed_dict' from 'vgg.imgs' to your image placeholder.

S0soo commented

I tried many times and finally ran, but I don't know if the result is correct.
image

I tried many times and finally ran, but I don't know if the result is correct.
image

The result reflects the features that have learnt from the chosen layer. In the given image, highlighted areas are around the edge of bowls. So, maybe the chosen layer have learnt the features related to the edge of bowls.
However, it seems that the NN have not been well trained, the result you given looks fuzzy. Which layer did you choose for the visualization task? Maybe you can choose another deeper conv/pooling layer.

S0soo commented

I understand. Maybe the convolution layer I chose is shallow.
Thank you very much for your help. Have a good day.