Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (4): 1069-1076.DOI: 10.11772/j.issn.1001-9081.2024040525

• Artificial intelligence • Previous Articles     Next Articles

Channel shuffle attention mechanism based on group convolution

Liwei ZHANG1,2, Quan LIANG1,2(), Yutao HU1,2, Qiaole ZHU1,2   

  1. 1.School of Computer Science and Mathematics,Fujian University of Technology,Fuzhou Fujian 350118,China
    2.Fujian Provincial Key Laboratory of Big Data Mining and Applications (Fujian University of Technology),Fuzhou Fujian 350118,China
  • Received:2024-04-28 Revised:2024-08-05 Accepted:2024-08-08 Online:2025-04-08 Published:2025-04-10
  • Contact: Quan LIANG
  • About author:ZHANG Liwei, born in 2000, M. S. candidate. His research interests include object detection.
    LIANG Quan, born in 1972, Ph. D., professor. His research interests include artificial intelligence, internet of things, intelligent control.
    HU Yutao, born in 1999, M. S. candidate. His research interests include object detection.
    ZHU Qiaole, born in 2000, M. S. candidate. His research interests include image segmentation.
  • Supported by:
    Fujian Provincial Natural Science Foundation(GY-Z23014)

基于分组卷积的通道重洗注意力机制

张李伟1,2, 梁泉1,2(), 胡禹涛1,2, 朱乔乐1,2   

  1. 1.福建理工大学 计算机科学与数学学院,福州 350118
    2.福建省大数据挖掘与应用技术重点实验室(福建理工大学),福州 350118
  • 通讯作者: 梁泉
  • 作者简介:张李伟(2000—),男,湖北阳新人,硕士研究生,主要研究方向:目标检测
    梁泉(1972—),男,湖南邵阳人,教授,博士,主要研究方向:人工智能、物联网、智能控制
    胡禹涛(1999—),男(布依族),贵州贵阳人,硕士研究生,主要研究方向:目标检测
    朱乔乐(2000—),男,河南周口人,硕士研究生,主要研究方向:图像分割。
  • 基金资助:
    福建省自然科学基金资助项目(GY?Z23014)。

Abstract:

Introduction of attention mechanisms allows the backbone network to learn more discriminative feature representations. However, traditional attention mechanisms control the complexity of attention by channel dimension reduction or decreasing channel number while increasing batch size, which leads to excessive reduction of the number of channels and loss of important feature information. To address this issue, a Channel Shuffle Attention (CSA) module was proposed. Firstly, group convolutions were used to learn attention weights to control the complexity of CSA. Secondly, the traditional channel shuffle and Deep Channel Shuffle (DCS) methods were used to enhance the exchange of channel feature information between different groups. Thirdly, inverse channel shuffle was used to restore the order of attention weights. Finally, the restored attention weights were multiplied with the original feature map to obtain a more expressive feature map. Experimental results show that on CIFAR-100 dataset, ResNet50 adding CSA reduces the number of parameters by 2.3% and increases the Top-1 accuracy by 0.57 percentage points compared to ResNet50 adding CA (Coordinate Attention), and has the quantity of computation reduced by 18.4% and the Top-1 accuracy increased by 0.27 percentage points compared with ResNet50 adding EMA (Efficient Multi-scale Attention). On COCO2017 dataset, YOLOv5s adding CSA improves the mean Average Precision (mAP@50) by 0.5 and 0.2 percentage points, respectively, compared to YOLOv5s adding CA and EMA. It can be seen that CSA achieves a balance between the number of parameters and the computational complexity, and improves the accuracy of image classification tasks and the localization capability of object detection tasks at the same time.

Key words: attention mechanism, group convolution, channel shuffle, image classification, object detection

摘要:

注意力机制的引入使得主干网能够学习更具区分性的特征表示。然而,为了控制注意力的复杂度,传统的注意力机制采用的通道降维或减少通道数而增加批量大小的策略会导致过度减少通道数和损失重要特征信息的问题。为解决这一问题,提出通道重洗注意力(CSA)模块。首先,利用分组卷积学习注意力权重,以控制CSA的复杂度;其次,通过传统通道重洗和深层通道重洗(DCS)方法,增强不同组间的通道特征信息交流;再次,使用逆通道重洗恢复注意力权重的顺序;最后,将恢复后的注意力权重与原始特征图相乘,以获得更具表达能力的特征图。实验结果表明,在CIFAR-100数据集上,与添加CA(Coordinate Attention)的ResNet50相比,添加CSA的ResNet50的参数量降低了2.3%,Top-1准确率提升了0.57个百分点;与添加EMA(Efficient Multi-scale Attention)的ResNet50相比,添加CSA的ResNet50的计算量降低了18.4%,Top-1准确率提升了0.27个百分点。在COCO2017数据集上,添加CSA的YOLOv5s比添加CA和EMA的YOLOv5s在平均精度均值(mAP@50)上分别提升了0.5和0.2个百分点。可见,CSA达到了参数量和计算量的平衡,并能够同时提升图像分类任务的准确率和目标检测任务的定位能力。

关键词: 注意力机制, 分组卷积, 通道重洗, 图像分类, 目标检测

CLC Number: