jackroos / VL-BERT

Code for ICLR 2020 paper "VL-BERT: Pre-training of Generic Visual-Linguistic Representations".
MIT License
738 stars 110 forks source link

visualize attention for custom images #71

Open betterze opened 3 years ago

betterze commented 3 years ago

Dear @huangyz0918 and @jackroos ,

Thank you for sharing with us the great work, it is impressive.

Is there a easy way to visualize attention for custom images? For example, in ./viz/model_view_vl-bert_coco.ipynb, you show attention visualization for coco images, what if I want to use my own images? It does not seem easy to generate attention map through vis_attention_maps.py for a single image.

Thank you for your help.

Best Wishes,

Alex