IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.15k stars 232 forks source link

How to visualize the attentions? #159

Open Hezey opened 1 year ago

Hezey commented 1 year ago

如何绘制出类似于DETR中的Fig.3? 请问有相关代码吗? 感谢您的帮助!

image

SlongLiu commented 1 year ago

DINO的attention是deformable attention,可视化的效果会不太一样。

可以把中间结果提取出来,然后叠加到原图即可。您可能需要看一下具体的attention的实现。