# Multispectral Target Detection Based on Deep Feature Fusion of Visible and Infrared Modalities
## 3 Proposed Methodology
### C3-PSA Optimization  
To improve the model's capacity for multiscale and complex feature representation, we optimize the standard YOLOv5 backbone by introducing the C3-PSA module. Unlike the conventional C3 block, which struggles with scale variation and occlusion, C3-PSA enhances spatial adaptability and detail preservation by combining multibranch convolutions with dynamic channel attention. The structure of the parallel spatial attention mechanism is illustrated in Figure 5.  
In target detection tasks, the standard YOLOv5 model often encounters performance bottlenecks when handling complex scenes and multiscale targets. This limitation primarily arises because the C3 module in the core feature extraction network relies on conventional convolution and connection methods, which struggle to effectively capture critical information under dynamically changing conditions. When targets exhibit challenges such as scale variations or occlusions, the fixed convolutional kernel and connection method lack the flexibility needed to extract features at different scales adequately. Consequently, key features may be insufficiently captured or entirely missed, leading to a decline in detection accuracy and recall rates. To mitigate this issue, we introduce the C3-PSA module, which is designed to enhance unimodal feature extraction and optimization through the PSA mechanism. Compared to the traditional C3 module, the proposed module significantly improves multiscale feature capturing and fusion by employing a two-step processing approach. The first step involves the initial extraction of edge and texture information from unimodal images using \(3\times 3\) convolutional layers, batch normalization (BN), and ReLU activation functions, producing compact feature maps of varying sizes. This process is mathematically expressed as  
\[F_{\text{init}}=\text{ReLU}(\text{BN}(\text{Conv}_{3\times 3}(X))) \tag{15}\]  
where \(F_{\text{init}}\) represents the initially extracted feature map, \(\text{Conv}_{3\times 3}(\cdot)\) denotes the \(3\times 3\) convolution operation, and \(\text{BN}(\cdot)\) and \(\text{ReLU}(\cdot)\) correspond to batch normalization and rectified linear unit activation, respectively. The extracted \(F_{\text{init}}\) retains the spatial integrity of the scene while emphasizing critical regions, thereby supplying more robust feature inputs for the subsequent pyramid squeezing attention phase. Following the initial feature extraction, the module integrates a multibranch Squeeze and Patch Convolution (SPC) structure, which applies parallel multiscale convolutional  
Figure 5: The left side of the figure depicts the input feature tensor, characterized by height \(H\), width \(W\), and number of channels \(C\), passing through four parallel convolutional paths. These paths extract multiscale features by dividing the number of channels into equal segments of \(C/S\) (where \(S\) is 4 in the figure). The SEWeight module, positioned at the center, applies channel attention to generate weight vectors corresponding to each branch. On the right side, these weights are multiplied, channel by channel, by their respective branch features before being fused to produce the final output feature map. kernels to \(F_{\text{init}}\). The input feature channel dimensions are compressed from \(C\) to \(C^{\prime}=C/S\), and each branch employs a unique convolutional kernel size defined as  
\[k_{i}=2\times(i+1)+1,\quad i\in\{0,1,\dots,S-1\} \tag{16}\]  
For the \(i\)-th branch, the operation is defined as  
\[F_{i}=\text{Conv}(k_{i}\times k_{i},G_{i})(F_{\text{init}}) \tag{17}\]  
where \(\text{Conv}(k_{i}\times k_{i},G_{i})\) represents a convolution operation with a kernel size of \(k_{i}\times k_{i}\) and a group size \(G_{i}=2^{(k_{i}-1)/2}\).