An unmanned aerial vehicle image target detection method, device and electronic equipment

By introducing HFEM and DSAM modules into the RemDet model, the problems of coarse feature fusion and large background interference in UAV image target detection are solved, improving the small target recognition capability and detection accuracy, and adapting to edge device deployment.

CN122157067APending Publication Date: 2026-06-05ANHUI UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIVERSITY OF TECHNOLOGY
Filing Date
2026-03-25
Publication Date
2026-06-05

Smart Images

  • Figure CN122157067A_ABST
    Figure CN122157067A_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned aerial vehicle image target detection method, device and electronic equipment, belong to computer vision technical field.The method uses RemDet detector as baseline model, embedding hierarchical feature enhancement module HFEM and double scale space attention module DSAM in the feature fusion network of baseline model, realize the target detection of unmanned aerial vehicle image, specifically includes: the image to be measured obtained is input into backbone network and carries out feature extraction, and its output is input into feature fusion network and carries out top-down and bottom-up bidirectional multi-scale feature fusion, then successively HFEM and DSAM are carried out feature enhancement and space attention modeling, and the enhanced feature map with discriminability and scale robustness is output again input into detection head and carries out target detection.The application effectively solves the problems of unmanned aerial vehicle image small target detection difficulty, feature fusion roughness, background interference and the like, improves the detection precision while maintaining the model lightweight, adapts edge device deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, and more specifically, relates to a method, apparatus and electronic device for detecting targets in UAV images. Background Technology

[0002] Vision systems mounted on unmanned aerial vehicles (UAVs) are widely used in security patrols, traffic monitoring, and disaster assessment due to their advantages such as high mobility, low cost, and wide coverage. However, because images are acquired from high altitudes, the captured targets are usually small in size, have large image variations, limited pixels, and complex and noisy backgrounds. This causes existing target detection algorithms to have significantly lower accuracy in UAV scenarios, making small target detection in UAVs a challenging area in computer vision.

[0003] Early UAV image target detection relied on traditional computer vision methods, which had limited feature representation capabilities and struggled to adapt to the realities of UAV images, including varying scales, diverse viewpoints, and complex lighting conditions, resulting in insufficient generalization ability and robustness. In recent years, detection methods based on convolutional neural networks (CNNs) have become mainstream. However, the YOLO series lacks sensitivity to small targets and is prone to losing key details during feature fusion. Feature pyramid-based detection frameworks (FPN / PAFPN) improve detection capabilities through multi-scale fusion, but are still susceptible to background noise. While the lightweight detector RemDet is adapted to edge devices and can achieve real-time detection of dense small targets, it still suffers from a crude feature fusion mechanism, a lack of targeted spatial modeling capabilities, an inability to adaptively enhance high-frequency detail features of small targets, and wasted resources in computing on background areas without targets. Furthermore, its accuracy in separating and locating foreground targets in complex scenes is limited.

[0004] To address the aforementioned issues, there is an urgent need for a target detection method that can improve the recognition capability of small targets in UAV images, enhance feature representation, and suppress background interference while maintaining detection efficiency, thereby overcoming the shortcomings of existing technologies. Summary of the Invention

[0005] The purpose of this invention is to provide a UAV image target detection method based on RemDet fusion feature enhancement and spatial attention to solve the problems of detail loss, coarse feature fusion, large background interference, and low accuracy of small target detection in existing UAV image target detection. While maintaining the lightweight model and real-time detection, it significantly improves the accuracy and robustness of multi-scale target detection and adapts to the deployment needs of edge devices with limited computing power.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] In a first aspect, this invention provides a target detection method for UAV images. Using a RemDet detector as a baseline model, the method employs a network framework of feature extraction, multi-scale fusion, and detection prediction. By embedding a hierarchical feature enhancement module (HFEM) and a dual-scale spatial attention module (DSAM) into the feature fusion network of the baseline model, high-precision target detection of UAV images is achieved through adaptive feature enhancement and spatial modeling of key regions. Specifically, the method includes the following steps: Step S1: Obtain the remote sensing image of the UAV to be detected, input it into the backbone network for feature extraction, and output a high-resolution feature map P3 containing shallow detail information, a mid-level feature map P4, and a low-resolution feature map P5 containing high-level semantic information. Step S2: Input the feature maps P3, P4, and P5 obtained in step S1 into the feature fusion network. First, perform bidirectional multi-scale feature fusion from top to bottom and bottom to top. Then, perform feature enhancement and spatial attention modeling through the hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM in sequence to output an enhanced feature map that is both discriminative and scale robust. Step S3: Input the enhanced feature map obtained in step S2 into the detection head network, perform classification prediction and bounding box regression based on distribution modeling respectively, and output the target detection results of the UAV image.

[0008] As a possible implementation of the first aspect of the present invention, in step S2, the bidirectional multi-scale feature fusion process of top-down and bottom-up is to first perform top-down path fusion and then perform bottom-up path fusion, wherein: Top-down approach: Upsample high-level features, then concatenate them with low-level features from adjacent layers along the channel dimension, and finally use the ChannelC2f module for channel recombination and progressive feature fusion. Bottom-up approach: Low-level features are downsampled and then concatenated with high-level features of the corresponding scale in the channel dimension. The features are then fused through the ChannelC2f module to supplement shallow details to mid-to-high-level features.

[0009] As a possible implementation of the first aspect of the present invention, in step S2, the feature maps P3 and P4 output after bidirectional multi-scale feature fusion are both processed by the cascaded hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM. At the same time, the feature map P5 output after bidirectional multi-scale feature fusion is processed by the dual-scale spatial attention module DSAM. The output results are all input into the detection head network.

