## 5 Discussion  
In the fields of transportation, education, and commerce, among others, there is a great demand for to know the flow statistics of people to assist in decision making, but  
Figure 8: Original drawing of brainwash dataset: (**a**) test image with 18 people; (**b**) test image with 16 people. Figure 10: Test results with DPAC: (**a**) detection result with DPAC with 18 people; (**b**) detection result without DPAC with 16 people. Figure 9: Test results without DPAC: (**a**) Detection results with DPAC with 18 people; (**b**) detection result without DPAC with 16 people. conventional population statistics adopts the gate method, which involves people being counted once after they access the gate. This method is not only inefficient, but it also makes the detected people feel uncomfortable. Therefore, contactless statistics detection to determine the number of people in a space based on images is the direction of future development. Although there are many requirements for application scenarios, human number detection, which is based on images, is not widely used at present. The reason for this is that its detection recall and precision rates cannot meet people's needs. Therefore, improving the speed, detection recall, and detection precision of target detection system is the focus of current research on this topic. The YOLOv4 network is one of the best detection networks at present and can not only achieve real-time detection speed, but also has a high level of accuracy. Therefore, in this study, we chose to use the YOLOv4 network plus DPAC for the experiments and used the brainwash dataset as the head detection dataset. First, we propose using DPAC to optimize the detection network, which is composed of target distribution and the DPAC function. There are two ways to obtain the DPAC distribution: one is to calculate the distribution from the target label, and the other is through unsupervised learning, which can solve the problem of it being difficult to make the target label. The two distributions are compared through experiments, and the distribution obtained by the two methods is similar. After obtaining the distribution matrix, the DPAC adjustment matrix can be obtained by multiplying the DPAC function. Secondly, we used the brainwash dataset to train the network and to obtain the network model. Several DPAC functions were designed according to the characteristics of the distribution, and experiments were then carried out with the different DPAC functions using the trained YOLOv4 model. Some rules were followed during the experiments:  
1. DPAC can describe the distribution as being very low, low, high, and very high. 2. When the distribution is very low, multiply it by a factor less than one. 3. When the probability distribution is low, it indicates that the density in this area is low, that the target overlaps, and that the possibility of occlusion is small, so multiply it by a factor greater than one. 4. When the distribution probability is high, it indicates that the target in this area is highly likely to appear, so multiply it by a coefficient greater than 1. 5. When the distribution probability is very high, it is easier for high-density target groups to appear in this area. When the high-density target groups overlap, the possibility of occlusion is large, and there are more interference factors. Therefore, multiplying by a coefficient less than 1 is helpful to reduce FP. However, when the number of predictions obtained on the detected image is relatively small, it can be considered that there is no high-density target area on the image. These regions are similar to regions with a high probability distribution, meaning that they can be multiplied by a coefficient greater than one. In this paper, a network structure using YOLOv4 + DPAC is proposed, and experiments on brainwash datasets show that this network has more advantages than the previously established ReInspect, Opt (K-means), YOLO-OFLSTM, and pure YOLOv4 networks.