# RANDnet: Vehicle Re-Identification with Relation Attention and Nuance-Disparity Masks
## 4 Experiments
### Experiments Setup  
(1) Backbone Configuration.  
In our study, we employ IBN-Net-50 [14] as the backbone architecture, a variation of ResNet-50. IBN-Net-50, while retaining a similar structure to ResNet-50, integrates instance normalization with batch normalization in certain layers, enhancing feature discriminability with minimal computational overhead. Moreover, we adjust the stride of the final pooling layer to one to yield larger feature maps. Our model is implemented using the Pytorch deep learning framework.  
(2) Data Augmentation.  
We incorporate random erasing and horizontal flipping as part of our data augmentation strategy during the training phase. Adhering to the optimal parameters specified in [45], tailored for image classification tasks, we set \(s_{l}=0.02\), \(s_{h}=0.4\), and \(r_{1}=0.3\). The area of the erasure rectangle is randomly chosen from the range \((s_{l},s_{h})\), and \(r_{1}\) governs the aspect ratio of this rectangle. Random erasing is applied with a probability of 0.5. Similarly, horizontal flipping is executed with a 0.5 probability.  
(3) Training and Evaluation.  
Input images are resized to \(256\times 256\) in both the training and testing phase. The batch size for training is configured to 64. The distribution of images per category within each batch is adjusted based on the specific characteristics of the dataset being used. For instance, in the VeRi-776 dataset, the average number of images per vehicle identity is approximately 75.6, resulting in the selection of 16 random images for each vehicle identity per batch. In contrast, for the VehicleID dataset, each category is represented by four images within a batch.  
The training process spans over 120 epochs to ensure the underlying re-identification network stabilizes and learns effectively. Disparity masks remain dormant until the 60 th epoch, activating only in the latter half of the training to refine the model's focus on intricate details. Nuance masks, designed to enhance the classification accuracy by emphasizing distinct features, are triggered after the 80 th epoch. Simultaneously, the RA module begins to leverage the regional features highlighted by these masks, enriching the model's understanding and representation of vehicle identities.  
Stochastic Gradient Descent (SGD) is employed as the optimization method, starting with an initial learning rate of 0.01. The first 10 epochs incorporate a warm-up strategy, where the learning rate linearly increases from 0.0001 to 0.01, preparing the model for more intense training phases. Post the 30 th epoch, the learning rate is methodically reduced to \(7.7\times 10^{-5}\) following a cosine annealing schedule, optimizing the training process by adjusting the learning rate in a smooth, cyclical pattern.  
A batch normalization layer follows the GAP layer in each branch of the network, ensuring the consistent normalization of the features. For evaluation purposes, the output features of the batch normalization layer are utilized as the branch output features, which contribute to the stability and performance of the model during the testing phase.