[0010] As a possible implementation of the first aspect of the present invention, the hierarchical feature enhancement module HFEM is used to adaptively enhance the feature maps of each scale after bidirectional fusion, strengthen the high-frequency detail features of small targets, and suppress noise. Its processing flow includes: Step 1: Extract low-frequency features from the input features using 3×3 convolution, and then explicitly separate high-frequency components by difference operation between the original features and the low-frequency features. H ; Step 2, in the initial enhancement coefficient Under the control of the high frequency components obtained in step 1 H Preliminary enhancement is performed to obtain enhanced features. ; Step 3: Enhance the features obtained in Step 2 by using a channel mixing branch composed of 1×1 convolution and 3×3 convolution. Perform cross-channel information exchange to obtain features M ; Step 4: Generate dynamic enhancement coefficients through global average pooling and 1×1 convolution. s The ions are mapped to the [0,1] interval by the Sigmoid activation function and then clipped to [0.05,1.0]. Finally, the ions are processed... O = X + s ( M X Output refined high-frequency enhanced features.

[0011] As one possible implementation of the first aspect of the present invention, the dual-scale spatial attention module (DSAM) constructs a multi-scale spatial attention mechanism to explicitly model key regions, effectively suppressing complex background interference while highlighting foreground targets. Its processing flow includes: Step 1: Let the input be... Lightweight residual transformation is performed on the input features using depthwise separable convolution to obtain residual features. R i ; Step 2: Introduce a prediction guidance mechanism to generate a prediction guidance graph. P i residual characteristics R i according to P i Divided into foreground branch features F i fg Background branch features F i bg Modeling is performed on potential target regions and non-target regions respectively; Step 3: Apply the two branches obtained in Step 2 to the ASPP modules with different expansion rates. F i fg , F i bg Multi-scale contextual information is extracted separately to obtain the corresponding foreground enhancement features. and background-aware features ; Step 4: Fuse the foreground enhancement features with the background perception features, generate a new spatial attention map through the prediction layer, and then connect the enhancement features with the original residual features through residual connections. R i The summation produces spatial attention-enhanced features in the output space.

[0012] As one possible implementation of the first aspect of the present invention, the introduced prediction guidance mechanism is as follows:

[0013]

[0014] in, Indicates the first The prediction guidance graph for the next forward propagation, σ maps the previous layer prediction to the [0,1] interval, and Interp represents the spatial scale alignment operation.

[0015] As one possible implementation of the first aspect of the present invention, the process of dividing the residual features into foreground branches and background branches, and modeling the potential target region and non-target region respectively, is as follows:

[0016] in, Indicates the first i Foreground guidance features of the layer; Indicates the first i Background suppression features of the layer.

[0017] As one possible implementation of the first aspect of the present invention, the backbone network includes a first feature extraction module, a second feature extraction module, a third feature extraction module, and a fourth feature extraction module connected in sequence. The first feature extraction module includes a 3×3 convolution module and a GatedFFN module connected in sequence. The second and third feature extraction modules are both composed of a CED module and a GatedFFN module cascaded together, and after processing, they output feature maps P3 and P4, respectively. The fourth feature extraction module is composed of a CED module, a GatedFFN module, and an SPPF module cascaded together, and after processing, it outputs feature map P5.

[0018] A second aspect of the present invention also provides a target detection device for UAV images, comprising an image acquisition module, a feature extraction module, a feature fusion enhancement module, and a detection prediction module, wherein each module is sequentially signal-connected, and target detection of UAV images is achieved based on the RemDet detection framework, wherein: The image acquisition module is used to acquire remote sensing images of the UAV to be detected, and to perform scale normalization and format conversion processing on the images to output standard-sized RGB color images.

[0019] The feature extraction module is a four-level backbone network built based on CED, GatedFFN and SPPF modules, used to perform multi-scale feature extraction on the standard-size image tensor and output shallow high-resolution feature map P3, mid-level feature map P4 and deep low-resolution feature map P5. The feature fusion enhancement module is a neck network that embeds a hierarchical feature enhancement module HFEM and a dual-scale spatial attention module DSAM. It is used to perform bidirectional multi-scale feature fusion of P3, P4 and P5 from top to bottom and from bottom to top. Then, the feature hierarchical adaptive enhancement is realized through the HFEM module and the spatial attention modeling is realized through the DSAM module, and the enhanced feature map with both discriminative and scale robustness is output. The detection and prediction module is used to perform classification prediction and distribution-based bounding box regression on the enhanced feature map, outputting the target category information and accurate bounding box coordinates in the UAV image, thus completing target detection.

[0020] A third aspect of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the UAV image target detection method of the present invention.

[0021] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) Based on the RemDet baseline model, this invention introduces a bidirectional multi-scale feature fusion mechanism. By adopting a top-down and bottom-up bidirectional feature fusion structure, high-level semantic information and low-level spatial detail information can fully interact between multi-scale feature maps. Combined with the characteristics of large target scale changes and complex background in UAV scenarios, it effectively enhances the detection capability of small targets, dense targets and targets with significant scale differences, and improves the detection accuracy and robustness as a whole.

[0022] (2) Based on the multi-scale fusion features, this invention introduces a hierarchical feature enhancement module (HFEM), which effectively improves the ability to express target edges and texture information in the feature map by strengthening the modeling of local high-frequency details and significant regional information, so that the network can more accurately distinguish between target regions and non-target regions in complex backgrounds.

[0023] (3) In order to further improve the discriminativeness of foreground modeling, the present invention introduces the dual-scale spatial attention module DSAM to divide the fused features into foreground branches and background branches, respectively modeling potential target regions and non-target regions, and using multi-scale context information to differentiate and suppress the two types of features, effectively improving the response intensity of the foreground region and reducing background noise interference, thereby enhancing the discriminativeness of the detection results.

[0024] (4) The detection method of the present invention effectively enhances the semantic consistency and information transmission stability in the multi-scale feature fusion process. The HFEM module and DSAM module are both applied to the feature layer after bidirectional fusion, so that features of different scales can complete sufficient semantic alignment and feature correction before entering the detection head, avoiding the semantic inconsistency and information redundancy problems caused by direct multi-scale splicing, thereby improving the stability of features in the cross-layer transmission process and the overall detection performance.

[0025] (5) The detection method of the present invention ensures accuracy while taking into account computational efficiency and engineering deployability. The detection model of the present invention adopts a large number of lightweight structures in its overall network design, such as depthwise separable convolution and channel rearrangement mechanism, which effectively improves feature expression ability while significantly reducing computational complexity and parameter scale, enabling the model to run stably on single-card GPU and computing power-limited platforms, and has good engineering application value. Attached Figure Description

