## 2 Related Work  
The pedestrian flow statistics algorithm mainly includes three steps: pedestrian detection, multi-target tracking and pedestrian counting. Current fast pedestrian detection methods are mainly divided into two categories. The first is pedestrian detection method based on background modeling, which mainly relies on the background modeling method to extract the foreground moving object, and uses classifier to judge whether the moving object is a pedestrian. GMM algorithm [13] and vibe algorithm [14] are the most representative. This kind of algorithm is fast in speed, but it cannot cope with the change of illumination and the jitter of camera very well. At the same time, it is difficult to distinguish dense objects or objects that are occluded from each other. The second kind of pedestrian detection algorithm is based on statistical learning. The algorithm has high accuracy and can cope with occlusion and environmental changes to a certain extent. The HOG + SVM [15] proposed by [PERSON] et al. is the most classical algorithm of this kind. Because of the popularity of deep learning methods in recent years, the accuracy of pedestrian detection algorithm based on convolutional neural network has reached an unprecedented height [16]. Detection methods based on deep learning can be divided into two-stage method and one-stage method. Faster R-CNN proposed by [PERSON] [17] and its subsequent variants [18; 19] belong to the two-stage method, which has advantages in detection and positioning accuracy. [PERSON] et al. 'sSSD detection algorithm [20] and its subsequent variants [21; 22] belong to one-stage algorithm, which achieves good accuracy and better real-time performance. Multi-objective tracking methods can be divided into DBT (detection-based-tracking) methods and DFT (detection-free-tracking) methods based on initialization method. DFT methods needs to label the targets manually, and then track them in subsequent frames [23; 24]. DBT methods completes tracking by detecting the targets in each frame and putting the targets into the tracklets [25; 26; 27]. DBT methods are more suitable for pedestrian traffic statistics applications because of the frequent appearance of new targets and the frequent disappearance of old ones. At the same time, according to the processing mode, multi-target tracking methods can be divided into online and offline algorithms. Online algorithm only uses the current frame of image sequence and several previous frames [28; 29], which is more suitable for applications that need real-time implementation. The offline algorithm needs to use some future frames in the image sequence [30; 31], which is more suitable for post-analysis and processing of video. Appearance model is widely used in the field of multi-target tracking. The appearance model has an important role in associating tracklets and detections. With the help of the appearance model, the ID scitches can be effectively suppressed. [PERSON], [PERSON] et al. proposed a multi-target tracking method establishing appearance model with HoG descriptor [32]. [PERSON], [PERSON] et al. proposed a deep appearance learning method to learn a discriminative appearance model which can distinguish multiple objects with large appearance variations [33]. At the same time, the motion model has the same important role as the appearance model. Since the motion of the target in the image is usually relatively flat, the estimation of the trend of the target motion can predict the position of the target in the next frame, thus reducing the search area and even directly obtaining the tracking results. The pedestrian counting method was originally road marking method. In this method, a mark is set on the road surface, and when the mark is covered, a pedestrian is judged to pass. Then [PERSON] et al. proposed a counting method based on virtual lines [34]. The main idea is that when the target center passes through the virtual line, a pedestrian is judged to pass through.