3.1. Overview of Our Method
The overall architecture of the proposed SG-YOLO is shown in
Figure 2. SG-YOLO is a lightweight, high-efficiency detector specifically designed for multispectral small-object detection in UAV aerial imagery.
Input is an N × H × W multispectral image (where N denotes the number of spectral bands). The input first passes through our proposed SGDS (Spectral Gated Downsampling Stem). SGDS decouples different bands during the first two downsampling stages and allocates adaptive weights to each band via a gating mechanism, thereby enhancing responses of informative bands and suppressing redundant noise to provide a more discriminative low-level representation for the backbone.
In the backbone, we employ the SSIAF Block (Spectral–Spatial Iterative Attentional Fusion Block) to strengthen feature extraction. SSIAF adopts a cascaded attention scheme that alternately (iteratively) models channel-wise and spatial-wise interactions, enabling deep fusion of spectral and spatial information and mitigating redundancy accumulation when multispectral features are stacked in deep layers.
The neck handles cross-layer interaction and fusion of multi-scale features. To improve multi-scale fusion quality and channel-wise semantic interaction, we introduce the SCSF Block (Spatial–Channel Synergy Fusion Block) in the neck: it captures contextual information at different receptive fields using multi-scale convolutional kernels and dynamically reinforces salient channels via channel attention, thereby enhancing representation for targets at various scales, especially small and medium objects.
Finally, the multi-scale features produced by the neck are fed into three detection heads for classification and bounding-box regression, yielding robust detection across scales. The overall design emphasizes effective utilization and fusion of multispectral information while remaining parameter- and computation-efficient to facilitate deployment on resource-constrained UAV platforms.
3.2. Spectral Gated Downsampling Stem
Multispectral imagery extends the spectral dimension by incorporating bands beyond visible light (e.g., near-infrared and short-wave infrared). These additional bands provide critical complementary cues under complex backgrounds, low-contrast conditions, and dim illumination, thereby significantly enhancing a detector’s discriminative capability. Conventional RGB-based object detectors are designed to process , whereas multispectral inputs are represented as . The simplest adaptation is to change the input channels of the first convolution to support N-channel inputs. However, this design forces spectral features to be directly compressed into a shared mapping through a single convolution layer, leading to overly early fusion and potential dilution of band-specific information.
Based on this observation, we follow the principle of “late fusion, spectral decoupling, and adaptive recalibration” in our network design: we maintain band-wise independent spatial feature streams in early layers to preserve spectral fingerprints and then use a lightweight gating mechanism to emphasize informative spectral signals while suppressing redundant noise. This produces cleaner and more discriminative low-level representations for subsequent deep spectral–spatial fusion.
As illustrated in
Figure 3, SGDS consists of two band-grouped downsampling convolutions and a lightweight channel-gating unit. Given a multispectral input
with N spectral bands, the module first performs two grouped convolution downsampling operations. Unlike standard convolutions that jointly process all input channels, we set the number of groups to N to ensure that each band remains independent during spatial feature extraction.
In the first downsampling stage, the number of channels is expanded from N to an intermediate channel dimension C
mid (subject to C
mid % N = 0), while the spatial resolution is reduced by half. The computation can be expressed as:
where
denotes the SiLU activation function, and
denotes batch normalization (BatchNorm2d). Subsequently, the second downsampling stage further increases the number of feature channels to the final output dimension C
out (with the constraint C
out % N = 0), while the spatial resolution is halved again:
Through these two downsampling operations, each spectral band is independently mapped to Cout/N feature channels. This design effectively avoids forced mixing of spectral characteristics at the network entrance, thus preserving valuable band-discriminative information for subsequent processing.
After the grouped downsampling, we introduce a lightweight spectral gating unit to adaptively recalibrate the importance of each channel. The unit follows a “squeeze-and-excitation” mechanism: it first applies global average pooling to squeeze the feature map
along the spatial dimensions, producing a channel descriptor:
Then, a simple two-layer bottleneck fully connected module (implemented as
convolutions in code) is used to capture nonlinear inter-channel dependencies and generate per-channel weights:
where
and
are the weights of the convolution layers,
denotes the SiLU activation function, and
denotes the Sigmoid function. The resulting gating weights
lie in the range [0, 1]. The final output of the module is the feature map modulated by these gating weights:
where
denotes element-wise multiplication. This gating mechanism can dynamically enhance informative band features and suppress redundant or noisy band responses according to the input content, thereby providing the backbone network with a more discriminative low-level spectral–spatial representation.
In summary, the SGDS module, through the coordinated design of grouped convolution and the gating mechanism, achieves efficient downsampling while markedly improving the model’s selective perception of multispectral information, laying a solid foundation for subsequent deep feature extraction.
3.3. Spectral–Spatial Iterative Attentional Fusion
In UAV-acquired multispectral imagery, the feature representation of small targets is extremely weak. Traditional feature extraction modules (e.g., the standard C3K2 module in YOLO11) mainly rely on simple linear stacking and residual connections. When dealing with multispectral data that exhibit high spectral correlation and complex spatial structures, this design can easily introduce feature redundancy and overwhelm critical small-target cues. To enable more refined feature selection and enhancement, we propose a Spectral–Spatial Iterative Attention Fusion (SSIAF) module.
SSIAF is a substantial improvement over the C3K2 structure in YOLO11, and its overall architecture is shown in
Figure 4. The module consists of two residual units. In each unit, CBS and depthwise separable convolution (DWConv) are used for efficient feature extraction, and the residual connection is then implemented via the iAFF module [
50].
The core of SSIAF lies in the iterative Attentional Feature Fusion (iAFF) unit. Through a dual-branch attention mechanism, iAFF captures both local spatial context and global spectral correlation. Different from conventional one-shot attention, iAFF adopts an iterative strategy: the first fusion produces an initial fused feature, which then guides a second-stage re-allocation of attention weights, enabling progressive feature refinement.
The specific computation is illustrated in
Figure 5. Let the input feature map be
. In the SSIAF branch, the feature is processed by convolution to obtain an intermediate feature
.
and
are first added element-wise and then fused via Multi-Scale Channel Attention (MS-CAM). Next, the MS-CAM module is applied iteratively to perform a second attention-based fusion on the already fused features, ultimately producing a high-quality fused representation.
The MS-CAM module used in this work is shown in
Figure 6. To encourage the network to attend to both global information and local details, MS-CAM contains two branches: a global channel-attention branch and a local-attention branch.
The detailed computation of iAFF is as follows:
Among them,
and
denote the original feature map and the intermediate feature obtained after convolution, respectively. The symbol
indicates that the feature map is processed by the MS-CAM module. The input feature after the first integration is denoted as
, which can be expressed as:
Here,
. Assuming the feature map fed into MS-CAM is
, the output feature map
can be expressed as:
Here, denotes batch normalization, and denotes global average pooling.
3.4. Spatial-Channel Synergy Fusion
In the Neck part of an object detection network, the core task is to efficiently fuse feature maps from different levels of the Backbone so as to aggregate low-level spatial details and high-level semantic information. This is crucial for UAV imagery scenarios where scale variation is severe and small objects are abundant. Traditional feature pyramid networks typically perform multi-scale feature fusion using simple upsampling followed by addition or concatenation, without fully considering the differences among features at different scales in terms of spatial detail and channel semantics. As a result, the fused features often lack sufficient discriminative power. To address this issue, we design a Spatial-Channel Synergistic Fusion module. The key innovation of this module lies in constructing a parallel multi-branch structure, which enables adaptive and fine-grained fusion of Neck features through the synergy between multi-scale spatial context capture and dynamic channel-attention re-calibration, thereby significantly improving the model’s perception of small and medium-sized objects.
As shown in
Figure 7, the overall architecture of the SCSF module adopts a C3-like CSP (Cross Stage Partial) design. While preserving lightweight characteristics, it achieves joint optimization of multispectral features in the spatial and channel dimensions through the synergy between a multi-scale spatial branch and an enhanced channel-attention branch. The SCSF module follows the CSP philosophy to balance feature reuse and enriched gradient flow. The input feature is processed by two 1 × 1 convolutions, Conv
1 and Conv
2, which compress the channel dimension from
to
(where
is the channel scaling factor, with a default value of 0.5), thereby reducing feature dimensionality and computational cost. The output of Conv
1 is fed into the SCAB module for deeper feature enhancement, while the output of Conv
2 is retained as a shortcut branch to preserve the original feature information. Finally, the features from the two branches are concatenated along the channel dimension to recover the original number of channels and then fused by Conv
3 to produce the output feature
.
SCAB is the core of the SCSF module. It is designed to accommodate the spatial-context and channel-semantic characteristics of multispectral data, and its structure is illustrated in
Figure 8. It mainly consists of two parallel branches: an MS branch (multi-scale spatial feature extraction) and an ECA branch (enhanced channel attention).
3.4.1. Multi-Scale Spatial Feature Extraction Branch
To accommodate the wide range of target scales in UAV imagery, this branch employs parallel large-kernel depthwise separable convolutions to capture spatial context with different receptive fields. The detailed computation process is shown in
Figure 8. The input feature is first split into three parallel branches (with kernel sizes K= {3, 5, 7}). In each branch, the corresponding scale features are extracted using a “depthwise separable convolution + pointwise convolution” combination:
where
denotes the input feature map,
represents a depthwise convolution with kernel size
, which expands the receptive field while keeping channels independent; and
denotes a 1 × 1 pointwise convolution that compresses the output channels of each branch to
.
After concatenating the channel outputs of all branches
convolution is applied to fuse them into a unified spatially enhanced feature:
After fusion, the spatial contextual information of targets at different scales is retained.
3.4.2. Enhanced Channel-Attention Branch
To address the issue that different spectral bands in multispectral data contribute unequally to semantic representation, this branch is optimized based on the Efficient Channel Attention (ECA) mechanism. Specifically, a 1D convolution with a dynamically determined kernel size is introduced to capture inter-channel dependencies. The detailed pipeline is illustrated in
Figure 8.
The input feature is compressed into a channel-wise statistical vector via Global Average Pooling:
Here,
reflects the global semantic information of each channel. The compressed vector
is then fed into a 1D convolution to capture inter-channel correlations, and a Sigmoid activation is applied to generate the channel-attention weights:
where
denotes the Sigmoid function and
, enabling the enhancement of informative channels and suppression of redundant ones.
Finally, the channel-attention weights are multiplied element-wise with the original feature, followed by a 1 × 1 convolution to adjust the channel number and obtain the channel-enhanced feature:
where
denotes element-wise multiplication, and
.
3.4.3. Spatial–Channel Feature Fusion and Modulation
The spatial-enhanced feature
and the channel-enhanced feature
are concatenated along the channel dimension to obtain a fused feature. The fused feature is then passed through a 1 × 1 convolution to restore the number of channels to
, and a Sigmoid activation is applied to generate the spatial–channel collaborative attention map:
where
, enabling dual-dimensional modulation of the features in both spatial and channel domains. Finally, the attention map and the original input feature are modulated via element-wise multiplication, followed by a 1 × 1 convolution to match the channel dimension, and a residual connection is introduced to alleviate gradient vanishing: