## 1 Introduction  
Recently, the recognition and analysis of images based on computer vision technology has attracted much attention and is being applied in various industries. The performance improvement of various processors and the development of deep neural networks have resulted in great progress being made in image recognition technology. Diverse sources of information on people and location, such as passenger flow statistics at schools, stations, piers, airports, and other public places, are needed for a number of applications. In school contexts, for example, students' in- and out-of-school statistics, class student attendance statistics, and concentration statistics [1] can assist teaching management. Sometimes, large numbers of people gather in in stations, wharves, airports, scenic spots, and other public places, making these areas prone to traffic jams and even safety accidents. Around the world, death and injury events often occur due to people gathering. For example, on 29 September 2017, a stampede accident occurred at the Elphinstone railway station in Mumbai, India, resulting in at least 22 deaths and five serious injuries [2]. In the early morning of 30 April 2021, a stampede occurred at a rally in northern Israel. The accident has killed at least 45 people [3]. Currently, many places have not yet set up automatic personnel counting systems, and the number of people in an area is often counted by the security staff, so the data cannot be calculated and communicated efficiently and cannot effectively prevent accidents in advance. At present, when using target detection systems to detect the number of people, real-time speed can be reached through the improvement of hardware and algorithms, but the detection accuracy of systems needs to continue to improve. If there is a large negative deviation in people statistics, it will lead to low resource utilization efficiency. Conversely, if there is a large positive deviation, it will still lead to an excessive concentration of people and safety accidents. Higher accuracy levels result in better and more accurate auxiliary strategies being obtained. In this paper, a people counting system based on deep learning is implemented to detect the number of human heads so that the number of people can be obtained in real time. In this way, the method can realize auxiliary traffic control and reduce safety accidents caused by too many people. Typical representatives of traditional algorithms include the Haar feature [4], the AdaBoost algorithm [5], the HOG feature [6], SVM algorithms [7], and the DPM algorithm [8], among others. Traditional target-detection methods not only require complex calculations and have low efficiency, but they also cannot adapt well to various feature changes. In recent years, as a research hotspot of computer vision, target detection technology has made great breakthroughs in target detection algorithms. The limitations of target detection methods based on traditional machine learning are becoming more and more obvious. Therefore, as deep learning continues to develop [9], target detection algorithms based on deep learning continue to emerge, and their detection effects are also greatly improved compared to traditional methods. Classical convolutional neural network models include the LeNet model proposed by [PERSON] et al. [10], the AlexNet model proposed by [PERSON] et al. [11], the GoogleLeNet model proposed by [PERSON] et al. [12], the VGG model proposed by [PERSON] et al. [13], and the Resnet model proposed by [PERSON] et al. [14]. SSD was proposed by [PERSON] during ECCV 2016 [15]. [PERSON] et al. proposed a two-stage model that included R-CNN [16], fast R-CNN [17], and faster R-CNN [18]. YOLO [19; 20] is another framework that has been proposed to solve the problem of target detection speed after the implementation of faster R-CNN. The author of the YOLO series (v1-v3) is [PERSON].