# RANDnet: Vehicle Re-Identification with Relation Attention and Nuance-Disparity Masks
## 4 Experiments
### Parameter Analysis  
In this section, we delve into the analysis of key parameters integral to our method, focusing on two aspects: the visualization of discriminative region identification and the accuracy in re-identification tasks. All experiments referenced here are conducted on the VeRi-776 dataset. (1) N&D Masks. The variations between \(\theta_{disp}=50\), \(\theta_{disp}=100\), and \(\theta_{disp}=200\) are subtly discernible. Regarding the parameter \(\sigma_{disp}\), which controls the area of the rigid body in the image, we consider the vehicle's proportion within the image. Extreme proportions, i.e., too small or too large, are deemed impractical and are therefore excluded. Empirical tests with \(\sigma_{disp}\in\{0.3,0.4,0.5,0.6,0.7\}\) and \(\theta_{disp}=200\) were conducted. The visual results, displayed in Figure 7, clearly show that as \(\sigma_{disp}\) increases, the mask progressively encompasses the entire vehicle body. The impact on re-identification is illustrated in Figure 8a, where the X-axis and Y-axis represent the proportion \(\sigma_{disp}\) and the mAP evaluated on VeRi-776 [43], respectively. Initially, an increase in \(\sigma_{disp}\) correlates with a rise in the mAP, peaking at \(\sigma_{disp}=0.7\). However, further escalation in \(\sigma_{disp}\) leads to a decline in accuracy. This is attributed to the fact that a smaller \(\sigma_{disp}\) challenges the N mask's ability to learn all details, while a larger \(\sigma_{disp}\) risks including irrelevant background elements in the D mask. A similar experiment was conducted to identify the optimal values for \(\theta_{muc}\) and \(\sigma_{nuc}\). The candidate values for \(\theta_{muc}\) were set to \(\left\{2,3,5,10,20\right\}\), selected based on the frequency of each vehicle type within the dataset. Experimental results indicate that the best mAP performance for nuance masks is achieved when \(\theta_{muc}\) is set to five. Correspondingly, \(\sigma_{nuc}\), the parameter for nuance masks, is determined to be 0.3 based on these outcomes. The parameter \(impact\) signifies the attention weight assigned to the vehicle body during training. We executed experiments with \(impact\in\left\{0.1,0.2,0.3\right\}\), keeping upper parameters remaining. The experimental outcomes are illustrated in Figure 8a. Observations reveal that N&D masks attain the highest mAP when \(impact\) is set to 0.2. Figure 6: Parameter analysis of \(\theta_{disp}\) in the setting \(\sigma_{disp}=0.5\). The left column is original image, and right columns show the effect of visualized results with increasing \(\theta_{disp}\). When more IIFs are involved, recognized discriminative regions become more accurate and compact. Figure 7: Parameter analysis of \(\sigma_{disp}\) in the setting \(\theta_{disp}=200\). It can be seen that, with the increase in \(\sigma_{disp}\), discriminative regions cover more and more vehicle details. Drawing from this analysis, we identified the optimal values for the key parameters. All subsequent experiments are conducted under these settings. (2) RA module. The hyper-parameters associated with the relation attention module encompass the loss function weight \(\beta\), the number of self-attention modules \(L\), and the feature vector length \(d_{RA}\). To ascertain suitable values for these parameters, we devised a framework akin to that illustrated in Figure 5, featuring two branches: one retains the baseline structure while the other incorporates the relation attention module. This framework serves as the basis for our analysis of the parameters in the relation attention module. The re-identification accuracy exhibits sensitivity to the weight of the loss function. The model's framework, composed of dual branches, shares the same backbone network. The loss function weight essentially represents the gradient proportion of the two branches relative to the backbone network. Disproportionate gradients from the branches can disrupt the training of the backbone network if the weight setting is imbalanced.