# A Novel Dual Mixing Attention Network for UAV-Based Vehicle Re-Identification
## 3 Proposed Method  
### Dual Mixing Attention Module  
We use a standard ResNet-50 as our backbone to extract features. Our proposed DMAM is shown in Figure 2. Because the vehicle space photographed from the UAV perspective changes significantly, and the shooting angle of UAVs is complex, UAVs can overlook or squint at a target or scene at different angles, resulting in viewpoint changes in the image. Currently, some attention mechanisms use channel or spatial attention mechanisms. However, spatial attention is more focused on the space region but ignores the different characteristics of the channel. Channel attention filters important feature channels while missing spatial features. Although partial attention mechanisms use channel and spatial fusion attention, mixed attention tends to learn along a single dimension, ignoring the remaining dimensions' features. To address this, we propose a novel DMAM to capture pixel-level pairwise relationships and channel dependencies, where DMAM comprises SMA and CMA. To enhance vehicle ReID, the DMAM can also be easily added to backbone networks at any level. We denote an input original feature as \(\mathbf{X}\in\mathcal{R}^{\mathrm{C}\times\mathrm{H}\times\mathrm{W}}\), which goes through DMAM and outputs enhanced feature as \(\mathbf{Z}\in\mathcal{R}^{\mathrm{C}\times\mathrm{H}\times\mathrm{W}}\). \(C\) denotes the number of channels, and \(H\) and \(W\) denote the height and width, respectively. Firstly, the original feature graph is split according to the dimensions of space and channel, and multiple subspaces are obtained, namely, \(\mathbf{X_{c}}=\{\mathbf{x_{c}^{1}},\,\mathbf{x_{c}^{2}}...,\,\mathbf{x_{c}^{n}}\}\) and \(\mathbf{X_{S}}=\{\mathbf{x_{s}^{1}},\,\mathbf{x_{s}^{2}}...\,\mathbf{x_{s}^{m}}\}\). Each sub-feature map is processed independently, and the features of different channels and local regions can be extracted so that the network can better associate local features with the whole feature. Secondly, channel subfeature and spatial subfeature, \(\mathbf{x_{s}^{1}}\) and \(\mathbf{x_{s}^{1}}\), respectively, are sent into CMA and SMA to learn channels and spatial mixed features. Figure 2: **An overview of the proposed dual mixing attention module (DMAM) framework. ** The proposed method mainly contains four components: (1) The original feature is divided into two branches. (2) Feature map \(\mathbf{X_{c}}\) divides n sub-channels \(\mathbf{x_{c}^{i}}\) along the channel (C). Feature map \(\mathbf{X_{s}}\) divides m subspaces \(\mathbf{x_{s}^{i}}\) along space (HW). (3) Feature maps \(\mathbf{x_{c}^{i}}\) and \(\mathbf{x_{s}^{i}}\) were aggregated after entering channel mixing attention (cma) and spatial mixing attention (SMA), respectively. (4) After passing convolution (Cov), batch normalization (Bn), and rectified linear unit (Relu), the enhanced feature is finally output through the residual module. The output is \(\mathbf{x_{cont}^{i}}\) and \(\mathbf{x_{son}^{i}}\). The dimensions of feature maps \(\mathbf{x_{c}^{i}}\), \(\mathbf{x_{cont}^{i}}\) are \(c/n\times h\times w\), and the dimensions of feature maps \(\mathbf{x_{s}^{i}}\), \(\mathbf{x_{son}^{i}}\) are \(hw/m\times c\). The hybrid features increase the ability to input data model diversely, which better extracts complex feature representations from the UAV perspective. Third, the features extracted from their respective spaces are aggregated. After reshaping, the feature maps are transformed into \(\mathbf{X_{cont}}\) and \(\mathbf{X_{sou}}\). After concat, the output of the two feature maps is \(\mathbf{X_{out}}\). The aggregation of features of multiple subspaces enhances the correlation between features. Integrating features promotes the interaction and information transfer between different features. Moreover, the generalization ability is also improved. Fourth, the feature map \(\mathbf{X_{out}}\) passes through a set of \(1\times 1\) convolution (Cov), batch normalization (Bn), and rectified linear unit (Relu), with an output of feature map \(\mathbf{X_{out}^{{}^{\prime}}}\).