jacobgil / pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
https://jacobgil.github.io/pytorch-gradcam-book
MIT License
9.99k stars 1.52k forks source link

GradCAM does not match exactly. Why? #11

Closed bemoregt closed 5 years ago

bemoregt commented 6 years ago

Hi, @mingloo @jacobgil @flyingpot

As a result of classifying with Resnet, Accuarcy is over 99%. If you hit map the object area with gradCAM with that model file, it does not match exactly. Why? it does not match exactly. Why?

It seems to be a problem of GradCAM rather than Resnet classification learning. The objects to be hit-mapped are not as local or blob like dogs or cats, but close to a long straight line. In this case, GradCAM seems to miss the object area. Have you experienced this?

For a well-trainedd Resnet34 model, how do you optimize GradCAM?

Thanks, in advance.

from @bemoregt.

jacobgil commented 6 years ago

Can you share more details? When kind of objects are there in the dataset? The network is just resnet without modifications?