# Learning Part-Based Features for Vehicle Re-Identification with Global Context
## 2 Motivation and Related Works
### Vehicle Re-Identification Datasets  
A few vehicle re-identification datasets, like VeRi [5], VehicleId [8], VRIC [17], VeRi-Wild [18], CityFlow [19], PKU-VD [20], and ToyCars [21], have been developed for use in vehicle re-identification tasks. Most existing works report results on the VeRi and VehicleId datasets. Hence, we use these datasets in our experiments, which are described as follows:  
(a) VeRi Dataset: This dataset contains 49,357 images of 776 vehicles captured by 20 cameras over a 1 sq km area. The images were captured in a real-world, unconstrained surveillance scene. Each vehicle was captured by 20 cameras from different viewpoints, under varying illuminations, and with different resolutions and occlusions. The training set comprises 575 vehicle identities, and the remaining images are used for testing. The test set comprises a query set and a gallery set. The query set includes only one image per vehicle identity, which is used to find matches in the gallery set. The vehicle identities of the training and test sets are different. Hence, no cross-validation is used during testing. (b) VehicleId Dataset: This dataset contains 221,763 images of 26,267 vehicles. Each vehicle image was captured from either the front or the back, i.e., from two different viewpoints. The training set contains 110,178 images of 13,134 vehicles. The test data are split into three subsets containing 800, 1600, and 2400 vehicles, with 7332, 12,995, and 20,038 images, respectively. The query set for each of the three test subsets contains one vehicle image for each vehicle identity, and the gallery set contains the rest of the vehicle images used to determine the match. In this dataset, the vehicle identities of the training and test sets are different; hence, cross-validation is not used during evaluation to ensure a proper comparison with the state of the art. Re-identification methods based on global and local feature learning are broadly divided into two categories:  
* Attribute-based models, which generally use a separate dedicated network for the identification of attributes or local parts. * Part-based models, which use single or multiple branches to extract local features with different schemes of partitioning. These methods may or may not include a global branch that learns the global features. Single-branch models are inherently less complex than multi-branch models due to their smaller number of convolutional layers. In this section, we first review the existing works on VReID in the literature that use either global, local, or a combination of the two feature learning methods. Methods for learning attributes utilize a wide variety of techniques for feature extraction. A joint approach for learning deep features along with attributes such as camera view, vehicle color, and vehicle type was proposed by [PERSON] et al. [22]. In another work, a single-stage, single-shot detector is used to detect regions of interest in vehicle images, and the deep features of the regions are used as local features [23]. VDG, a method for viewpoint-aware learning in an unsupervised context, where novel views are generated and then a contrastive loss is used to learn viewpoint-invariant features, was proposed in [24]. [PERSON] et al. introduceda two-pronged approach which involved first generating the local regions of interest and then projecting them onto the global feature map, thereby ensuring a mix of local attribute-based and global re-identification features [25]. This approach followed a scheme similar to that used in object detection and segmentation models [26]. [PERSON] et al. used a two-branch model in which local features are extracted by applying horizontal stripes to the output of a backbone layer, and these are combined with a global layer. The global layer comprises two fully connected layers, one with ID predictions and the other with attribute information, that generate a combined feature [27]. [PERSON] et al.