# Pedestrian Re-Identification Algorithm Based on Unmanned Aerial Vehicle Imagery
## 3 Improvement of Transformer-Based Pedestrian Re-Identification Algorithm
### Multi-Scale Graph Convolutional Networks  
In pedestrian re-identification tasks, especially when dealing with pedestrians exhibiting complex behaviors, the extraction of local features is crucial. While the Transformer model is effective at capturing global features, it has inherent limitations in extracting fine-grained local information. To overcome this challenge, this paper proposes a novel model, MU-GCN. MU-GCN is inspired by multi-scale feature fusion and graph convolutional networks. This model is specifically designed to address the complexities associated with pedestrian behavior in UAV aerial imagery. The structure of MU-GCN is illustrated in Figure 2.  
Single-scale feature extraction typically emphasizes specific details at fixed scales. However, this approach may not adequately capture the complex behaviors of pedestrians, especially under varying UAV viewpoints. As a result, the model's identification performance is adversely impacted. To overcome this limitation, MU-GCN employs a multi-scale feature extraction strategy. This strategy enhances the model's ability to perceive detailed pedestrian features by using convolution kernels of varying scales. Figure 1: General block diagram of MNTReID network. In particular, the global feature map is divided into four distinct local regions (Local 1 to Local 4). Each region is processed using specific convolution kernels of varying sizes (1 \(\times\) 1, 3 \(\times\) 3, and 5 \(\times\) 5). The multi-scale features are then integrated through a dynamic convolution mechanism. This design ensures that the model effectively captures pedestrian features at multiple scales. It also enhances attention to local details, particularly in scenarios involving pedestrians with complex behaviors. The structure of Local 1 is shown in Figure 3.  
The correlation among local features remains insufficiently captured following the multi-scale feature fusion process. To further enhance the representational power of local information, this study employs a GCN to process the local features following multi-scale feature fusion. The adjacency matrix \(A\) in GCN is constructed by computing the similarity between the feature points, representing among them. The similarity is typically defined as follows:  
\[A_{ij}=exp(-\frac{\left\|L_{i}-L_{j}\right\|^{2}}{2\delta^{2}}) \tag{1}\]  
where\(\left\|L_{i}-L_{j}\right\|^{2}\)is the Euclidean distance between the feature points \(L_{i}\) and \(L_{j}\). The Euclidean distance is computationally simple, has strong geometric significance, and intuitively reflects the differences between feature points. It also demonstrates good stability in high-dimensional feature spaces, which is crucial for effective feature aggregation in GCNs. Figure 3: Multi-scale fusion module. Figure 2: Multi-scale graph convolution network (MU-GCN) module. This allows the model to capture fine-grained details more effectively, thereby improving re-identification accuracy. Additionally, the scale parameter \(\delta\) further optimizes the impact of the distance. Through the convolution operation of GCN, the model can transfer information exchange among feature points, enabling the aggregation of local features. The operation at each GCN layer can be expressed as:  
\[H^{l+1}=\delta(\tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}}H^{(l)}W^ {(l)} \tag{2}\]  
where \(\tilde{A}=A+I\) represents the adjacency matrix \(A\) with added the self-loop, \(I\) is the identity matrix, \(\tilde{D}\) is the degree matrix of \(\tilde{A}\), \(H^{(l)}\) is the feature representation of layer \(l\), \(W^{(l)}\) is the trainable weight matrix of layer \(l\), and \(\sigma\) is the activation function. Through the layer-by-layer graph convolution operations of GCN, the model incrementally captures the relationships among local features. Additionally, the incorporation of dropout effectively mitigates overfitting, enhancing the model's generalization performance.