arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.02907cs.CV
收藏

协调注意力以实现高效的移动网络设计

Coordinate Attention for Efficient Mobile Network Design

National University of Singapore(新加坡国立大学)

Qibin Hou, Daquan Zhou, Jiashi Feng

摘要:

最近关于移动网络设计的研究已经证明了信道注意力的显著效果(例如,挤压和激发注意力)来提升模型性能,但是它们通常忽略位置信息,这对于生成空间选择性注意力图是重要的。在本文中,我们提出了一种新的注意力机制的移动网络中嵌入位置信息的信道注意,我们称之为“协调注意”。与通过2D全局池化将特征张量转换为单个特征向量的通道注意力不同,坐标注意力将通道注意力分解为两个1D特征编码过程,分别沿着两个空间方向聚合特征。通过这种方式,可以沿着一个空间方向捕获长距离依赖性,同时可以沿着另一个空间方向保留精确的位置信息。然后将得到的特征图单独编码成一对方向感知和位置敏感的注意力图,其可以互补地应用于输入特征图以增强感兴趣对象的表示。我们的协调注意力很简单,可以灵活地插入经典的移动网络,如MobileNetV2,MobileNeXt和EfficientNet,几乎没有计算开销。大量的实验表明,我们的协调注意力不仅有利于ImageNet分类,而且更有趣的是,在下游任务中表现得更好,例如目标检测和语义分割。代码可在https://github.com/Andrew-Qibin/CoordAttention上获得。

英文摘要:

Recent studies on mobile network design have demonstrated the remarkable effectiveness of channel attention (e.g., the Squeeze-and-Excitation attention) for lifting model performance, but they generally neglect the positional information, which is important for generating spatially selective attention maps. In this paper, we propose a novel attention mechanism for mobile networks by embedding positional information into channel attention, which we call "coordinate attention". Unlike channel attention that transforms a feature tensor to a single feature vector via 2D global pooling, the coordinate attention factorizes channel attention into two 1D feature encoding processes that aggregate features along the two spatial directions, respectively. In this way, long-range dependencies can be captured along one spatial direction and meanwhile precise positional information can be preserved along the other spatial direction. The resulting feature maps are then encoded separately into a pair of direction-aware and position-sensitive attention maps that can be complementarily applied to the input feature map to augment the representations of the objects of interest. Our coordinate attention is simple and can be flexibly plugged into classic mobile networks, such as MobileNetV2, MobileNeXt, and EfficientNet with nearly no computational overhead. Extensive experiments demonstrate that our coordinate attention is not only beneficial to ImageNet classification but more interestingly, behaves better in down-stream tasks, such as object detection and semantic segmentation. Code is available at https://github.com/Andrew-Qibin/CoordAttention.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