Atten4Vis / MS-DETR

[CVPR 2024] The official implementation for "MS-DETR: Efficient DETR Training with Mixed Supervision"
Apache License 2.0
64 stars 3 forks source link

关于推理 #4

Open zhuhefighting opened 3 months ago

zhuhefighting commented 3 months ago

大佬好,请问当推理的时候是把use_ms_detr设置为False吗?如果设置为False,那么我注意到decoder layer中,两个attention的顺序又变成了先self_attn后cross_attn?

ZhaoChuyang commented 3 months ago

你好~推理的时候也是设置成 True。目前代码里推理的时候 one-to-many 分支还是 forward 了,但是 one-to-many 分支的预测最终没有用到,如果不想 forward 这个分支可以修改下代码(比如把 ms_detr 设成 False 并把 attention layer 的顺序调整为 cross_attn -> self_attn)