0
点赞
收藏
分享

微信扫一扫

DN-DETR: Accelerate DETR Training by Introducing Query DeNoising阅读笔记

艾晓雪 2022-04-15 阅读 63

DN-DETR阅读笔记

(一) Title

论文标题及作者
论文地址:https://arxiv.org/pdf/2203.01305
代码地址:https://github.com/IDEA-opensource/DN-DETR
官方解读:https://zhuanlan.zhihu.com/p/478079763

(二) Summary

(三) Problem Statement

(四) Methods

详细的工作情况为
在这里插入图片描述

使用 A = [ a i j ] W × W \mathbf{A}=\left[\mathbf{a}_{i j}\right]_{W \times W} A=[aij]W×W来表示attention mask,其中 W = P × M + N W=P \times M+N W=P×M+N. P P P M M M分别表示group数量以及真实边界框的数量, N N N表示matching 部分的queries数量,也就是 P × M P \times M P×M表示denoising part,后面的 N N N表示matching part.其中 a i j = 1 a_{ij}=1 aij=1表示第 i i i个query看不到第 j j j个query,这个 A \mathbf{A} A就是注意力矩阵,如下所示:
a i j = { 1 ,  if  j < P × M  and  ⌊ i M ⌋ ≠ ⌊ j M ⌋ 1 ,  if  j < P × M  and  i ≥ P × M 0 ,  otherwise  a_{i j}=\left\{\begin{array}{ll} 1, & \text { if } j<P \times M \text { and }\left\lfloor\frac{i}{M}\right\rfloor \neq\left\lfloor\frac{j}{M}\right\rfloor \\ 1, & \text { if } j<P \times M \text { and } i \geq P \times M \\ 0, & \text { otherwise } \end{array}\right. aij=1,1,0, if j<P×M and Mi=Mj if j<P×M and iP×M otherwise 
需要注意的是这个 A \mathbf{A} A的形状,假设P=3,M=2,N=4,则A矩阵如下所示:
[ 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 ] \begin{bmatrix} &0 &0 &1 &1 &1 &1 &0 &0 &0 &0\\ &0 &0 &1 &1 &1 &1 &0 &0 &0 &0\\ &1 &1 &0 &0 &1 &1 &0 &0 &0 &0\\ &1 &1 &0 &0 &1 &1 &0 &0 &0 &0\\ &1 &1 &1 &1 &0 &0 &0 &0 &0 &0\\ &1 &1 &1 &1 &0 &0 &0 &0 &0 &0\\ &1 &1 &1 &1 &1 &1 &0 &0 &0 &0\\ &1 &1 &1 &1 &1 &1 &0 &0 &0 &0\\ &1 &1 &1 &1 &1 &1 &0 &0 &0 &0\\ &1 &1 &1 &1 &1 &1 &0 &0 &0 &0 \end{bmatrix} 0011111111001111111111001111111100111111111100111111110011110000000000000000000000000000000000000000
A \mathbf{A} A矩阵不是对称矩阵,文中指出允许denoising part来see matching part,不过从矩阵中看到的是预训matching part来see denoising part(这里可能是原文中表述出现问题).而且为什么这样做,也不是很明白。

Attention Mask的计算复杂度比较低.

(五) Experiments

5.1 实验设置

5.2 实验结果

举报

相关推荐

0 条评论