中国安全科学学报 ›› 2022, Vol. 32 ›› Issue (1): 127-134.doi: 10.16265/j.cnki.issn1003-3033.2022.01.017

• 安全工程技术 • 上一篇    下一篇

基于注意力机制的人群计数方法

吴思(), 张旭光, 方银锋   

  1. 杭州电子科技大学 通信工程学院,浙江 杭州 310018
  • 收稿日期:2021-10-14 修回日期:2021-12-12 出版日期:2022-01-28 发布日期:2022-07-28
  • 作者简介:

    吴思(1996—),女,江西抚州人,硕士研究生,研究方向为图像处理、人群拥挤安全评估。E-mail:
    张旭光 教授,方银锋 教授

  • 基金资助:
    国家自然科学基金资助(61771418)

Method of crowd counting based on attention mechanism

WU Si(), ZHANG Xuguang, FANG Yinfeng   

  1. School of Communication Engineering, Hangzhou Dianzi University, Hangzhou Zhejiang 310018, China
  • Received:2021-10-14 Revised:2021-12-12 Online:2022-01-28 Published:2022-07-28

摘要:

为准确预测固定场景中的人群计数,在人群分析领域,采用一种融合注意力机制的卷积神经网络(CNN)进行人群计数,该模块结合空间域注意力和通道域注意力,空间域注意力可以编码整个图像的像素级上下文信息,以更准确地表达像素级别的密度图,而通道域注意力可以在不同的通道中提取更多的区分特征使网络显著表达人群的局部区域,并在多个公开数据集上进行测试。结果表明:基于注意力机制的人群计数方法可以准确地估计拥挤场景中的人群数量,在平均完全误差和均方误差上均优于CSRNet。

关键词: 注意力机制, 人群计数, 空间域注意力, 通道域注意力, 密度图

Abstract:

In order to accurately predict crowd count in a fixed scene, in the field of crowd analysis, a convolutional neural network (CNN) integrating attention mechanism was adopted, which combined spatial domain attention and channel domain attention. The former could encode pixel-level context information of the entire image to express pixel-level density map more accurately, while the latter could extract more distinguishing features in different channels to significantly express local area of the crowd. Through tests on multiple public data sets, it is found that the crowd counting method based on attention mechanism can accurately estimate number of people in crowded scenes, and it proves better than CSRNet in terms of mean absolute error and mean square error.

Key words: attention mechanism, crowd counting, spatial domain attention, channel domain attention, density map