[0026] Figure 1 This is a diagram showing the overall structure of the detection model used in the detection method of this invention. Figure 2 This is a model structure diagram of the hierarchical feature enhancement module (HFEM) of the present invention; Figure 3 This is a schematic diagram of the model structure of the dual-scale spatial attention module (MBA) of the present invention; Figure 4 This is a visualized detection result output after the detection model of this invention is used to perform detection on the VisDrone dataset; Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0027] The existing technology for identifying drone images using mainstream detection algorithms has the following obvious technical shortcomings: (1) Loss of details: Detection methods based on convolutional neural networks (CNN) are not sensitive enough to small targets and are prone to losing key details during feature fusion. (2) The feature fusion mechanism is "coarse" and lacks enhancement of key information: The standard PAFPN uses upsampling, concatenation and convolution for feature fusion. It treats all feature information equally, but cannot adaptively identify and enhance high-frequency detail features (such as vehicle edges and pedestrian outlines) that are crucial for detecting small targets in UAV images. This "flooding" fusion causes the weak signals of small targets to be diluted by background noise during propagation, limiting the upper limit of model accuracy; (3) Lack of targeted spatial modeling capabilities: UAV images have complex backgrounds and sparse targets. The forward computation process of the current model is essentially spatially agnostic, that is, it performs equal computation on all regions of the image. This results in a large amount of computational resources being wasted on background regions without targets, while insufficient attention is paid to the foreground target regions that truly need fine identification. At the same time, the model lacks a lightweight and adaptive mechanism to dynamically focus on potential target regions and integrate multi-scale contextual information, making it difficult to achieve high-precision target separation and localization in complex scenes.

[0028] To address the technical challenges of target detection in UAV images, this invention proposes a target detection method that uses RemDet as the baseline model. The method incorporates a Hierarchical Feature Enhancement Module (HFEM) and a Dual-Scale Spatial Attention Module (DSAM) into the feature fusion network of the baseline model. This enables effective enhanced modeling of UAV scene features. The HFEM module adaptively enhances and fuses features at different levels, strengthening fine-grained feature representation and improving the discrimination performance against small and dense targets. The DSAM module constructs a multi-scale spatial attention mechanism to explicitly model key regions, effectively suppressing complex background interference while highlighting foreground targets. By integrating the HFEM and DSAM modules into the RemDet model, this invention leverages the synergistic effect of these two modules to achieve robust detection of multi-scale targets and complex scenes without significantly increasing computational complexity, thereby significantly improving the overall accuracy and stability of UAV target detection.

[0029] Specifically, in combination Figure 1 The drone detection method of the present invention includes the following steps: Step S1: Acquire the remote sensing image of the UAV to be detected. First, normalize the image scale, then feed it into the backbone network for feature extraction. The input image is denoted as... I Its dimensions are represented as:

[0030] in H 0 represents the original height of the image (in pixels). W 0 represents the original width of the image (in pixels), and the number 3 represents the RGB three color channels of the image; During this step, the input image is processed. I Before being fed into the backbone network, a 3×3 convolution operation is performed to map the image from the pixel space to a high-dimensional feature space, thereby extracting basic local texture features and performing channel expansion. This provides a stable feature representation for subsequent multi-scale feature extraction and fusion, which can be specifically represented as follows:

[0031]

[0032] The backbone network comprises four feature extraction modules: the first feature extraction module, the second feature extraction module, the third feature extraction module, and the fourth feature extraction module. After the input image undergoes multiple convolutional and downsampling operations, it outputs three feature maps of different scales, denoted as P3, P4, and P5, where: Shallow high-resolution feature map P3 preserves target detail information and is used for small target detection; The intermediate feature map P4 takes into account both semantic and detailed information and is used for medium-scale target detection. Deep low-resolution feature map P5 is used to extract high-level semantic information for large target detection.

[0033] It should be noted that the first feature extraction module includes a 3×3 convolution module and a GatedFFN module connected in sequence, and the input image... I After performing a 3×3 convolution operation, the feature map is input into the first feature extraction module for extraction. However, because the semantic level of the feature map obtained by the first feature extraction module is too low and the receptive field is too small, it is difficult to use it directly for object detection. Therefore, it is usually only used as the input for subsequent feature extraction and not directly sent to detection or multi-scale fusion. The feature map extracted by the first feature extraction module is input into the following three feature extraction modules in sequence for feature extraction.

[0034] Both the second and third feature extraction modules are constructed by cascading the CED module and the GatedFFN module, outputting P3 and P4 respectively. After extraction using the second feature extraction module, the spatial context is enhanced and information loss is reduced, while effective features are filtered in the channel dimension. The combination of these two approaches maintains high efficiency while providing stronger target perception capabilities. The output feature map P4 is then input into the third feature extraction module for further extraction, which also maintains high efficiency and provides enhanced target perception capabilities.

[0035] The fourth feature extraction module consists of a cascaded CED module, a GatedFFN module, and an SPPF module. These three modules improve the network's feature representation capabilities from three perspectives: spatial modeling, channel selection, and context expansion, respectively, and output feature map P5 after processing.

[0036] The CED module in the second, third, and fourth feature extraction modules is mainly used for feature downsampling and enhancement. Its core design idea is to reduce the spatial resolution of the feature map while minimizing information loss. The CED module effectively alleviates the problem of detail information loss caused by traditional downsampling operations, and is particularly beneficial for the preservation of features of small targets and fine-grained structures. The specific processing flow of this module includes: Step 1: Channel compression of the input features is performed using 1×1 convolution, expressed mathematically as follows:

[0037]

[0038] In the formula, X L Indicates input features, X 1 represents the output after 1×1 convolution, H represents the height, W represents the width, and C represents the number of channels.

[0039] Step 2: Introduce a 3×3 depthwise separable convolution to model each channel independently. The mathematical formula is expressed as:

[0040] In the formula, X 2 indicates the output after processing with a 3×3 depth separable convolution.

[0041] Step 3: A space-to-channel strategy is employed to recombine pixels at different odd and even positions in the feature map according to predetermined rules and then concatenate them along the channel dimension. This reduces the spatial size by half while fully preserving the local responses of the original features. The mathematical formula is as follows:

[0042]

[0043]

[0044]

[0045] In the formula, Indicates from feature map X 2. Extract the sub-feature map formed by pixels at even row and even column indices; Indicates from feature map X 2. Extract the sub-feature map formed by pixels with odd row indices and even column indices; Indicates from feature map X 2. Extract the sub-feature map formed by pixels with even row indices and odd column indices; Indicates from feature map X 2. Extract the sub-feature map formed by pixels at odd row and column indices.

[0046] Step 4: Perform channel fusion and compression on the concatenated high-dimensional features using 1×1 convolution, and output the downsampled feature representation as follows:

[0047]

[0048]

[0049] In the formula, This represents the output after concatenation. This indicates the output after processing by the CED module.

