电子科技 ›› 2022, Vol. 35 ›› Issue (12): 57-63.doi: 10.16180/j.cnki.issn1007-7820.2022.12.008

• • 上一篇    下一篇

基于上下文注意力机制的实时语义分割

于润润,姜晓燕,朱凯赢,蒋光好   

  1. 上海工程技术大学 电子电气工程学院,上海 201620
  • 收稿日期:2021-05-13 出版日期:2022-12-15 发布日期:2022-12-13
  • 作者简介:于润润(1995-),男,硕士研究生。研究方向:计算机视觉、语义分割。|姜晓燕(1985-),女,博士,副教授。研究方向:计算机视觉、人工智能。
  • 基金资助:
    国家自然科学基金(61702322)

Real-Time Image Semantic Segmentation Based on Contextual Attention Mechanism

YU Runrun,JIANG Xiaoyan,ZHU Kaiying,JIANG Guanghao   

  1. School of Electronic and Electrical Engineering,Shanghai University of Engineering Science, Shanghai 201620,China
  • Received:2021-05-13 Online:2022-12-15 Published:2022-12-13
  • Supported by:
    National Natural Science Foundation of China(61702322)

摘要:

针对实时语义分割网络提取的特征缺少上下文信息,易造成分割结果出现类内不一致和类间不可区分的问题,文中提出了轻量级的自适应通道注意力模块和空间注意力模块。自适应通道注意力模块使用深度分离卷积对通道层面的特征依赖关系进行建模,自适应地调整通道卷积核大小,强化高层特征的上下文表征能力,加强了分割结果的类内一致性。空间注意力模块使用分组卷积,以较小的计算量获得较大的特征信息流动区域,在空间层面加强特征的上下文联系,增强特征的空间细节信息,加强了分割结果的类间可区分性。在Cityscapes数据集上的测试与分析表明,轻量级上下文注意力机制获得了71.5%的mIoU。

关键词: 注意力机制, 语义分割, 多分支结构, 信息融合, 深度学习, 分组卷积, 类间差别, 类内一致

Abstract:

To address the problem that feature extracted by real time semantic segmentation model lacks contextual information, which causese inconsistent segmentation results between and within classes, a lightweight adaptive spatial attention model and channel attention model are proposed in this study. The adaptive channel attention module uses depthwise separable convolution to model the channel-level feature dependencies, adaptively adjusts the channel convolution kernel size, strengthens the contextual representation ability of high-level features, and enhances the intra-class consistency of segmentation results. The spatial attention module uses grouped convolution to obtain a larger flow area of feature information with a small amount of calculation, strengthens the contextual connection of features at the spatial level, enhances the spatial detail information of features, and enhances the inter-class distinguishability of segmentation results. Testing and analysis on the Cityscapes data set show that the lightweight contextual attention mechanism achieves 71.5% mIoU.

Key words: attention mechanism, semantic segmentation, multi-branch structure, information fusion, deep learning, grouped convolution, inter-class variation, intra-class consistency

中图分类号: 

  • TP391