China Safety Science Journal ›› 2022, Vol. 32 ›› Issue (1): 127-134.doi: 10.16265/j.cnki.issn1003-3033.2022.01.017

• Safety engineering technology • Previous Articles     Next Articles

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

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