# Metric Embedding Learning on Multi-Directional Projections
## 4 Results
### Object Re-Identification
\begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Architecture**} & \multirow{2}{*}{**Pretraining**} & \multirow{2}{*}{**Mining**} & \multicolumn{8}{c}{**N-Way**} \\ \cline{3-13}  & & & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** & **10** \\ \hline Siamese & Yes & & 100.0 & 91.8 & 83.5 & 79.4 & 76.1 & 74.0 & 71.3 & 65.8 & 66.5 & 65.6 \\ Triplet & Yes & Semi-hard & 100.0 & 94.3 & 88.2 & 84.5 & 82.9 & 78.7 & 76.1 & 74.1 & 70.0 & 71.1 \\ Triplet & Yes & Hardest & 100.0 & 93.2 & 89.3 & 83.0 & 81.2 & 78.7 & 72.7 & 72.0 & 73.2 & 70.7 \\ Siamese & No & & 100.0 & 82.9 & 76.0 & 70.3 & 67.7 & 66.0 & 62.0 & 58.1 & 56.7 & 55.1 \\ Triplet & No & Semi-hard & 100.0 & 94.8 & 90.2 & 88.6 & 82.9 & 81.0 & 81.5 & 74.9 & 74.8 & **75.7** \\ Triplet & No & Hardest & 100.0 & 92.8 & 87.4 & 82.4 & 80.2 & 73.4 & 70.4 & 69.3 & 65.9 & 61.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The performance of each method for metric learning on the vehicle re-identification dataset, given by the one-shot classification accuracy. For each setup, 1000 one-shot classification tasks were evaluated on the test subset. Figure 8: Sample images from the Automatic Traffic Surveillance Workshop on CVPR2016 [66]. All vehicles are recorded from two slightly different viewpoints. The dataset also contains annotation information that can be used to extract observations. Figure 9: Samples of the dataset prepared using the data presented in [66]. Vehicle images are cropped to square, and transformed using the MDIPFL projection mapping. Subfigures (**a,b**) represent different observations of the same instance. Subfigure (**c**) shows a sample of a different instance. When training, the effects of pretraining are less significant. Figure 10 shows, that Siamese networks were able to reduce contrastive loss over time, while triplet loss, regardless of semi-hard or hardest negative mining, convergence of loss stopped around value \(\sim\)0.1. It is notable, that while uninitialized SNN training took more time and steps when compared to the other methods, however all other approaches outperformed this method. The highest performance is measured when applying triplet architecture with semi-hard negative selection. While the hardest selection helps on the training data, semi-hard mining generalizes training effectively. On 10-way one-shot classification, the model trained only with triplet loss on semi-hard negatives achieves a decent performance of 75.7%. As a further representation on model performance along with one-shot classification accuracy, t-SNE (t-Distributed Stochastic Neighbor Embedding) [67] is applied to reduce embedded vector dimensionality into 2D space. Figure 11 exhibits the effectiveness of the proposed method. As a baseline, t-SNE is also applied to an untrained network, resulting in randomly distributed points. Figure 11: t-SNE [67] based visualization of the 128-dimensional embedding vectors from the test dataset in two-dimensions. Subfigure (**a**) illustrates the point-cloud before training, while subfigure (**b**) visualizes it afterwards. For the transformation perplexity was set to 30 and the learning rate to 200. Figure 10: Loss over time when training ResNet-18 using the MDIPFL50 transforms of the extracted samples of the ATS-CVPR2016 dataset. Subfigure (**a**) shows the linear pretraining loss, while subfigure (**b**) visualizes the contrastive and triplet loss over iterations for different setups.