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

Using mobilevit attention layers to create heat map #44

Closed
zas97 opened this issue Aug 16, 2022 · 3 comments
Closed

Using mobilevit attention layers to create heat map #44

zas97 opened this issue Aug 16, 2022 · 3 comments

Comments

@zas97
Copy link

zas97 commented Aug 16, 2022

Is it possible to use the attention layers of the mobilevit model to create a heatmap on the image input with the parts of the image used? I'm looking to something like this :
image

@sacmehta
Copy link
Collaborator

Hi @zas97 ,

This is definitely possible and you need to write the code for the same. We do not support it.

In our MobileViTv2 paper, we did visualize the context maps and you may use it as a reference for implementing for multi-headed attention in transformers.

@arunsubk
Copy link

arunsubk commented May 1, 2023

Hi @zas97 , Could you please let me know if you were able to find or create such code as suggested by @sacmehta ? If yes some pointers could really help. I am unable to wrap my head around how I can get an attention heat map from a final attention map for MobileVit of shape 1,4,4,16,16 i.e. batch_size, nbr of heads, dimension, attention score, attention score for input image dimension of 256,256,3 can be remapped to attention heatmap.

Thanks,
Arun

@zas97
Copy link
Author

zas97 commented May 4, 2023

Not really I left the project

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

3 participants