# Margin CosReid Network for Pedestrian Re-Identification
## 4 Experiment
### Experimental Results and Analysis
#### 4.2.2 The Proposed MCSL  
In this section, we conduct experiments to discuss the efficiency of the proposed margin cosine loss (MCSL) function. Figure 5 demonstrates the mean training loss curves from 5 runs of the three functions, i.e., softmax, CSL, and MCSL optimized by [PERSON] [48] and stochastic gradient descent (SGD) on the Market-1501 dat \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Market-1501**} & \multicolumn{4}{c}{**DukeMTMC-reID**} \\ \hline
**Network** & \multicolumn{2}{c}{**Softmax**} & \multicolumn{2}{c}{**CSL**} & \multicolumn{2}{c}{**MCSL**} & \multicolumn{2}{c}{**Softmax**} & \multicolumn{2}{c}{**CSL**} & \multicolumn{2}{c}{**MCSL**} \\ \hline  & rank-1 & mAP & rank-1 & mAP & rank-1 & mAP & rank-1 & mAP & rank-1 & mAP & rank-1 & mAP \\ \hline Net-A & 62.9 & 34.6 & 74.3 & 48.3 & 77.3 & 51.6 & 56.8 & 31.6 & 61.1 & 35.6 & 65.1 & 37.8 \\ Net-B & 75.1 & 51.0 & 85.9 & 66.7 & 86.8 & 68.4 & 69.7 & 43.5 & 76.0 & 51.6 & 77.9 & 59.8 \\ Net-C & 78.4 & 54.4 & 87.3 & 67.3 & 88.9 & 70.5 & 76.7 & 59.1 & 78.3 & 57.5 & 78.6 & 60.0 \\ GBNeck & 81.7 & 57.9 & 87.4 & 69.2 & **91.0** & **75.9** & 77.8 & 59.9 & 79.3 & 61.0 & **81.1** & **64.6** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Rank-1 and mAP of the four network frameworks. Bold fonts denote the highest values. Figure 4: The mean training loss curves from 5 runs of MCSL with the backbone ResNet50 and GBNeck on the Market-1501 dataset. The horizontal and vertical coordinates represent the iteration number and the loss value, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Market-1501**} & \multicolumn{2}{c}{**DukeMTMC-reID**} \\ \hline  & rank-1 & mAP & rank-1 & mAP \\ w/ downsampling layer & **91.0** & **75.9** & **81.1** & **64.6** \\ w/o downsampling layer & 86.3 & 68.3 & 76.4 & 56.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Influences on rank-1 and mAP of the downsampling layer. w/and w/o denote that the downsampling layer is and is not removed, respectively. Bold fonts denote highest values. of softmax loss function optimized by [PERSON] and SGD decline slowly after the 20 th and 15 th iterations, respectively. Comparatively, the convergence of CSL in the early stage is accelerated due to the cosine space mapping, but it converges slowly in after the 25 th iterations. The curve of MCSL optimized by [PERSON] vibrates greatly in the final training stage, showing a clear confrontation between MCSL and Adam [49]. MCSL optimized by SGD can suppress the inconsistency and achieve a high accuracy from Figure 5, so we use SGD to optimize our training model in this paper. In this paper, experiments are performed on the selection of the loss parameters \(s\) and \(m\) in Equation (4). The scaling parameter \(s\) in the proposed MCSL controls the dependence degree of the loss to the cosine space, which cannot be adaptively learned to prevent slow network convergence and relatively difficult optimization. As shown in Figure 5(a), we found that if \(s\) is set too small, the loss will decrease slowly and may not even converge. Therefore, \(s\) is set to a larger value in this paper for better performance and training loss reduction. In addition, the margin parameter \(m\) can also be selected, as shown in Figure 5(b). We set \(m\) to 0.35 in our paper because of the highest accuracy in both the Market-1501 and DukeMTMC-reID datasets. Figure 5: The mean training loss curves from 5 runs of softmax, CSL, and MCSL optimized by [PERSON] and SGD on the Market-1501 dataset. The horizontal and vertical coordinates represent the iteration number and the loss value, respectively. Figure 6: Influence of parameters. Subfigure (**a**) indicates loss convergence with different scaling factors \(s\) on Market-1501. The horizontal and vertical coordinates represent the iteration number and the loss value, respectively. Subfigure (**b**) indicates the accuracy of the MCSL with different margin parameters \(m\) on Market-1501 and DukeMTMC-reID.