# Re-Identification in Urban Scenarios: A Review of Tools and Methods
## 5 Person Re-Identification
### Person Re-Identification Methods
#### 5.2.2 Deep Learning Metrics  
Deep learning metrics is one commonly used strategy that aims to learn the dissimilarity or similarity between two given objects. The main objective is to learn a projection mapping from the original image into the embedding feature space, enabling to determine the degree of similarity between two-person images. This helps with learning the discriminate features by the design of loss-specific functions for the DNN model. One standard metric corresponds to the contrast loss, which enables quantifying the similarity or dissimilarity between pairs of data, commonly used on the training of Siamese Networks, with the function expressed as:  
\[L_{c}=yd(x_{a}-x_{b})^{2}+(1-y)\Big{[}m-d(x_{1}-x_{b})^{2}\Big{]}_{+}, \tag{3}\]  
where \(\left[\cdot\right]_{+}=max(0,x)\), with \(x_{a}\) and \(x_{b}\) corresponds to the two image pairs of the Siamese Network, and a distance metric \(d(x_{a},x_{b})\), usually the Euclidean distance, quantifies the degree of similarity among the pairs, \(m\) corresponds to a training parameter, and \(y\) is the corresponding matching label. When \(y=1\) the two input images belong to the same ID (positive sample pair); on the other hand, when \(y=0\), it reflects the opposite case (negative sample pair). One example of a Siamese Network for person ReID is explored by [43], by applying different distance metrics to corresponding feature maps. Defined as MSP-CNN, the approach starts by using image pairs as network input, with all images going through the same share-weighted deep CNN network, formed by small convolution filter layers followed by a simple inception module [44]. To attain the distinct characteristics from the diverse feature maps, similarity constraints are applied to both low-level and high-level feature maps during the training stage to effectively learn discriminative feature representations at different levels. The objective function was designed to emphasize low-level features that are frequently related to schoolbags, T-shirts, and higher-level special textures, which are shared among persons from the same personality to propagate those relevant features to the upper layers. At the higher-level feature maps, a Euclidean distance after L2 normalization [45] is used to represent the abstract global similarities. The approach enables the CNN to extract robust feature representations without any complicated distance metric to be learned in the process, contrary to those found in more traditional hand-crafted systems. This enables easily incorporating constraints, forming a  
Figure 5: Performance summary of the evaluated feature learning methods. unified multi-task network with similar constraints. Model evaluations were conducted using the CUHK03 [46] and Market-1501 [47] datasets, and the small CUHK01 dataset [48], being evaluated by the use of the CMC metric. Results on the CUHK03 dataset show that the proposed model achieved an CMC Rank-1 accuracy of 85.7% when using manual hand-labeled object boxes, and 83.6% when using a deformable parts model detector for object extraction. While the proposed model obtains competitive results, it still requires some degree of human annotation to achieve good performance. A novel filter pairing neural network (FPNN) was proposed by [46], which is composed of six layers to jointly handle misalignment, photometric and geometric transforms, occlusions, and background clutter in person ReID tasks. The network was initially composed by a convolution and max-pooling layer that operated on two pair of RGB or Lab Color space (LAB) images from different cameras, generating the responses from local patches as local features. Each feature map is partitioned into \(H_{1}\times W_{1}\) stripe sub-regions, and only the maximum response in each sub-region is taken into account, with the max-pooling layer outputting a \(H_{1}\times W_{1}\times K_{1}\) feature map. The computed feature maps are processed by a patch matching layer to match the filter responses from local patches across the different views.