# Person Re-Identification across Data Distributions Based on General Purpose DNN Object Detector
## 5 Experimental Results
### Results
We compute both the mean Average Precision (mAP) and the F-score in order to determine the performance of our method. While mAP considers only positive detections (true positives and false positives), F-score is calculated based on mAP and recall. Accordingly, it also takes the false negative detections into account. The F-score represents the harmonic average of the two scores, being calculated with Equation (31). This score is used in deep learning to measure the accuracy of a model on a given database. \[\text{F-score}=2\cdot\frac{\text{mAP}\cdot\text{recall}}{\text{mAP}+\text{ recall}} \tag{31}\]  
The tests that are described in Table 6 were realized on a dataset formed by 2800 images. From 2800 images, there were 6276 appearances of persons belonging to 621 classes. The main reason for this first test was to identify the best values for the learning rate and momentum. Of the 40 neural networks trained and tested, some did not converge. For this reason, only 13 neural networks are shown in Table 6. These are the networks that have managed to converge and optimize the classification problem. In order to differentiate the networks, each received a unique ID. This is represented in the first column of the table. While we followed the variation of the mAP and its comparison with other existing methods, the best model in terms of the total performance was chosen based on the F-score's value. Following the first test results, it was concluded that the CNN with \(ID=5\) leads to the highest performance (as marked in Table 6). For this reason, the following tests are performed while using this CNN architecture: \(LR=10^{-4}\), \(momentum=0.91\), and \(batch\_size=64\). Furthermore, we focused on training this particular network over a more extended period in order to see how it behaves. Figure 10 shows the obtained results. After we trained our proposed model, we tested it using Rank1, Rank5, Rank10, and Rank20. Our proposed method achieves an Rank-20 accuracy of up to 0.72. As the rank increases, so does the performance of the model. However, it also increases both the computational complexity and running time. Thus, Rank-5 offers a good compromise. For each test presented, we computed the results while using different thresholds. We varied the threshold in the range \((0,1]\), using a step \(\Delta=0.01\). Figure 11 shows the evolution of the threshold when training the proposed CNN. This parameter represents the minimum distance from which the algorithm separates two classes. Thus, the distance between two embeddings belonging to different classes is reduced. Once the threshold is low, both the intra-class and inter-class variations are reduced, and the method does not efficiently separate different classes. Once the threshold increases, the inter-class variation increases, and the neural network is more accurately learning the differences between the characteristics of each class. In the proposed method, we trained the network while using triplet loss optimization, with a value margin of 0.2. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**NETWORK** & **LEARNING** & **MOMENTUM** & **EPOCHS TRAINED** & **mAP** & **F-Score** \\ \hline
34 & \(10^{-5}\) & 0.98 & 10,000 & 0.480484 & 0.576851 \\  & & & 20,000 & 0.570223 & 0.599062 \\  & & & 30,000 & 0.51923 & 0.545269 \\ \hline
39 & \(10^{-6}\) & 0.99 & 10,000 & 0.311738 & 0.475305 \\  & & & 20,000 & 0.372743 & 0.472351 \\  & & & 30,000 & 0.428161 & 0.557936 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: \(Cont.\)Ideally, the threshold will tend toward the margin value. In our case, the threshold tends to 0.23 as the training progresses, as can be seen in Figure 11.  
Next, in Figures 12 and 13, the system's evolution is presented in terms of the mAP and F-score. The evolution of the F-score is closely related to one of the thresholds. As the number of training epochs increases, the maximum value of the score also increases. Furthermore, the maximum point of the function changes and it tends to the threshold's optimal value (0.2).