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

Code for computing visual-to-instruction information flow #6

Closed
ErikZ719 opened this issue Dec 12, 2024 · 7 comments
Closed

Code for computing visual-to-instruction information flow #6

ErikZ719 opened this issue Dec 12, 2024 · 7 comments

Comments

@ErikZ719
Copy link

Hello author, I am now trying to get the qualitative results of Figure 1 in the paper: visualization of information flow.

Thank you very much for providing a pseudo code for computing visual-to-instruction information flow in the appendix. Would you be able to provide the full visualization code, which would be helpful for me to delve into this exciting work. Thank you.

cca_attn

@xing0047
Copy link
Owner

xing0047 commented Dec 13, 2024

Hi @ErikZ719

Thanks for pointing this out. Code for computing visual-to-instruction information flow is available. Please run script below for a quick glance.

bash scripts/v1_5/eval/eval.cca-llava-1.5-7b.pope.coco.adv.if_vis.sh

The visualisation of information flow will be saved under outputs/pope/coco.

For details of computing this information flow, please check line 773 ~ 777 in cca.py, where text_image_if is the visualised variable.

Hope these help your further explorations.

@SakuraTroyChen
Copy link

Why do I get results that are opposite to yours when using the method you provided?
image

@xing0047
Copy link
Owner

Hi @SakuraTroyChen

I inference with the script above and it seems work fine from my side. Would you share more details on this so that we may further investigate?

cca-llava-1 5-7b_pope_coco_adversarial_if_vis

@SakuraTroyChen
Copy link

Sorry. I made a terrible mistake.

@ErikZ719
Copy link
Author

@xing0047 ,Thank you very much. Have a good day! 👍

@xing0047
Copy link
Owner

Hi @SakuraTroyChen

It is okay. Happy to see your issue has been addressed. Feel free to open discussion if you have further concern on this visualisation.

@xing0047
Copy link
Owner

Hi @ErikZ719

Glad I have helped on this. Have a good day to you too!

Feel free to re-open this issue if further clarifications are needed.

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