## 2 Related Work
### The Processing of the DeepSORT  
The overall DeepSORT process involves the detection, estimation, data association, and creation and deletion of tracked identities. **Detection**: The DeepSORT model uses YOLOv3 architecture for pedestrian detection. Because the detection objects in this study are pedestrians, other objects are ignored, and only objects that are more than 50% likely to be pedestrians are considered. **Estimation**: The pedestrian's description is to enter the motion of its representation and propagation target in the next frame. First, the model uses the Kalman filter to predict the state model (including size and position) of a pedestrian detected at time \(T\) at time \(T+1\). DeepSORT expresses the state model of the pedestrian as eight values \((u,v,r,h,\dot{x},\dot{y},\dot{r},\dot{h})\), as follows:  
\[\mathrm{x}=(u,v,r,h,\dot{x},\dot{y},\dot{r},\dot{h})^{T} \tag{2}\]  
where (\(u\), \(v\)) and (\(r\), \(h\)) are the coordinates of the pedestrian's center and the aspect ratio and height of the bounding box of the pedestrian at time \(T\), respectively. At time \(T\), the Kalman filter is used to predict the pedestrian's position at time \(T+1\). \(D_{T+1,1}\), represents the predicted position \((\dot{x},\dot{y},\dot{w},\dot{h})\) of the pedestrian at time \(T+1\), where \((\dot{x},\dot{y},\dot{w},\dot{h})\) are the coordinates, length, width, and height, respectively, of the pedestrian's center at time \(T+1\). When a pedestrian is detected, the \((\dot{x},\dot{y},\dot{w},\dot{h})\) values are updated to reflect the target state of the pedestrian. If no pedestrian is detected, the predictive model is not updated. **Pedestrian feature extraction**: The trained CNN model, which contains two convolution layers, a max pooling layer, and six residual layers, is used to extract the features ofeach pedestrian at time \(T+1\), which are output as a 512-dimensional feature vector. The feature vector of the \(j\)th pedestrian at time \(T+1\) is expressed as \(f_{j}^{T+1}\). **Data association**: The pedestrian region \((\dot{u},\dot{v})\) at time \(T\) is the predicted new position of the pedestrian at time \(T+1\). Thereafter, the Mahalanobis distance between the pedestrian region at time \(T\)\(\mathrm{O}(\dot{x},\dot{y},\dot{w},\dot{h})_{i}^{T+1}\) and the region of the \(i\)th pedestrian at time \(T+1\)\(\mathrm{O}^{\prime}(\dot{x},\dot{y},\dot{w},\dot{h})_{j}^{T+1}\) is calculated as follows:  
\[\Delta d_{1}(i,j)=\min\biggl{[}{\mathrm{(O}_{i}^{T+1}-\mathrm{O}_{j}^{T+1})}^{ T}S_{i}{}^{-1}{\mathrm{(O}_{i}^{T+1}-\mathrm{O}_{j}^{T+1})},\;i,j=1,2,\ldots,n \biggr{]} \tag{3}\]  
First, \((\dot{x},\dot{y},\dot{w},\dot{h})\) is converted into \((\dot{x},\dot{y},\dot{r},\dot{h})\), where \((\dot{x},\dot{y})\) represents the coordinates of the pedestrian's center, \(\dot{r}\) is the aspect ratio of the pedestrian, and \((\dot{h})\) is the height of the pedestrian. \(\mathrm{O}^{\prime}(\dot{x},\dot{y},\dot{r},\dot{h})_{i}^{T+1}\) represents the new position of the \(i\)th pedestrian at time \(T+1\), \(\mathrm{O}(\dot{x},\dot{y},\dot{r},\dot{h})_{j}^{T+1}\) represents the new location of the \(j\)th pedestrian at time \(T+1\), \(S_{i}^{-1}\) is the covariance matrix of the \(i\)th pedestrian, and \(n\) is the total number of pedestrians at time \(T+1\). The detection index based on Mahalanobis distance can be used to obtain the optimal match. The \(\chi^{2}\) distribution and its 95% confidence interval are used as the detection threshold value, which was 9.4877 in the present study. The Mahalanobis distance is suitable for movement positions that produce low uncertainty regarding the pedestrian's position. The state distribution of a pedestrian is predicted using a frame, and the pedestrian's position in the next frame is obtained using the Kalman filter. This method only provides an approximate position, and the positions of pedestrians that are obstructed or moving quickly will not be correctly predicted.