# Single-Task Joint Learning Model for an Online Multi-Object Tracking Framework
## 2 STJL Model Applied to Online Multi-Object Tracking
### Deep Feature Extraction  
Feature extraction is the key to linking trackers to detection boxes. Traditional algorithms using features often struggle to distinguish similar-looking objects owing to their simplicity. In contrast, our model leverages a CNN based on a residual network and is trained using cosine metric learning to capture complex pedestrian features across diverse contexts. By merging multiple pedestrian re-identification datasets into a unified STJL dataset, the model's generalization and object differentiation capabilities are enhanced. As the depth of CNNs increases, the feature accuracy improves but can lead to vanishing gradients. ResNet addresses this by introducing shortcut connections that skip layers, enhancing gradient propagation and preventing this issue. These connections help the network to learn residual functions, allowing for deeper stacking without hindering training. Each ResNet layer includes batch normalization, ReLU activation, and a 3 \(\times\) 3 convolution. In this study, a ResNet architecture with two convolutional layers, one max-pooling layer, six residual blocks, and a fully connected layer were used. A 1 \(\times\) 1 convolutional layer ensured consistent input and output dimensions across blocks for residual computation. Metric learning, often used to compare images, measures distances between elements through various distance functions and is optimized using techniques such as SVM, K-means, and k-NN. Although CNNs can use pre-training on datasets such as ImageNet or MS COCO, category mismatches can limit their effectiveness for image retrieval tasks such as pedestrian re-identification. Effective sampling strategies are crucial for training to  
Figure 2: Flow chart of tracking method. prevent mismatched data from hindering the convergence. Deep cosine metric learning simplifies and maintains the efficiency of the process. Deep cosine metric learning uses a network with both feature extraction and classification layers, but during testing, only the feature vectors are used, excluding the classification layer. In terms of the training dataset, each data point consists of a training image, denoted as \(x_{i}\), and its corresponding label, \(y_{i}\), which signifies the individual's ID. Given that \(y_{i}\) is part of a set comprising \(C_{i}\) total IDs, the network perceives each ID as a distinct category. The terminal layer of the network contains \(C\) neurons. When an image is fed into a network, it yields probability scores for every category. The softmax classifier computes the classification probability that is defined as \(p(y=k|r)=\frac{\exp{(m_{1}^{T}r+b_{k})}}{\sum_{n=1}^{C}\exp{(m_{n}^{T}r+b_{k})}}\), where \(r\) is the feature vector computed by the network's feature extraction layer, \(w\) represents the network weights of the final fully connected layer, and \(b\) is the bias term. \(p(y=k|r)\) denotes the computed probability score for the image belonging to category \(k\). After obtaining the probability scores for all categories, the loss function is defined as \(\mathcal{L}(\mathcal{D})=-\sum_{i=1}^{N}\sum_{k=1}^{C}\ell_{y_{i}=k}\cdot\log p (y_{i}=k|r_{i})\), where \(D\) represents the set of training images in the dataset, \(N\) is the total number of images in the dataset, and \(l\) refers to the label or class of the image, representing the object's unique ID. This loss function minimizes the cross-entropy between \(\ell_{y_{i}=k}\) and \(p(y=k|r)\). Ideally, the final chosen parameter \(\ell_{y_{i}=k}\) will approach \(1\) when the decision for \(y=k\) is correct, and it will tend towards \(0\) for other categories when \(y\
eq k\). Training solely with a standard softmax classifier may not optimize the feature vector distances for the same or different identities. Figure 2(a) shows a feature vector space with three categories. Ideally, as in Figure 2(b), the classifier should define clear decision boundaries. However, within-category feature vectors can still vary significantly and are not always aligned with the mean value of their category.