[0050] The GatedFFN module in the second, third, and fourth feature extraction modules is used for deep nonlinear modeling of the downsampled features. Through the collaborative design of gated modulation and residual connections, it achieves selective enhancement and efficient fusion of features, improving the network's expressive power and training stability without significantly increasing computational overhead. The overall structure of the GatedFFN module consists of channel projection, depthwise convolution, gated modulation, and residual connections. The specific processing flow of this module is as follows: First, the input features are mapped to a high-dimensional space using a 1×1 convolution, and then divided into two sets of sub-features along the channel dimension, used for the feature transformation branch and the gating control branch, respectively. The mathematical formula is expressed as follows:

[0051]

[0052]

[0053] In the formula, S This represents the residual connection input features in the gated feedforward module, i.e. the original input feature map without feature transformation, which is used to perform residual fusion with the transformed features in subsequent steps to preserve the original semantic information. X The initial feature map input to the gated feedforward module is represented by U, which originates from the output features of the previous module; U represents the input features. X High-dimensional mapping features after 1×1 convolution, batch normalization (BatchNorm), and ReLU activation function; Indicates from features The feature transformation branch obtained from the partitioning is used to perform subsequent feature enhancement and spatial modeling operations; Indicates from features The gating branch obtained from the partitioning is used to generate gating weights and adaptively modulate the main feature branch, thereby controlling the information flow.

[0054] In the feature transformation branch, a reparameterizable depthwise convolution RepDWConv is introduced to model the features spatially, and then DWConv(n) is stacked. (1 time); the gated branch generates dynamic weights through a nonlinear activation function, performs gated activation, and modulates the output of the feature transformation branch channel by channel. The mathematical formula is expressed as:

[0055]

[0056]

[0057] In the formula, This represents the intermediate feature map after being processed by reparameterizable deep convolution (RepDWConv) in the feature transformation branch; Indicates the first The recursively updated feature map is obtained after the depthwise convolution operation, where... Indicates the first Input features of the convolutional operation; This represents the final feature map after gating modulation. GELU(Z) Generate a continuous, positive or negative, smooth modulation coefficient for each channel / spatial location; This indicates element-wise multiplication.

[0058] In the gated control branch, the gated features are compressed back to the original channel dimension through 1×1 convolution, and the residuals are added to the input features while ensuring channel consistency.

[0059]

[0060]

[0061] In the formula, Indicates the process The feature map after convolutional channel compression and batch normalization is used to remap the gated high-dimensional features back to the channel dimension consistent with the input features. This represents the final output feature map of the gated feedforward feature enhancement module (GatedFFN); Representing input features The number of channels; Indicates the process Features after convolution channel compression The number of channels.

[0062] The SPPF module of the fourth feature extraction module is used for multi-scale contextual information aggregation and receptive field expansion, enhancing the feature representation ability of targets at different scales without introducing additional downsampling. The specific processing flow of this module includes: First, channel compression is performed on the input features using a 1×1 convolution:

[0063] In the formula, This represents the output feature after 1×1 convolution.

[0064] Subsequently, multiple sequential max-pooling operations are introduced, as expressed mathematically in the following formula:

[0065]

[0066]

[0067] In the formula, , , These represent the outputs after each max pooling process.

[0068] Furthermore, the original features and pooling features at each level are concatenated along the channel dimension to explicitly fuse multi-scale spatial responses. The mathematical formula is as follows:

[0069] In the formula, This indicates the output after concatenation.

[0070] Finally, 1×1 convolution is used to perform channel fusion and reshaping on the concatenated high-dimensional features. The mathematical formula is as follows:

[0071] In the formula, This represents the output after channel fusion and reshaping of the spliced ​​high-dimensional features.

[0072] Step S2: Input the multi-scale feature maps P3, P4 and P5 obtained in step S1 into the feature fusion network (i.e., the neck network) for processing to obtain enhanced feature maps that are both discriminative and scale robust.

[0073] Specifically, in combination Figure 1 In this step, the input consists of three feature maps P3, P4, and P5 at different scales, output from step S1, corresponding to high-resolution, medium-resolution, and low-resolution feature maps, respectively. A bidirectional multi-scale feature fusion mechanism is employed, including: (1) Top-down path: Upsample the high-level features and then concatenate them with the low-level features of the adjacent layers in the channel dimension, thereby passing the high-level semantic information to the high-resolution feature map step by step. Then, the ChannelC2f module is used to perform channel recombination and progressive feature fusion on the concatenated features.

[0074] (2) Bottom-up path: The low-level features are downsampled and then concatenated with the high-level features of the corresponding scale in the channel dimension. Then, the features are fused through the ChannelC2f module to supplement the shallow details to the mid-to-high-level features.

[0075] Specifically, in combination Figure 1 Detailed explanation of the bidirectional multi-scale feature fusion mechanism process: First, the high-level feature layer P5 is upsampled to align its spatial resolution with P4. The channel dimensions are then adjusted using a feature alignment module. Next, the upsampled feature is concatenated with the adjacent low-level feature layer (P4). The ChannelC2f module then performs channel recombination and progressive feature fusion on the concatenated feature to obtain an intermediate feature representation, denoted as feature map A1. Further, feature map A1 is upsampled again, and then concatenated with the adjacent low-level feature layer (P3). The ChannelC2f module then performs channel recombination and progressive feature fusion to obtain a high-resolution feature map for small target detection, denoted as feature map A2. The above process is expressed mathematically as follows: For the layer( ):

[0076]

[0077]

[0078] Building upon this foundation, shallow detail information is fed back to mid-to-high-level features through downsampling and re-fusion, ultimately forming multi-scale output features P3, P4, and P5, corresponding to the detection tasks of small, medium, and large targets, respectively. After completing the top-down feature enhancement, the network enters the bottom-up path aggregation stage.

[0079] First, the fused high-resolution feature, corresponding to the output of the P3 branch (feature map A2), is downsampled. Convolution halve the spatial size to align its resolution with the mid-level features. Simultaneously, the number of channels is adjusted using convolutional layers to ensure feature dimension matching. Then, the downsampled feature is concatenated with its adjacent high-level feature (feature map A1). The ChannelC2f module then performs channel recombination and progressive feature fusion on the concatenated feature, thus supplementing shallow detail information while preserving semantic information, resulting in the optimized P4 feature. For ease of description, the output can be denoted as feature map A3. Feature map A3 is then downsampled again to align its spatial resolution with its adjacent high-level feature (P5 layer), and channel alignment is achieved through convolutional layers. This feature is then concatenated with its adjacent high-level features, and the ChannelC2f module performs channel recombination and progressive feature fusion again, ultimately yielding the P5 feature with richer semantic information and enhanced detail expression capabilities. The output can be denoted as feature map A4. The mathematical expression for the above process is as follows: For the layer( ):

