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

How to visualize self-attention on original image #8

Open
xz-123-new opened this issue Dec 24, 2023 · 1 comment
Open

How to visualize self-attention on original image #8

xz-123-new opened this issue Dec 24, 2023 · 1 comment

Comments

@xz-123-new
Copy link

Thanks for your great work! I can easily visualize cross-attention map of each token in prompt on the origin image, but the self-attention visualization is a little bit confusing for me, since self-attention map represents the attention scores between image tokens, so it should be sized (H'W')(H'W'), so how could i map it back to HW and relfect it as shown in Fig4, thanks for your generous help!

@zhuyinna
Copy link

Thanks for your great work! I can easily visualize cross-attention map of each token in prompt on the origin image, but the self-attention visualization is a little bit confusing for me, since self-attention map represents the attention scores between image tokens, so it should be sized (H'W')_(H'W'), so how could i map it back to H_W and relfect it as shown in Fig4, thanks for your generous help!

Hi, have you resolve the problem? I want to know how to visualize the attn_map, too.

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