IDEA-Research / DAB-DETR

[ICLR 2022] Official implementation of the paper "DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR"
Apache License 2.0
517 stars 87 forks source link

Ask some questions about modulated HW attentions #38

Closed HangFang6 closed 2 years ago

HangFang6 commented 2 years ago

I have some doubts in understanding the modulated HW attentions part of DAB-DETR. In line 238 of transformer.py, query_sine_embed has only intercepted the embedding of x and y. Shouldn't the 243 and 244 lines of modulat HW attentions be done for the embedding of w and h? Why do you still operate on the embedding of x and y? It's a bit confusing.

SlongLiu commented 2 years ago

We aim at modulating x&y embeddings with w&h. Hence we perform it on x and y.