Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply GradCam to Cnn+LSTM #32

Open
gabarlacchi opened this issue Jan 13, 2020 · 2 comments
Open

Apply GradCam to Cnn+LSTM #32

gabarlacchi opened this issue Jan 13, 2020 · 2 comments

Comments

@gabarlacchi
Copy link

Hi all,
I am working with a feature extractor (Inception V3, VGG16, whatever) plus an LSTM for sequences classification (let's say 3 sec. each one). There's any way to use GradCam in order to obtain areas activation on the input sequences? Right now, I just classify one sequence without single frame classification, is still possible apply GradCam to this network?
I didn't find any example code about it, but just for GradCam applied to single feature extractor.
Thanks in advance for the help,
Gabriele

@monjurulkarim
Copy link

@barloccia Did you find any solution?

@gabarlacchi
Copy link
Author

Hi,
I used the standard way by applying grad-cam to each frame within the sequence. Since the CNN+LSTM network internally predict the class for each frame, you can then apply grad-cam to them. In my case this represents the area within every image in which the network focused at prediction time.
I applied the implementation of grad-cam tensorflow 2: https://github.com/ismailuddin/gradcam-tensorflow-2

Hope this helps,
Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants