rayleizhu / BiFormer

[CVPR 2023] Official code release of our paper "BiFormer: Vision Transformer with Bi-Level Routing Attention"
https://arxiv.org/abs/2303.08810
MIT License
460 stars 36 forks source link

About visualization of routed region and attention map #12

Open go-ahead-maker opened 1 year ago

go-ahead-maker commented 1 year ago

Hi author, BiFormer is such inspiring work! I wonder if you could provide the demo code for the visualization of the routed key-value region, or describe how can i get similar results in Figure 4 of the paper.

Thanks a lot!

rayleizhu commented 1 year ago

I will release the visualization demo notebook by the end of next month. If you need it right away, you can go ahead and implement it by yourself. It is not technically challenging, though there are many trivial routines.

See also https://github.com/rayleizhu/BiFormer/issues/7#issuecomment-1505497844