[0080]

[0081]

[0082] Through the aforementioned bidirectional fusion mechanism of upsampling to enhance semantics and downsampling to provide detail feedback, RemDet establishes sufficient information interaction paths between features at different scales, ultimately forming multi-scale output features P3, P4, and P5. P3 has the highest resolution and is primarily used for small target detection; P4 balances semantic and detail information and is suitable for medium-scale targets; P5 has the strongest semantic expression and is mainly responsible for large target detection. This overall structure enhances both the semantic expressive power of shallow features and the perception of detail information by deep features, thereby improving the model's detection performance for multi-scale targets in UAV scenarios.

[0083] Furthermore, it should be noted that the ChannelC2f module achieves multi-path feature interaction and progressive semantic enhancement while maintaining low computational complexity. Processing by this module effectively improves feature representation capabilities and provides more stable and discriminative input features for subsequent operations. The ChannelC2f module's processing flow is mainly as follows: First, the input features are channel-mapped and compressed using 1×1 convolutions. Then, the mapped features are divided into multiple groups of sub-features along the channel dimension. Some of these features serve as backbone features directly participating in subsequent fusion, while the remaining sub-features are sequentially fed into feature transformation units composed of lightweight convolutions for layer-by-layer updates. In the feature aggregation stage, the sub-features output from each stage are concatenated along the channel dimension, and channel fusion and information integration are completed using 1×1 convolutions, employing a "grouping-progressive-concatenation" approach. The following section provides a detailed explanation of the above process using mathematical formulas.

[0084] First, assume the input features are X Input features X Channel mapping and compression are performed using 1×1 convolution, and the output is denoted as U:

[0085] Divide into multiple sub-features:

[0086] Initialize the feature list:

[0087] Concatenated Bottleneck feature extraction (n times) is performed on all sub-features in set Y. The ChannelC2f module contains n concatenated DarknetBottlenecks, and the structure of each module is as follows:

[0088] When shortcut=False, the residual is omitted, and the recursive form of the k-th Bottleneck is:

[0089] And gradually add features to the set:

[0090] Then, the components are merged to obtain the final output:

[0091]

[0092] After fusing features using the combined top-down and bottom-up fusion mechanism of this invention, the output feature maps A2 and A3 are sequentially processed by the hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM, while the output feature map A4 is processed by the dual-scale spatial attention module DSAM. The resulting enhanced feature maps are then obtained. The HFEM and DSAM modules can be embedded into the feature fusion network, working collaboratively with the existing multi-scale feature fusion process to effectively improve detection performance without significantly increasing computational complexity.

[0093] It should be noted that, in combination Figure 2 The HFEM module is used to adaptively enhance the feature maps at various scales after bidirectional fusion, strengthen the high-frequency detail features of small targets, and suppress noise. The processing flow of this module is mainly as follows: Step 1: Extract low-frequency features from the input features using a 3×3 convolution; let the input features be... X :

[0094] In the formula, L This is the output result after 3×3 convolution.

[0095] The high-frequency components are then explicitly separated by a difference operation between the original features and the low-frequency features, denoted as:

[0096] In the formula, H The separated high-frequency components.

[0097] Step 2: Under the control of the initial enhancement coefficient, the high-frequency components are initially enhanced to obtain:

[0098] In the formula, This is used to initialize the enhancement coefficients.

[0099] Step 3: Enhance the features by using a channel mixing branch composed of 1×1 convolution and 3×3 convolution. X b Perform cross-channel information exchange to obtain featuresM ;

