China Safety Science Journal ›› 2023, Vol. 33 ›› Issue (3): 111-117.doi: 10.16265/j.cnki.issn1003-3033.2023.03.0784

• Public safety • Previous Articles     Next Articles

Research on weakly supervised crowd counting based on Swin Transformer

RAN Ruisheng(), LI Jin, DONG Shuhong   

  1. College of Computer & Information Science, Chongqing Normal University, Chongqing 401331, China
  • Received:2022-10-16 Revised:2023-01-09 Online:2023-03-28 Published:2023-11-28

Abstract:

In order to reduce the probability of safety accidents caused by crowd gathering, research is carried out on the crowd counting task. For the problem of the high data labeling cost of the full supervision method and poor performance of the existing weak supervision method, a weak supervision crowd counting model based on Swin Transformer is designed. First, a Transformer model with a global receptive field and the ability to effectively extract semantic crowd information was introduced to deal with the problem of the limited receptive field and poor performance of the weakly supervised crowd counting method based on CNN. Then, a hierarchical design was adopted. The Swin Transformer model with multi-scale and hierarchical computing image features was used as the backbone network to strengthen the learning of different scale features, so that the model can better deal with the problem of crowd scale changes. Finally, the selection only needs the number of people as supervisory information. Weakly supervised training of information, avoiding the tedious and error-prone work of labeling each person's head in the image. The results show that the average absolute error of the method in this paper on ShanghaiTech Part A, ShanghaiTech Part B, and UCF-QNRF datasets is 66.1, 8.7, and 97.1, and the mean square error is 106.2, 14.9, and 165.8, which is better than the previous weakly supervised method and partially fully supervised methods.

Key words: Swin Transformer, weakly supervised, crowd counting, convolutional neural network(CNN), datasets