# Single-Task Joint Learning Model for an Online Multi-Object Tracking Framework
## 2 STJL Model Applied to Online Multi-Object Tracking
### Deep Feature Extraction
To ensure compact feature vectors, the softmax classifier training parameters were adjusted. By adding \(\ell_{2}\) normalization to the final layer, all feature vectors and weights were normalized to unit length, leading to the definition for the cosine softmax classifier:  
\[p(y=k|r)=\frac{\exp{(\mathcal{K}\widetilde{w_{k}}^{\top}r)}}{\sum_{n=1}^{C} \exp{(\mathcal{K}\widetilde{w_{n}}^{\top}r)}}, \tag{1}\]  
where \(\widetilde{w}\) is the network weight and \(\mathcal{K}\) is a learnable dimension weight. Equation (1) excludes the bias parameter \(b\), simplifying the model with fewer parameters. The cross-entropy from (1) remains the loss function for training. Figure 2(c) shows the decision boundary for the cosine softmax classifier. After training, all the sample vectors were normalized to the unit length; they not only moved away from the inter-category boundaries, but also converged towards their category's mean value, fulfilling metric learning objectives. Figure 3: Schematic illustration of the decision boundaries in classifier training: (**a**) distribution of training samples; (**b**) softmax; (**c**) cosine softmax. Different datasets serve various computer vision tasks. Most datasets focus on a single environment, limiting adaptability to challenges like lighting and occlusions. A universal feature extractor is crucial for tracking in diverse settings. The rise of smart surveillance and pedestrian re-identification research is increasing dataset availability, improving model training. STJL enhances adaptability by training on multiple datasets. For instance, combining Market-1501 [34], which lacks volume, with DukeMTMC-reID [35], rich in occluded images, improves the network's robustness against occlusions, boosting accuracy on Market-1501. To train the network using multiple datasets, assume there are \(K\) datasets. Each dataset contains \(N_{i}\) images with a total of \(M_{i}\) pedestrians. Thus, our total training dataset can be defined as \(TD=\{(x_{j}^{(i)},y_{j}^{(i)})_{j=1}^{N_{i}}\}_{i=1}^{K}\). In this context, \(x_{j}^{(i)}\) represents the \(j\)-th image in the \(i\)-th dataset, where \(y_{j}^{(i)}\) is the ID label of the \(j\)-th image in the \(i\)-th dataset. The label \(y_{j}^{(i)}\) belongs to the set \(\{1,2,\ldots,M_{i}\}\). When aiming to train with multiple datasets, the most intuitive approach is to employ multi-task learning. This entails training the network separately with distinct datasets. The learning loss can be defined as \(L_{loss}=\sum_{i=1}^{K}\sum_{j=1}^{N_{i}}\mathcal{L}(x_{j}^{(i)},y_{j}^{(i)})\), where \(\mathcal{L}\) is the loss function. However, this training approach might cause the network to overfit to one particular dataset, and the order of training datasets can also influence the final performance of the network. Data from various datasets were combined into an aggregated STJL dataset, with individuals re-labeled to ensure unique IDs across datasets for pedestrian re-identification. The new STJL dataset is represented as \(TD_{STJL}=\{x_{i},y_{i}\}_{i=1}^{N}\), where \(x\) represents the training images, \(N\) is the total number of training images of all datasets, and \(y\) denotes the re-labeled ID, which belongs to the set \(\{1,2,\ldots,\mathcal{M}_{new}\}\). \(\mathcal{M}_{new}\) is the aggregate number of IDs in the new dataset and is defined as \(\mathcal{M}_{new}=\sum_{i=1}^{K}ID_{i}\). \(ID_{i}\) represents the total number of IDs in the \(i\)-th dataset. The learning loss for the STJL dataset is refined to \(L_{loss}=\sum_{i=1}^{N}\mathcal{L}(x_{i},y_{i})\). Merging datasets into the STJL dataset enables the network to distinguish individuals both within and across datasets, enriching data and adding complexity by differentiating similar individuals, thus enhancing feature model training.