[0100] Step 4: Generate dynamic enhancement coefficients using global average pooling (GAP) and 1×1 convolution. s The ions are mapped to the [0,1] interval by the Sigmoid activation function and then clipped to [0.05,1.0]. Finally, the ions are processed... O = X + s ( M X It outputs refined high-frequency enhancement features and adaptively adjusts the high-frequency enhancement intensity for different images and scales.

[0101] Among them, dynamic enhancement coefficient s The expression is as follows:

[0102] In the formula, σ( ) represents the Sigmoid activation function, which maps features to dynamic enhancement coefficients in the interval [0,1].

[0103] Dynamic enhancement coefficient range clipping: .

[0104] By pruning the range of the dynamic enhancement coefficients, we can effectively avoid excessive suppression or abnormal amplification of features, thereby ensuring the stability of the feature enhancement process and improving the model's robust representation of the target features.

[0105] Combination Figure 3 The DSAM module constructs a multi-scale spatial attention mechanism to explicitly model key regions, effectively suppressing complex background interference while highlighting foreground targets. The main processing flow of this module is as follows: Step 1, Assume the input is Lightweight residual transformation is performed on the input features using depthwise separable convolution to obtain residual features. R i This reduces computational overhead while preserving semantic information.

[0106] Step 2: Introduce a prediction guidance mechanism to generate a prediction guidance graph. P i residual characteristics R i according to P i Divided into foreground branch features Fi fg Background branch features F i bg Modeling is performed separately for potential target regions and non-target regions. The following prediction guidance mechanism is introduced:

[0107]

[0108] in, Indicates the first The prediction guidance graph for the next forward propagation, σ maps the previous layer prediction to the [0,1] interval, and Interp represents the spatial scale alignment operation.

[0109] The residual features are divided into foreground and background branches, which are used to model the potential target region and the non-target region respectively.

[0110] in, Indicates the first i Foreground guidance features of the layer; Indicates the first i Background suppression features of the layer.

[0111] Step 3: In the two branches obtained in Step 2, extract multi-scale context information using ASPP modules with different expansion rates:

[0112] In the formula, This represents the foreground enhancement feature after performing ASPP multi-scale context modeling on the foreground features; This represents the background perception features after ASPP modeling of background features, in order to improve the perception of targets at different scales.

[0113] Step 4: Fuse the foreground enhancement features with the background perception features:

[0114] After fusion, a new spatial attention map is generated through a prediction layer for subsequent feature enhancement guidance.

[0115]

[0116] Finally, the enhanced features are connected to the original residual features via residual concatenation. R i The summation outputs spatial attention-enhanced features, ensuring the stability and discriminativeness of the feature representation.

[0117] The final Neck output features are:

[0118] And simultaneously retain the predicted graph sequence: .

[0119] Step S3: Input the enhanced feature map obtained in step 2 into the head detection and prediction module to obtain the final output target detection result.

[0120] In this step, the Head module is used for the final object detection result. The overall structure of the Head module consists of three parts: feature integration, classification prediction, and bounding box regression. First, for feature maps from different scales, convolutional transformation is introduced to perform unified spatial modeling and distribution correction on the features. Then, while maintaining the spatial resolution, the features are divided into classification branches and regression branches, which are used for target class confidence estimation and geometric location modeling, respectively.

[0121]

[0122] In the classification branch, 1×1 convolution is used to directly map features to the category dimension; and the output is normalized by the Sigmoid activation function to obtain the existence probability of each category corresponding to each spatial location, thereby supporting parallel prediction of multi-class and multi-instance targets.

[0123]

[0124]

[0125] In the regression branch, a bounding box regression strategy based on distribution modeling is introduced. The model predicts the distance distribution of the target bounding box to the location in four directions. The distances in the four directions of the target box are represented as discrete probability distributions, and the distance distribution in each direction is normalized by Softmax. Continuous geometric offsets and predicted distance vectors are obtained through expectation calculation. Finally, the predicted distances are decoded by combining the prior positions corresponding to the feature maps to obtain the complete bounding box representation of the target.

[0126]

[0127]

[0128]

[0129]

[0130]

[0131] The method of this invention effectively solves the problems of drastic changes in target scale, high proportion of small targets, complex background and easy confusion between foreground and background in UAV image detection scenarios. While maintaining the efficiency of the overall detection framework, it improves the target detection accuracy and small target recognition ability, thereby making up for the shortcomings of existing detection methods such as insufficient feature expression, insufficient utilization of multi-scale information and limited foreground suppression ability in complex scenarios.

[0132] Example 1 In this embodiment, the method described in this invention is used for training and validation on the VisDrone2019-DET dataset.

[0133] I. Dataset Selection The selected VisDrone dataset is a large-scale public dataset for unmanned aerial vehicle (UAV) target detection and tracking tasks. Collected by the Institute of Automation, Chinese Academy of Sciences, the dataset contains images from various real-world UAV scenarios, including complex environments such as city streets, residential areas, campuses, parking lots, and highways. The images have a wide resolution range, reaching up to 3840×2160, with significant variations in shooting height and viewpoint. Target scale differences are obvious, and occlusion and density are common. The VisDrone dataset contains 10 common target classes, such as pedestrians, cars, buses, bicycles, trucks, and motorcycles, characterized by a high proportion of small targets and complex backgrounds, placing high demands on the robustness of the detection algorithm. In our experiments, we converted the VisDrone dataset to COCO format and performed scale normalization on the original images. Finally, following the official classification, the dataset was divided into training, validation, and test sets for model training, validation, and performance evaluation.

[0134] II. Model Training The detection network proposed in this invention was trained and evaluated on the VisDrone2019-DET dataset. The original UAV images were first processed by data augmentation and scale normalization, and all input images were uniformly adjusted to a spatial resolution of 640×640.

[0135] During the training phase, a Mosaic data augmentation strategy was employed, stitching multiple images together before inputting them into the network. This was combined with augmentations such as Random Affine, HSV color perturbation, and random flipping to improve the model's robustness to scale changes and complex scenes. Mosaic augmentation was disabled in the last 10 epochs of training to enhance the model's convergence stability. During the validation and testing phases, only proportional scaling and LetterBox padding were used, without introducing any additional random augmentations.

[0136] The model was trained using the SGD (Stochastic Gradient Descent) optimizer with an initial learning rate of 0.01, a momentum parameter of 0.937, and a weight decay factor of 0.0005. Training lasted 300 epochs, with a batch size of 16 per GPU. To accelerate convergence in the early stages of training and improve overall performance, a linear warm-up strategy of 10 epochs was introduced, followed by dynamic adjustment of the learning rate according to YOLOv5's default linear learning rate decay strategy. During model training, the EMA (Exponential Moving Average) mechanism was used to smoothly update the parameters, further enhancing the model's generalization performance.

[0137] The specific hyperparameter settings are shown in Table 1: Table 1 Training Hyperparameters

[0138] III. Implementation of Testing Step 1: Acquire the remote sensing image of the UAV to be detected, normalize the image scale, and input it into the backbone network of the detection network of this invention to extract features, obtaining multi-scale feature maps P3, P4, and P5 that simultaneously contain high-level semantic information and low-level spatial detail information: The feature extraction process in the backbone network consists of four stages, with the number of channels being 128, 256, 512, and 1024, respectively.

[0139] First, the input image undergoes a 3x3 convolution with a stride of 2, followed by a GatedFFN module (n=3). Then, the downsampled features are subjected to channel expansion and non-linear modeling. First, a 1x1 convolution maps the number of channels to twice the original number. Then, the channel dimension is divided into feature branches and gated branches. Gating weights are generated using the GELU activation function. The main branch features are then modulated element-wise, and residual connections are used to output a feature representation with the same size as the input. The output is a feature map with 128 channels and a resolution reduced to 1 / 4.

[0140] Next, the input is fed into the CED module for feature downsampling and initial enhancement. It uses depthwise separable convolution and spatial rearrangement to reduce the feature map resolution by a factor of 2 while maintaining the integrity of information in the channel dimension. Then, the GatedFFN module (n=3) performs channel expansion and nonlinear modeling on the downsampled features. First, a 1×1 convolution maps the number of channels to twice the original number. Then, the channel dimension is divided into feature branches and gated branches. The GELU activation function generates gate weights, and the main branch features are modulated element-wise. Finally, a residual connection is used to output a feature representation with the same size as the input, resulting in P3.

[0141] Then, the input is processed into the CED module and the GatedFFN module (n=6) to obtain P4.

[0142] Finally, the input is fed into the CED module for feature downsampling and initial enhancement. Then, it enters the GatedFFN module (n=3) to perform channel expansion and nonlinear modeling on the downsampled features. The features are then divided into feature branches and gated branches along the channel dimension. Gating weights are generated using the GELU activation function, and the main branch features are modulated element-wise. The output feature representation, consistent with the input size, is then connected via residuals. Finally, it enters the SPPF module for further processing, resulting in P5.

[0143] It should be noted that the processing flow of feature maps entering the GatedFFN module is as follows: S1, firstly, maps the input features to a high-dimensional space through 1×1 convolution; S2 is divided into two groups of sub-features in the channel dimension, which are used for the feature transformation branch and the gating control branch, respectively. S3, in the feature transformation branch, introduces a reparameterizable deep convolution RepDWConv to spatially model the features, and then stacks DWConv(n) (1 time); The gated branch generates dynamic weights through a nonlinear activation function, performs gated activation, and modulates the output of the feature transformation branch channel by channel. S4, the gated features are compressed back to the original channel dimension by 1×1 convolution, and the residuals are added to the input features while satisfying channel consistency.

[0144] The processing flow of feature maps entering the CED module is as follows: S1, firstly, the input features are compressed by 1×1 convolution, and the number of channels is reduced to 1 / 2; S2, then introduces a 3×3 depthwise separable convolution to model each channel independently, and the resolution becomes 1 / 2; S3 further adopts a space-to-channel strategy, which reorganizes pixels at different odd and even positions in the feature map according to a predetermined rule and splices them in the channel dimension, thereby reducing the spatial size by half while fully preserving the local response of the original features, and the number of channels becomes 4 times. S4. Finally, channel fusion and compression are performed on the concatenated high-dimensional features through 1×1 convolution to output the downsampled feature representation.

[0145] The processing flow of feature maps into the SPPF module is as follows: S1, first use 1×1 convolution to compress the input features into channels, reducing the number of channels to 1 / 2; S2, followed by multiple serial max pooling operations, with the number of channels remaining unchanged; S3 further concatenates the original features with pooling features at each level along the channel dimension, explicitly fusing multi-scale spatial responses, and the number of channels becomes 4 times. S4. Finally, a 1×1 convolution is used to perform channel fusion and reshaping on the concatenated high-dimensional features. The final size and number of channels are the same as before entering SPPF.

[0146] Step 2: The multi-scale feature maps P3, P4 and P5 extracted in Step 1 are processed using a two-way fusion mechanism that combines top-down and bottom-up approaches.

[0147] First, in the top-down path, high-level features are concatenated with low-level features from adjacent layers in the channel dimension through upsampling operations, thereby progressively transmitting high-level semantic information to the high-resolution feature map. Then, the ChannelC2f module is used to perform channel recombination and progressive feature fusion on the concatenated features.

[0148] Next, in the bottom-up path, the low-level features are downsampled and then concatenated with the high-level features of the corresponding scale, and feature fusion is performed through the ChannelC2f module.

[0149] Finally, the bidirectional fused feature maps from top-down and bottom-up are input into the HFEM and DSAM modules for processing, and then output to the head network for detection.

[0150] It should be noted that the processing flow of feature maps entering the ChannelC2f module is as follows: S1, firstly, the input features are channel-mapped and compressed through a 1×1 convolution, and the number of channels is doubled; S2, then the mapped features are divided into multiple groups of sub-features in the channel dimension. Some of the features are used as backbone features to directly participate in subsequent fusion. The cascaded Bottleneck features are extracted n times (n=3), and the remaining sub-features are sequentially fed into the feature transformation unit composed of lightweight convolutions for layer-by-layer updates. In S3, during the feature aggregation stage, the sub-features output from each stage are spliced ​​together along the channel dimension, and channel fusion and information integration are completed through 1×1 convolution, reducing the number of channels to half.

[0151] The processing flow of feature maps after they enter HFEM is as follows: S1 first extracts low-frequency features from the input features using a 3×3 convolution; then, it explicitly separates high-frequency information by using a difference operation between the original features and the low-frequency features. S2, under the control of the initial enhancement coefficient, the high-frequency components are initially enhanced; S3, next, introduces a channel compression and blending branch consisting of 1×1 and 3×3 convolutions to perform cross-channel information interaction on the enhanced features; S4. Finally, global average pooling is used to generate dynamic enhancement weights, which adaptively adjust the high-frequency enhancement intensity for different images and scales, resulting in refined enhancement of the feature representation while maintaining the same size.

[0152] The processing flow of feature maps after entering DSAM is as follows: S1, firstly, lightweight residual transformation is performed on the input features through depthwise separable 1×1 convolution; S2, subsequently, a predictive guidance mechanism is introduced; S3, then divide the features into foreground branches and background branches, and model the potential target region and non-target region respectively; S4, in the two branches, use ASPP modules with different expansion rates to extract multi-scale contextual information; S5, Next, the features of the foreground and background branches are merged; S6, then a new spatial attention map is generated through the prediction layer to guide the feature enhancement in the next stage; S7. Finally, the enhanced features are added to the original residual features via residual connections to ensure the stability and discriminative power of the feature representation. The dimensions remain unchanged.

[0153] Step 3: Input the enhanced feature map obtained in Step 2 into the head network to obtain the final output target detection result. The main detection process is as follows: First, a 1×1 convolution transformation is introduced to perform unified spatial modeling and distribution correction on feature maps from different scales. Then, while keeping the spatial resolution unchanged, the features are divided into classification branches and regression branches, which are used for target class confidence estimation and geometric location modeling, respectively.

[0154] In the classification branch, 1×1 convolution is used to directly map features to the category dimension; and the output is normalized by the Sigmoid activation function to obtain the existence probability of each category corresponding to each spatial location.

[0155] In the regression branch, a bounding box regression strategy based on distribution modeling is introduced. The model predicts the distance distribution from the target bounding box to the location in four directions. The distance distribution in each direction is normalized by Softmax. Continuous geometric offsets and predicted distance vectors are obtained through expectation calculation. Finally, the predicted distances are decoded by combining the prior positions corresponding to the feature maps to obtain the complete bounding box representation of the target.

[0156] The experimental results of the detection network of this invention on the VisDrone dataset are shown in Table 2: Table 2 Experimental Results

[0157] Note: Bold text indicates the optimal value of the indicator. Figure 4 The invention demonstrates the visualized detection results output after detecting images in the VisDrone dataset using the method of this invention. The method of this invention can effectively suppress interference from green plants, buildings, and dimly lit backgrounds, and accurately identify small targets such as pedestrians and vehicles in the images, thereby achieving high-precision, real-time target detection of UAV images. It solves the problems of poor small target recognition, large background interference, and coarse feature fusion in existing technologies, and can be widely used in UAV visual inspection fields such as security patrol, traffic monitoring, disaster assessment, and agricultural and forestry monitoring, with significant industrial application value.

[0158] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.

Claims

1. A method for target detection in UAV images, characterized in that: Using the RemDet detector as the baseline model, a hierarchical feature enhancement module HFEM and a dual-scale spatial attention module DSAM are embedded in the feature fusion network of the baseline model to achieve target detection in UAV images. The specific steps include the following: Step S1: Obtain the remote sensing image of the UAV to be detected, input it into the backbone network for feature extraction, and output a high-resolution feature map P3 containing shallow detail information, a mid-level feature map P4, and a low-resolution feature map P5 containing high-level semantic information. Step S2: Input the feature maps P3, P4, and P5 obtained in step S1 into the feature fusion network. First, perform bidirectional multi-scale feature fusion from top to bottom and bottom to top. Then, perform feature enhancement and spatial attention modeling through the hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM in sequence to output an enhanced feature map that is both discriminative and scale robust. Step S3: Input the enhanced feature map obtained in step S2 into the detection head network, perform classification prediction and bounding box regression based on distribution modeling respectively, and output the target detection results of the UAV image.

2. The method for detecting targets in UAV images according to claim 1, characterized in that, In step S2, the bidirectional multi-scale feature fusion process of top-down and bottom-up involves first performing top-down path fusion followed by bottom-up path fusion, wherein: Top-down approach: Upsample high-level features, then concatenate them with low-level features from adjacent layers along the channel dimension, and finally use the ChannelC2f module for channel recombination and progressive feature fusion. Bottom-up approach: Low-level features are downsampled and then concatenated with high-level features of the corresponding scale in the channel dimension. The features are then fused through the ChannelC2f module to supplement shallow details to mid-to-high-level features.

3. The method for detecting targets in UAV images according to claim 2, characterized in that, In step S2, the feature maps P3 and P4 output after bidirectional multi-scale feature fusion are processed by the cascaded hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM. At the same time, the feature map P5 output after bidirectional multi-scale feature fusion is processed by the dual-scale spatial attention module DSAM. The output results are all input into the detection head network.

4. The method for detecting targets in UAV images according to claim 3, characterized in that, The hierarchical feature enhancement module HFEM is used to adaptively enhance the feature maps at various scales after bidirectional fusion, strengthen the high-frequency detail features of small targets, and suppress noise. Its processing flow includes: Step 1: Extract low-frequency features from the input features using 3×3 convolution, and then explicitly separate high-frequency components by difference operation between the original features and the low-frequency features. H ; Step 2, in the initial enhancement coefficient Under the control of the high frequency components obtained in step 1 H Preliminary enhancement is performed to obtain enhanced features. ; Step 3: Enhance the features obtained in Step 2 by using a channel mixing branch composed of 1×1 convolution and 3×3 convolution. Perform cross-channel information exchange to obtain features M ; Step 4: Generate dynamic enhancement coefficients through global average pooling and 1×1 convolution. s After Sigmoid activation and cropping, the final result is obtained through... O = X + s ( M X Output refined high-frequency enhanced features.

5. The method for detecting targets in UAV images according to claim 3, characterized in that, The dual-scale spatial attention module (DSAM) constructs a multi-scale spatial attention mechanism to explicitly model key regions, effectively suppressing complex background interference while highlighting foreground targets. Its processing flow includes: Step 1: Let the input be... Lightweight residual transformation is performed on the input features using depthwise separable convolution to obtain residual features. R i ; Step 2: Introduce a prediction guidance mechanism to generate a prediction guidance graph. P i residual characteristics R i according to P i Divided into foreground branch features F i fg Background branch features F i bg Modeling is performed on potential target regions and non-target regions respectively; Step 3: Apply the two branches obtained in Step 2 to the ASPP modules with different expansion rates. F i fg , F i bg Multi-scale contextual information is extracted separately to obtain the corresponding foreground enhancement features. and background-aware features ; Step 4: Fuse the foreground enhancement features with the background perception features, generate a new spatial attention map through the prediction layer, and then connect the enhancement features with the original residual features through residual connections. R i The summation produces spatial attention-enhanced features in the output space.

6. The method for detecting targets in UAV images according to claim 5, characterized in that, The introduced predictive guidance mechanism is as follows: in, Indicates the first The prediction guidance graph for the next forward propagation, σ maps the previous layer prediction to the [0,1] interval, and Interp represents the spatial scale alignment operation.

7. The method for detecting targets in UAV images according to claim 5, characterized in that, The process of dividing the residual features into foreground and background branches, and modeling the potential target region and non-target region respectively, is as follows: in, Indicates the first i Foreground guidance features of the layer; Indicates the first i Background suppression features of the layer.

8. A method for detecting targets in UAV images according to any one of claims 1-7, characterized in that, The backbone network includes a first feature extraction module, a second feature extraction module, a third feature extraction module, and a fourth feature extraction module connected in sequence. The first feature extraction module includes a 3×3 convolutional module and a GatedFFN module connected in sequence. The second and third feature extraction modules are both composed of a CED module and a GatedFFN module cascaded together, and after processing, they output feature maps P3 and P4, respectively. The fourth feature extraction module is composed of a CED module, a GatedFFN module, and an SPPF module cascaded together, and after processing, it outputs feature map P5.

9. A target detection device for unmanned aerial vehicle (UAV) images, characterized in that, The apparatus is used to perform the UAV image target detection method as described in any one of claims 1-8, and the apparatus specifically includes: The image acquisition module is used to acquire remote sensing images of the UAV to be detected, and to perform scale normalization and format conversion processing on the images; The feature extraction module is a four-level backbone network built based on CED, GatedFFN and SPPF modules. It is used to extract features from the standard-size image tensor at multiple scales and output shallow high-resolution feature map P3, mid-level feature map P4 and deep low-resolution feature map P5. The feature fusion enhancement module is a neck network that embeds the hierarchical feature enhancement module HFEM and the dual-scale spatial attention module DSAM. It is used to perform bidirectional multi-scale feature fusion of P3, P4 and P5 from top to bottom and from bottom to top. Then, the HFEM module realizes hierarchical adaptive enhancement of features and the DSAM module realizes spatial attention modeling, outputting an enhanced feature map that is both discriminative and scale robust. The detection and prediction module is used to perform classification prediction and distribution-based bounding box regression on the enhanced feature map, and output the category information and accurate bounding box coordinates of the target in the UAV image to complete the target detection.

10. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the UAV image target detection method as described in any one of claims 1-8.