Deformable DETR
Motivation
- DETR对于小物体的检测能力较差。现代的目标检测器用高像素的图像来检测小物体,但是使用高像素图像会导致DETR中encoder的计算复杂度增高。 O ( s i z e 3 ) O(size^{3}) O(size3)
- DETR需要更多的训练轮次来收敛,收敛速度较慢。For example,在训练初始,cross-attention模块在整个特征图谱上都作attention,而在训练快结束时,注意力图谱已经被学习得非常稀疏,仅仅关注物体存在的部分。DETR需要训练很久来得到这么大的变化。
Deformable Attention Module
主要存在的问题:
The core issue of applying Transformer attention on image feature maps is that it would look over all possible spatial locations.
而Deformable Attention Module
Only attends to a small set of key sampling points around a reference point.
即对于每个query,只在关键点附近采样固定数量的keys