# Improved DeepSORT Algorithm Based on Multi-Feature Fusion
## 2 Analysis of Related Algorithms  
### Pedestrian Multi-Objective Tracking Algorithm  
The DeepSORT tracking method is a single-hypothesis target-tracking algorithm based on the Hungarian algorithm and Kalman filter algorithm. The state information of the target is represented by \((x,y,\gamma,h,v_{x},v_{y},v_{\gamma},v_{h})\), where \((x,y)\) are the target's center coordinates, \(\gamma\) is the target's width-to-height ratio, \(v_{x},v_{y},v_{\gamma},v_{h}\) is the moving speed of \(x,y,\gamma,h\); a Kalman filter algorithm was introduced to predict the location of the track in the detection space, and a Hungarian matching algorithm was adopted to match the detection with the tracking. When matching the target trajectory and detection, the cascade-matching approach is used. In the matching process, appearance information and motion information are combined to form a new measurement matrix to judge the matching degree between detection and trajectory. Appearance information is extracted by a simple convolution neural network, and then features are obtained using a simple convolution neural network to extract the feature matrix \(r_{j}\) in each pedestrian-detection frame. All the appearance information for the last 100 frames of the track is stored in \(R_{i}\), with the feature matrix in each frame of the track being \(r_{i}\). The minimum distance between the \(i\)th pedestrian trajectory feature and the\(j\)-th pedestrian detection feature is calculated by the following Equation (1):  
\[d^{(1)}_{(i,j)}=\min\Bigl{\{}1-r_{j}^{T}r_{i}^{(k)}\Bigr{|}r_{i}^{(k)}\in R_{ i},k\in(1,100)\,\Bigr{\}} \tag{1}\]  
A control threshold \(t^{(1)}\) is introduced to the appearance distance to determine whether the two can be related, and is calculated using Equation (2):  
\[b^{(1)}_{(i,j)}=\left\{ \begin{array}{l}1,d^{1}_{(i,j)}\leq t^{(1)}\\ 0,d^{1}_{(i,j)}>t^{(1)}\end{array} \right. \tag{2}\]  
When the \(i\) track matches the \(j\) detection, the result is 1; otherwise it is 0. Motion information is expressed as the square value of the Mahalanobis distance [14] between the predicted and detected locations of the Kalman trajectory and is calculated by Equation (3):  
\[d^{(1)}_{(i,j)}=(d_{j}-y_{i})^{T}S^{-1}_{i}(d_{j}-y_{i}) \tag{3}\]where \(y_{i}\) represents the projection of the predicted value of the \(i\)th track in the detection space, \(d_{j}\) represents the \(j\)th detection target in the current detection space, and \(S_{i}\) represents the covariance matrix of the \(i\)th track in the detection space. The detection control threshold \(t^{(2)}\) is also set to determine whether the detection needs to be excluded and is calculated by Equation (4):  
\[b^{(2)}_{(i,j)}=\left\{ \begin{array}{ll}1,d^{(2)}_{(i,j)}\leq t^{(2)}\\ 0,d^{(2)}_{(i,j)}>t^{(2)}\end{array} \right. \tag{4}\]  
The weighted sum of the Mahalanobis distance based on motion information and cosine distance based on pedestrian appearance characteristics are used to form a new measurement, calculated by Equation (5):  
\[c_{i,j}=\lambda d^{(1)}_{(i,j)}+(1-\lambda)d^{(2)}_{(i,j)} \tag{5}\]  
In association, Equation (6) is a gated matrix that determines whether two measures are in the selected region. \[b_{i,j}=\mathop{\Pi}\limits^{2}_{m=1}b^{(m)}_{(i,j)} \tag{6}\]  
The matching task can only be completed when both the appearance distance measure and the location distance measure pass through the selected area. The DeepSORT algorithm uses cascade matching and crossover matching to match the new detection method to the trajectory predicted by the Kalman filter algorithm, and iterates repeatedly to complete the target matching process. The DeepSORT algorithm has a significant performance improvement over the SORT algorithm for pedestrian target tracking. During tracking, the feature extraction network has a great impact on the accuracy and richness of pedestrian target feature appearance information extraction and has a huge impact on the tracking effect.