Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (20): 150-156.DOI: 10.3778/j.issn.1002-8331.2101-0369

Previous Articles     Next Articles

Improved Lightweight Attention Model Based on CBAM

FU Guodong, HUANG Jin, YANG Tao, ZHENG Siyu   

  1. School of Electrical Engineering, Southwest Jiaotong University, Chengdu 611756, China
  • Online:2021-10-15 Published:2021-10-21

改进CBAM的轻量级注意力模型

付国栋,黄进,杨涛,郑思宇   

  1. 西南交通大学 电气工程学院,成都 611756

Abstract:

In recent years, the attention model has been widely used in the field of computer vision. By adding the attention module to the convolutional neural network, the performance of the network can be significantly improved. However, most of the existing methods focus on the development of more complex attention modules to enable the convolutional neural network to obtain stronger feature expression capabilities, but this also inevitably increases the complexity of the model. In order to achieve a balance between performance and complexity, a lightweight EAM(Efficient Attention Module) model is proposed to optimize the CBAM model. For the channel attention module of CBAM, one-dimensional convolution is introduced to replace the fully connected layer to aggregate the channels. For the spatial attention module of CBAM, the large convolution kernel is replaced with a dilated convolution to increase the receptive field for aggregation Broader spatial context information. After integrating the model into YOLOv4 and testing it on the VOC2012 data set, mAP is increased by 3.48 percentage points. Experimental results show that the attention model only introduces a small amount of parameters, and the network performance can be greatly improved.

Key words: convolutional neural network, attention mechanism, object detection

摘要:

近几年注意力模型在计算机视觉领域取得了广泛的应用,通过在卷积神经网络中加入注意力模型,网络的性能可以显著提升。然而大多数现有的方法都专注于开发更复杂的注意力模型,以使卷积神经网络获得更强的特征表达能力,但这也不可避免地增加了模型的复杂性。为了在性能和复杂度间取得平衡,对CBAM模型进行优化提出了轻量级的EAM(Efficient Attention Module)模型。针对CBAM的通道注意力模块,引入一维卷积替代全连接层来聚合各通道间的信息;对于CBAM的空间注意力模块,将大卷积核替换为空洞卷积来增加感受野以聚合更广的空间上下文信息。将该模型融入YOLOv4后在VOC2012数据集上进行测试,mAP提高3.48个百分点。实验结果表明,该注意力模型只引入较小的参数量,网络性能可获得较大提升。

关键词: 卷积神经网络, 注意力机制, 目标检测