Coordinate Attention 论文笔记
Coordinate Attention for Efficient Mobile Network Design
CA block CVPR2021
论文链接: https://arxiv.org/abs/2103.02907
一、 Problem Statement
SE block只关注了inter-channel的联系,忽略了位置信息。虽然CBAM添加了spatial attention module,但是是通过卷积来获取位置信息,而卷积只能捕获局部位置关系,不能够对长范围关系进行建模。
二、 Direction
提出了coordinate attention, 通过嵌入位置信息到channel attention module中,提升网络表征性能。因为2D global pooling会导致positional information的丢失,作者把channel attention分解成两个平行的1D特征编码,分别对应direation-aware特征图的vertical和horizontal方向。
三、 Method
先来看一下SE,CBAM,和CA 模块的对比图。
Coordinate Attention模块主要分为两个部分:
- Coordinate information embedding
- Coordinate attention generation
1. Coordinate information embedding
先来看一下第一步,怎么样编码坐标信息。global pooling通常很难保存位置信息,而且为了提升attention blocks对于捕获长范围位置关系的能力,作者把global pooling分解为一对1D特征编码的操作。具体如下:
给定一个输入特征XXX,使用两个spatial extents of pooling kernels (H,1)(H, 1)(H,1) 和 (1,W)(1,W)(1,W)来分别编码沿着水平方向和垂直方向的通道。
zch(h)=1W∑0≤i<Wxc(h,i)zcw(w)=1H∑0≤j<Hxc(j,w)z_c^h(h) = \frac{1}{W} \sum_{0\leq i \lt W}x_c(h, i) \\ z_c^w(w) = \frac{1}{H} \sum_{0 \leq j \lt H}x_c(j, w) zch(h)=W10≤i<W∑xc(h,i)zcw(w)=H10≤j<H∑xc(j,w)
这样就产生了一对direction-aware的特征图。上面两个变换可以使得attention block在每个方向上,捕获长距离的关系,并且保存了位置信息,有助于帮助网络定位感兴趣目标。
2. Coordinate Attention Generation
这一部分的设计遵循了三个原则:
- simple and cheap
- make full use of the captured positional information
- effectively capture inter-channel relationships
所以所做的操作是:
- 先把上面两个feature maps进行拼接融合
- 使用1x1卷积和激活函数
- 使用两个1x1卷积將其输出成两个tensor,并使用激活函数
- 与原始特征进行融合
公式演示如下:
f=δ(F1([zh,zw]))gh=σ(Fh(f))gw=σ(Fw(f))yc(i,j)=xc(i,j)×gch(i)×gcw(j)f = \delta(F_1([z^h, z^w])) \\ g^h = \sigma(F_h(f))\\ g^w = \sigma(F_w(f))\\ y_c(i,j)=x_c(i,j) \times g_c^h(i) \times g_c^w(j) f=δ(F1([zh,zw]))gh=σ(Fh(f))gw=σ(Fw(f))yc(i,j)=xc(i,j)×gch(i)×gcw(j)
四、 Conclusion
CA block有两个优点:
- 不仅是cross-channel,而且是direction-aware和position-sensitive的注意力模块。
- 能够即插即用。
- 普遍能涨点
但是作者在实验的时候使用的是MobileNetv2和MobileNeXt,为何不用MobileNetV3作为baseline呢~。
Reference
Coordinate Attention 论文笔记相关推荐
- Coordinate Attention学习笔记
CVPR2021 Paper:https://arxiv.org/pdf/2103.02907.pdf GitHub:https://github.com/Andrew-Qibin/CoordAtte ...
- DEBERTA(Decoding-enhanced BERT with disentangled attention) 论文笔记
目录 1. 论文简介 2. 贡献 2.1. 解耦注意机制(Disentangled attention) why How 2.2. 增强的掩码解码器(Enhanced mask decoder) Wh ...
- 论文笔记目录(ver2.0)
1 时间序列 1.1 时间序列预测 论文名称 来源 主要内容 论文笔记:DCRNN (Diffusion Convolutional Recurrent Neural Network: Data-Dr ...
- yolox改进--添加Coordinate Attention模块(CVPR2021)
yolox改进--添加Coordinate Attention模块 Coordinate Attention 代码 建立包含CAM代码的attention.py 在yolo_pafpn.py中添加CA ...
- Coordinate Attention和BiFPN
文章目录 1 坐标注意力机制(Coordinate Attention) 原理: 结构: 代码: 优缺点: 2 加权双向特征金字塔(BiFPN)网络结构 原理 结构 代码 优缺点 1 坐标注意力机制( ...
- 【论文笔记】Neural Relation Extraction with Multi-lingual Attention
一.概要 该paper发于ACL2017上,作者主要基于关系事实通常在各种语言中存在某种模式表达,并且不同语言之间的模式是不同的这两个动机,针对于当前存在的单语言关系抽取的方法,从而存在忽略不同语 ...
- 论文笔记2:Deep Attention Recurrent Q-Network
参考文献:[1512.01693] Deep Attention Recurrent Q-Network (本篇DARQN) [1507.06527v3] Deep Recurrent Q-Learn ...
- Deep RGB-D Saliency Detection with Depth-Sensitive Attention and Automatic Multi-Modal Fusion论文笔记
CVPR2021论文笔记 题目:Deep RGB-D Saliency Detection with Depth-Sensitive Attention and Automatic Multi-Mod ...
- Attention Is All You Need 论文笔记
Attention Is All You Need 论文笔记 文章目录 Attention Is All You Need 论文笔记 背景 Tansformer模型简介 Attention & ...
最新文章
- PHP开发APP接口(二)
- 最大流问题的Ford-Fulkerson模板
- OSCHina技术导向:Java模板引擎velocity
- Angular页面在开发模式(DevMode)下的ng-reflect-属性是如何生成的
- Python 3 学习——函数扩展and迭代器生成器装饰器
- Qt笔记-Linux程序控制台启动界面实例
- 多个key作为参数进行删除_作为开发人员这些Redis基础应该掌握
- linux下使用命令行分区、格式化文件系统、更新卷标名称
- 【报告分享】2021年空巢青年研究报告:静水流深,不将就的青春.pdf(附下载链接)...
- Fedora server wifi
- 图像常用的神经网络方法优缺点及应用总结
- 实验二线性表的链式存储结构
- Techme INC:这5类人要警惕癌症!
- 3月最新HP库存备件信息-广州励康
- 从0开始搞一个锦鲤游动——动起来
- 微信小程序微信原生小程序如何通过后端返回的二进制流导出excel文件并保存和转发
- android 经纬度工具类,工具类之LocationUtils(定位工具类)
- 百度地图经纬度和像素坐标互转
- git 配置ssh 秘钥
- CSDN 2020 博客之星实时数据排名(Python 爬虫 + PyEcharts)