A High-Precision UAV Detection Method Based on Improved Attention and Gaussian Regression Constraints

CN122574692APending Publication Date: 2026-08-14CHONGQING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-14
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

然而,针对轻小型无人机检测场景,现有YOLO模型仍面临诸多技术瓶颈:远距离无人机目标像素占比极低,特征信息稀疏,传统特征提取模块难以有效捕捉;复杂背景下的通道级噪声易掩盖目标语义特征,导致目标与背景区分困难;传统IoU类损失函数对小目标位置偏移敏感,且大目标损失易掩盖小目标损失,造成模型训练失衡

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122574692A_ABST
    Figure CN122574692A_ABST
Patent Text Reader

Abstract

This invention discloses a high-precision UAV detection method based on improved attention and Gaussian regression constraints, belonging to the field of target detection technology. A detection model is built based on YOLOv13n. An enhanced spatial coordinate attention module (SCE) is embedded in the Backbone network to strengthen the extraction of spatial location features of small UAV targets. A CSR module is introduced after the shallow feature map B3 output by the Backbone to achieve differentiated enhancement of channel semantic features and background suppression. The SCE and CSR modules are integrated into the HyperACE feature fusion module to construct a cross-scale, cross-dimensional feature enhancement path. A Gaussian weighted regression (GWR) loss function is used to replace the original regression loss, and the regression accuracy of small target bounding boxes is improved through Gaussian distribution modeling and scale-adaptive weight adjustment. In the inference stage, a SAHI slice-assisted inference method is introduced to fuse local slice inference and global full-scale inference results. This invention improves the accuracy of UAV detection while maintaining a lightweight design and adapts to the multi-scale UAV detection needs in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and more specifically to a high-precision detection method for unmanned aerial vehicles (UAVs) based on improved attention and Gaussian regression constraints. Background Technology

[0002] The rapid rise of the low-altitude economy has led to the increasingly widespread application of small and lightweight drones in search and rescue, cargo transportation, and security. However, their illegal activities, such as unauthorized flights and overtaking of restricted areas, have also brought serious safety hazards, posing a severe challenge to aviation order, public safety, and the protection of critical facilities. Traditional drone detection technologies mainly rely on radar, radio frequency signal capture, and infrared spectral identification. However, these methods have significant limitations: radar detection is not sensitive enough to the low radar cross-section (RCS) targets of small and lightweight drones and is easily affected by terrain and clutter; radio frequency detection is difficult to deal with drones using encrypted communication or flying silently; and infrared detection performance degrades significantly under complex lighting conditions. In addition, these technologies generally suffer from problems such as bulky equipment, high deployment costs, and complex operation, making it difficult to achieve large-scale application outside of specialized fields. Therefore, there is an urgent need to develop low-cost, highly adaptable intelligent detection solutions.

[0003] The development of deep learning has driven innovation in computer vision for object detection. Single-stage detection models, with their efficient end-to-end learning capabilities, have become the mainstream choice for anti-drone detection. Among them, the YOLO series models stand out due to their advantages such as speed, low resource requirements, and ease of deployment. From YOLOv4 to the latest YOLOv13, the models have demonstrated strong generalization capabilities in multi-scale object detection tasks through optimizations such as feature layer enhancement and lightweight module design. However, for the detection of small and light drones, existing YOLO models still face many technical bottlenecks: the pixel ratio of long-range drone targets is extremely low, and the feature information is sparse, making it difficult for traditional feature extraction modules to effectively capture them; channel-level noise in complex backgrounds can easily mask the semantic features of the target, making it difficult to distinguish the target from the background; traditional IoU-type loss functions are sensitive to the positional shift of small targets, and the loss for large targets can easily mask the loss for small targets, causing model training imbalance. These problems directly lead to high false negative rates and insufficient localization accuracy in practical applications, making it difficult to meet the practical needs of anti-drone detection.

[0004] To address the aforementioned issues, Chinese patent (publication number: CN119863725A) proposes a UAV target detection method based on the YOLO-LiteMax neural network. This method reduces feature redundancy by replacing the Bottleneck block of the C2t module in the backbone network with a FasterNet block. It also performs differentiated processing on feature maps of different scales in the neck network, enlarges the scale feature maps to highlight small target information, and uses group normalization and shared convolution in the head network to further extract features. This effectively enhances the UAV's ability to detect dense small targets. However, this patent does not design a dedicated spatial coordinate enhancement and channel semantic refinement mechanism for small targets, and there is still room for improvement in the positioning accuracy of small UAVs in complex backgrounds. Another Chinese patent (publication number: CN120375240A) proposes a method for small target detection in UAVs based on SRF-YOLO. It enhances feature extraction and aggregation capabilities by introducing a receptive field convolutional block attention module (RFCBAM) and a focus modulation module (FMM), and constructs a smooth feature pyramid network (S-FPN) to fuse multi-scale features and suppress noise, which significantly improves the detection accuracy of small targets in UAV images. However, this patent does not optimize the scale adaptability of the loss function, nor does it introduce a slice-assisted inference strategy. In long-distance, low-pixel UAV detection scenarios, it still suffers from high false negative rates and large localization deviations.

[0005] Therefore, there is an urgent need for a drone detection technology solution that balances lightweight design and high precision, addressing the shortcomings of existing technologies in areas such as small target capture, complex background suppression, and scale adaptability, and enabling accurate and efficient detection of small drones. Summary of the Invention

[0006] To address the aforementioned technical problems, this application discloses a high-precision UAV detection method based on improved attention and Gaussian regression constraints, specifically including:

[0007] Acquire the image to be detected and input the image to be detected into the detection model based on YOLOv13n;

[0008] The spatial coordinate enhancement attention module (SCE) in the Backbone network of the detection model is used to enhance the spatial coordinate features of the image to be detected, thereby obtaining spatial enhancement features.

[0009] The spatial enhancement features are processed by the CSR channel semantic refinement attention module after the shallow B3 features are extracted from the Neck network of the detection model and then accessed to perform channel semantic refinement on the spatial enhancement features to obtain semantic enhancement features.

[0010] By replacing the original regression loss function with the GWR Gaussian weighted regression function in the Head network of the detection model, bounding box regression and target classification are performed on the semantic enhancement features to obtain preliminary detection results.

[0011] The SAHI slice-assisted reasoning method is used to slice the image to be detected and perform local reasoning. The local reasoning results are then fused with the preliminary detection results to obtain the UAV detection results.

[0012] Preferably, the SCE spatial coordinate enhancement attention module enhances spatial coordinate features, including:

[0013] For the input feature map Perform directional adaptive average pooling in both the vertical and horizontal directions to obtain vertical features. and horizontal features ,in For batch size, Input the number of channels. and These are the height and width of the feature map, respectively. The calculation process is as follows:

[0014]

[0015]

[0016] Will and The intermediate features are obtained by concatenating along the height dimension, followed by 1×1 convolutional channel compression, BatchNorm normalization, and SiLU activation. ;

[0017] Will Segmented into vertical branch features and horizontal branching features Vertical attention weights are generated by restoring the number of channels through 1×1 convolution and then activating with a Sigmoid function. And horizontal attention weights ;

[0018] Through broadcasting mechanism , The spatially enhanced features are obtained by multiplying them element-wise with the original input feature map. .

[0019] Preferably, when the 1×1 convolution performs channel compression, the number of intermediate channels is... satisfy Through dynamic adjustment The value of is used to ensure the number of input channels. Even at a small size, it can still maintain sufficient feature expression ability.

[0020] Preferably, the vertical attention weight And horizontal attention weights The generation process is as follows:

[0021]

[0022]

[0023] in and for Vertical and horizontal feature branches after segmentation along the height dimension, This is the Sigmoid activation function.

[0024] Preferably, the CSR channel semantic refinement attention module performs channel semantic refinement processing on the spatial enhancement features, including:

[0025] Based on the branch parameter and the current branch identifier, determine the target task branch for which the module takes effect; otherwise, directly output the original features.

[0026] Calculate the spatial dimension variance of the input feature map for the target branch. Generate dynamic regularization coefficients ;

[0027] Calculate the mean of spatial dimension features The squared central feature is obtained. Spatial attention weights are calculated based on the following formula. : , , ,in , Use the Sigmoid activation function;

[0028] Channel attention weights are generated using global average pooling and a lightweight MLP. ,Will and By fusing and weakening the intensity, and combining it with a learnable parameter α with L2 regularization, semantically enhanced features are obtained. .

[0029] Preferably, the channel compression ratio of the lightweight MLP is... Channel attention weights are generated through a concatenated structure of fully connected dimensionality reduction, ReLU activation, fully connected dimensionality increase, and Sigmoid activation. After dimensional adjustment, the result is obtained .

[0030] Preferably, the semantic enhancement feature The generation satisfies ,in α represents the joint attention weights after spatial and channel fusion, and α is a learnable parameter with L2 regularization, used to control the intensity of feature enhancement and suppress overfitting.

[0031] Preferably, the GWR Gaussian weighted regression loss function is used for bounding box regression, including:

[0032] Convert the predicted bounding boxes and the true bounding boxes to center-width-height format. ,in , , , And modeled as a 2D Gaussian distribution;

[0033] Calculate the Wasserstein distance between two Gaussian distributions: ,in This represents the difference between the predicted and actual values ​​of each parameter;

[0034] By introducing a normalization constant and a zero-prevention constant, the Wasserstein distance is converted into a normalized loss: ,in and All of these are constant parameters defined in the GWR Gaussian weighted regression loss function.

[0035] Preferably, the GWR Gaussian weighted regression loss function further includes scale-adaptive weight adjustment, specifically:

[0036] Calculate the area of ​​the true bounding box Initial weights are generated based on the bounding box area: The initial weights are normalized to obtain ,in The maximum initial weight within the current batch;

[0037] By fusing the normalized loss and the scale-adaptive weights, we obtain the target regression loss: .

[0038] Preferably, the SAHI slice-assisted inference method fuses the detection results, including:

[0039] The image to be detected is segmented into indivual Overlapping tiles Maintain the aspect ratio and adjust the size of each block;

[0040] For each overlapping patch, a forward pass for object detection is performed independently, while full inference is performed on the original image to detect large-scale objects.

[0041] The inference results of overlapping patches and the full inference results are restored to the original image size. The merging results are then merged using non-maximum suppression, and patches below a preset matching threshold are removed. The detection frame and detection probability are lower than The detection results are used to obtain the target detection results.

[0042] Compared with the prior art, the technical solution of this application has the following technical effects:

[0043] The high-precision UAV detection method of this application can accurately capture the spatial coordinate features of small UAV targets by embedding a SCE spatial coordinate enhanced attention module in the backbone network, effectively preserving the target position details, so that the model can enhance the localization ability of small targets in the feature extraction stage, while suppressing the interference of background noise on key features, and providing a more reliable feature basis for subsequent detection.

[0044] This invention enhances channel-level features by integrating a CSR channel semantic refinement attention module into the Neck network, accurately distinguishing the semantic differences between UAV targets and complex backgrounds, avoiding feature confusion. At the same time, it optimizes features for classification and regression tasks through a branch separation mechanism, improving the model's understanding and expression of target semantics and enhancing the targeting of detection.

[0045] This invention employs the Gaussian weighted regression loss function (GWR) to model the bounding box as a 2D Gaussian distribution. By measuring the distribution difference through Wasserstein distance, it can more sensitively capture the position and scale deviation of small targets. At the same time, through scale-adaptive weight adjustment, it balances the loss contribution of targets of different scales, making the model more focused on learning about micro-drones during training, thereby improving the overall regression accuracy and detection recall.

[0046] This invention introduces the SAHI slice-assisted inference method, which effectively captures the local features of small drones at long distances by fusing local slice inference and global full-scale inference on high-resolution images. At the same time, it avoids missed detection of large targets due to slice segmentation. Without significantly increasing the computational burden, it improves the detection completeness and robustness of the model in complex scenarios and adapts to the drone detection needs of multiple scenarios.

[0047] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.

[0048] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0050] Based on the description of the figures and their corresponding technical content in the document, the titles of the figures are as follows:

[0051] Figure 1 Flowchart of a high-precision UAV detection method based on improved attention and Gaussian regression constraints;

[0052] Figure 2 A schematic diagram of the Backbone-Neck-Head three-segment network architecture of the SCG-YOLO detection model;

[0053] Figure 3 Schematic diagram of input processing and feature fusion principle of SCE spatial coordinate enhanced attention module;

[0054] Figure 4 Branching and joint attention fusion structure diagram of the CSR channel semantic refinement attention module;

[0055] Figure 5 Flowchart of slice processing, local reasoning, and result fusion in the SAHI slice-assisted reasoning method;

[0056] Figure 6 Thermal infrared image sequence samples and target annotation maps of the AntiUAV600 anti-drone dataset;

[0057] Figure 7 A bar chart comparing the performance of different detection models on the metrics of P, R, mAP50, and mAP50-95;

[0058] Figure 8 A schematic diagram comparing the PR curves and F1-confidence curves of each detection model;

[0059] Figure 9 Comparison of detection performance of different detection models in complex backgrounds and scenes with small targets;

[0060] Figure 10 A comparison of the detection performance of various improved models on micro-UAV targets in the ablation experiment. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.

[0062] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0063] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0064] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.

[0065] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.

[0066] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.

[0067] Example 1

[0068] This embodiment mainly describes a high-precision UAV detection method based on improved attention and Gaussian regression, such as Figure 1 As shown, it specifically includes:

[0069] Acquire the image to be detected and input the image to be detected into the detection model based on YOLOv13n;

[0070] The spatial coordinate enhancement attention module (SCE) in the Backbone network of the detection model is used to enhance the spatial coordinate features of the image to be detected, thereby obtaining spatial enhancement features.

[0071] The spatial enhancement features are processed by the CSR channel semantic refinement attention module after the shallow B3 features are extracted from the Neck network of the detection model and then accessed to perform channel semantic refinement on the spatial enhancement features to obtain semantic enhancement features.

[0072] By replacing the original regression loss function with the GWR Gaussian weighted regression function in the Head network of the detection model, bounding box regression and target classification are performed on the semantic enhancement features to obtain preliminary detection results.

[0073] The SAHI slice-assisted reasoning method is used to slice the image to be detected and perform local reasoning. The local reasoning results are then fused with the preliminary detection results to obtain the final UAV detection results.

[0074] Furthermore, such as Figure 2 As shown, the detection model SCG-YOLO in this application is based on the YOLOv13n framework and has been customized and improved. It strictly follows the classic three-stage architecture of Backbone-Neck-Head. At the same time, by embedding a self-developed feature enhancement module, optimizing the loss function, and introducing enhancement strategies in the inference stage, a full-link optimization system adapted to UAV detection scenarios is formed.

[0075] The model's input processing flow has a clear standardization specification: the images to be detected cover both infrared and visible light images. After being input into the model, pixel values ​​are first standardized, mapping pixel grayscale or RGB values ​​to a preset range to eliminate feature distribution shifts caused by differences in illumination between different images. Then, adaptive scaling is performed according to the model's preset input size (default 640×640 pixels). During scaling, the original aspect ratio of the image is strictly maintained, and target shape distortion is avoided by filling edge pixels, ensuring that the spatial structural features of the UAV target are not destroyed. Finally, the processed images are batched, and the batch size (B) can be dynamically configured according to hardware computing resources (default value is 16). The batched image data will be input into the Backbone network in sequence to start the feature extraction process.

[0076] The deployment locations and functional divisions of the core components of the model are clearly defined: the Backbone network, as the core of feature extraction, retains the three core innovative mechanisms of YOLOv13n—HyperACE high-order semantic capture mechanism, FullAD full-link feature enhancement architecture, and DSC3k2 lightweight module. The HyperACE mechanism achieves accurate capture of high-order many-to-many semantic relationships through adaptive hyperedge generation and hypergraph convolution. The FullAD architecture integrates feature enhancement throughout the Backbone, Neck, and Head networks to ensure continuous enhancement of feature expression capabilities. The DSC3k2 module, through depthwise separable convolution and lightweight structure design, reduces computational complexity while ensuring feature extraction efficiency. This application embeds features into the feature extraction link of the Backbone network. The SCE spatial coordinate enhancement attention module is specifically designed to enhance the spatial location features of small UAV targets, compensating for the original network's inadequacy in capturing weak location signals. The Neck network performs feature fusion, connecting to the CSR channel semantic refinement attention module after shallow feature extraction in B3, forming a "space-channel" dual-dimensional collaborative enhancement system with the SCE module to achieve comprehensive optimization from location features to semantic features. The Head network includes three detection heads—large, medium, and small—to adapt to UAV targets of different scales, while replacing the original regression loss with the GWR Gaussian weighted regression loss function to address the problem of insufficient localization accuracy for small targets. The SAHI slice-assisted inference method only takes effect during the model inference stage, fusing with the detection results of the Head network to form the final detection output.

[0077] Furthermore, such as Figure 3As shown, the SCE (Spatial Coordinate Enhanced attention module) is a lightweight attention module designed for infrared weak UAV target detection scenarios. It uses the classic CA (Coordinate Attention) coordinate attention as its core structure and achieves synergistic optimization of accurate localization, strong background suppression and efficient inference by optimizing the pooling strategy, feature interaction method and weight generation chain. It is deployed in the key feature extraction node of the Backbone network and forms a collaborative working mechanism with the DSC3k2 module and C3AH module of YOLOv13n.

[0078] The input to the SCE module is the feature map of a certain layer of the Backbone network. ,in Indicates batch size. This represents the number of channels in the input feature map. and These represent the height and width of the feature map, respectively. The core processing flow of the module consists of four steps: spatial decoupling pooling, lightweight feature interaction, attention weight generation, and feature fusion. The technical details and computational logic of each step are as follows:

[0079] Spatial decoupled pooling: The core purpose of this step is to decompose global pooling into two one-dimensional feature encoding operations, vertical and horizontal, to accurately capture the row and column coordinate information of small UAV targets, avoiding the problem of local position features being diluted by complex background noise caused by traditional global pooling. Specifically, this is achieved by performing directional adaptive average pooling in the vertical and horizontal directions on the input feature map respectively.

[0080] Vertical pooling: Average pooling is performed on each row of the feature map, compressing the width dimension to 1 while preserving the positional information of the height dimension, thus obtaining the vertical features. Its formula is:

[0081]

[0082] In the formula This represents a vertical pooling operation that retains the height dimension and compresses the width to 1, by performing a pooling operation on each channel. The mean value in the width direction of each row is calculated to encode the row coordinate information.

[0083] Horizontal pooling: Average pooling is performed on each column of the feature map, compressing the height dimension to 1 while preserving the positional information of the width dimension, resulting in horizontal features. Its formula is:

[0084]

[0085] In the formula This indicates a horizontal pooling operation that retains the width dimension and compresses the height to 1, by performing a horizontal pooling operation on each channel. The average value along the height direction is calculated for each column to encode the column coordinate information; suffix This represents the dimension transpose operation, used to adjust the dimensional order of feature maps, replacing the interpolation operation in the traditional CA attention mechanism. While ensuring the shape compatibility of feature maps, it avoids feature distortion caused by the interpolation process, which is of great significance for protecting the position information of tiny drone targets with extremely low pixel ratios.

[0086] Lightweight feature interaction: This step aims to achieve vertical features With horizontal features Effective fusion of features is achieved, while channel compression and activation processing enhance feature representation capabilities and control computational complexity. The specific process is as follows:

[0087] Feature concatenation: combining vertical features With horizontal features Concatenate along the height dimension (dim=2) to obtain the dimension as follows. The splicing of feature maps integrates row and column coordinate information into the same feature space, laying the foundation for subsequent feature interaction.

[0088] Channel dynamic compression: Channel compression is performed on the concatenated feature map using 1×1 convolutions, with the number of convolution kernels set to the number of intermediate channels. , The value of is dynamically adjusted to satisfy . This strategy ensures that the number of input channels... When the number of input channels is small (e.g., less than 128), the number of intermediate channels should not be less than 8 to avoid the degradation of feature representation ability in low-channel scenarios; when the number of input channels is large, the number of channels should be compressed proportionally to control the amount of computation.

[0089] Standardization and Activation: The BatchNorm standardization operation is performed on the channel-compressed feature maps to improve model training stability by normalizing the feature distribution. Subsequently, the SiLU activation function is used for non-linear transformation. The expression for the SiLU function is: (in (The activation function is the Sigmoid function). This activation function is highly compatible with the feature distribution of the YOLO series models, avoiding cross-module feature conflicts and ultimately obtaining intermediate features. .

[0090] Attention weight generation: This step generates attention weights by processing intermediate features. The branching process and convolutional transformation generate attention weights that enhance the target location and suppress the background. The specific implementation is as follows:

[0091] Feature branch segmentation: dividing intermediate features It is divided into two branches along the height dimension (dim=2), corresponding to the vertical feature branches respectively. and horizontal feature branches The dimensions of the two branches are respectively and .

[0092] Channel restoration and activation: Apply 1×1 convolutions to both branches to reduce the number of channels from... Restore to the number of input channels To ensure that the attention weights are consistent with the channel dimensions of the original input feature map, the feature values ​​are then mapped to the [0,1] interval using the Sigmoid activation function to generate the vertical attention weights. And horizontal attention weights The formulas are as follows:

[0093]

[0094]

[0095] The generated weight map shape can be directly adapted to the broadcast operation of the original input feature map without additional dimensional adjustment, simplifying the calculation process.

[0096] Feature fusion: This step uses attention weights to weight the original input feature map element-wise, achieving enhancement of spatial coordinate features and background suppression. Specifically, it utilizes PyTorch's broadcast mechanism to distribute the vertical attention weights... (dimension) ) and horizontal attention weights (dimension) Automatically expand to Dimension, compared to the original input feature map Element-wise multiplication is performed to obtain the spatially enhanced features. Its formula is: In the formula This represents element-wise multiplication. Through this operation, the feature values ​​of the UAV target's location are amplified, while the feature values ​​of the background area are suppressed, thereby enhancing the spatial location feature representation of the target.

[0097] The overall number of parameters in the SCE module is reduced compared to the original CA attention mechanism, mainly due to the channel dynamic compression strategy and the simplified weight generation chain. It has strong compatibility with the YOLOv13n framework, does not add extra computational redundancy, and can meet the performance requirements of real-time detection.

[0098] Furthermore, such as Figure 4 As shown, the CSR (Channel Semantic Refined attention module) is a channel-level attention module designed in conjunction with the SCE module. The two form a spatial-channel dual-dimensional collaborative enhancement system. This module improves upon the problems of branch interference, uncontrolled attention intensity, and parameter overfitting in the traditional SimAM (Simple, Parameter-Free Attention Module) attention mechanism in the YOLO infrared weak target detection network. Drawing on the design concept of "lightweight and scenario-specific precise adaptation" of the SCE module, it achieves differentiated feature enhancement for classification or regression branches through four core improvement strategies. It is deployed after the shallow feature extraction of the B3 layer of the Neck network and works in conjunction with the A2C2f feature fusion module and the DSConv deep separable convolution module of YOLOv13n.

[0099] The input to the CSR module is the spatial augmentation feature output by the SCE module. (in (The number of input channels is consistent with the number of output channels of the SCE module). The core processing flow of the module consists of six steps: branch separation mechanism, dynamic regularization coefficient generation, spatial attention weight calculation, channel attention weight generation, joint attention fusion, and feature output. The technical details and calculation logic of each step are as follows:

[0100] Branch separation mechanism: The core purpose of this mechanism is to avoid interference between features from classification and regression tasks, achieving differentiated feature enhancement. Specifically, it matches the `branch` parameter (with values ​​of `cls`, `reg`, and `all`) with the current branch identifier `is_cls_branch` (used to determine whether the current branch is classification or regression): When the `branch` parameter is set to `cls`, the module only applies to the classification branch, and the regression branch directly returns the original features; when the `branch` parameter is set to `reg`, the module only applies to the regression branch, and the classification branch directly returns the original features; when the `branch` parameter is set to `all`, the module applies to both classification and regression branches. This mechanism ensures that attention enhancement can accurately adapt to the feature requirements of different tasks, improving the specificity of feature representation.

[0101] Dynamic Regularization Coefficient Generation: This step aims to generate dynamically adjusted regularization coefficients using the spatial dimension statistics of the feature map, adapting to different feature distributions and avoiding insufficient adaptability caused by fixed coefficients. Specifically, it calculates the variance of the spatial dimensions (height and width dimensions, i.e., dim=[2,3]) of the input feature map of the target branch, while keeping the channel and batch dimensions constant (keepdim=True), thus obtaining the spatial dimension variance. Its formula is: Based on spatial dimension variance Generate dynamic regularization coefficients Its formula is: This coefficient can adaptively adjust according to the sparsity of the spatial distribution of the feature map. When the target features are sparse and the background noise is high in the feature map, Increasing the value enhances the regularization effect; when the target features are dense and the signal is strong in the feature map. Decreasing the value reduces interference with effective features.

[0102] Spatial attention weight calculation: This step, based on traditional SimAM spatial attention calculation, weakens the attention amplitude by increasing the denominator, reducing the damage of over-enhancement to the original feature distribution, and maintaining consistency with the SCE module's principle of no interpolation and low interference feature enhancement. The specific implementation process is as follows:

[0103] Calculate the mean of spatial dimension features: Calculate the mean of the spatial dimension (dim=[2,3]) of the input feature map of the target branch, keeping the channel dimension and batch dimension unchanged, to obtain the mean of the spatial dimension features. Its formula is: Centered feature square calculation: This involves combining the input feature map with the mean of the spatial dimension features. Perform element-wise subtraction to obtain the centered feature, then perform element-wise squaring on the centered feature to obtain the square of the centered feature. Its formula is: Attention denominator calculation: Define the spatial dimension as the number of pixels minus 1. For the square of the centralized feature Summing in the spatial dimension, then dividing by Obtain the mean squared difference of the spatial dimension and then compare it with the dynamic regularization coefficient. After adding them together, multiply by 8 (double the denominator coefficient compared to the existing SimAM attention module) to obtain the denominator term for spatial attention calculation. Its formula is: Spatial attention energy value calculation: Squaring the centered feature With denominator Element-wise division is performed, and an offset adjustment of 0.5 is added to obtain the spatial attention energy value. Its formula is: Spatial attention weight generation: Spatial attention energy values ​​are generated using the Sigmoid activation function. Mapping to the [0,1] interval yields spatial attention weights. Its formula is: This weight can enhance the spatial features of the target region and suppress the invalid features of the background region.

[0104] Channel attention weight generation: This step generates channel-level attention weights through global average pooling and a lightweight MLP (Multilayer Perceptron), refining the semantic features of each channel. The specific implementation process is as follows:

[0105] Global average pooling: for the input feature map Perform global average pooling to calculate the mean across the spatial dimension (dim=[2,3]) to obtain the global features along the channel dimension. Its dimensions are .

[0106] Lightweight MLP processing: global features Input a lightweight MLP, the channel compression ratio of which is... That is, firstly, the number of channels is increased from... Compress to Then, a non-linear transformation is performed using the ReLU activation function, followed by a fully connected layer to increase the number of channels from... Restore to Finally, the feature values ​​are mapped to the [0,1] interval using the Sigmoid activation function to generate channel attention weights. Its formula is: Dimensional adjustment: Adjust channel attention weights The dimensions were adjusted to The channel attention weights of the adapted spatial feature map are obtained. Its formula is: This weight can enhance the channel features containing target semantic information and suppress interference from redundant channels.

[0107] Joint attention fusion: This step fuses spatial attention weights and channel attention weights, and achieves controllability of feature enhancement through intensity weakening and regularization constraints. Specifically, it is implemented as follows:

[0108] Weight fusion: Integrating spatial attention weights With channel attention weights Element-wise multiplication yields the initial joint attention weights, which are then multiplied by 0.5 to weaken the attention intensity and avoid excessive interference with the original feature distribution, resulting in the final joint attention weights. Its formula is: Regularization constraint: Introduce learnable parameters with L2 regularization. The L2 regularization term is (in This is the regularization coefficient (default value is 0.001), used to control the intensity of feature enhancement and avoid overfitting caused by excessive parameter updates.

[0109] Feature output: The original input feature map With joint attention weights Element-wise multiplication is performed to obtain attention-enhanced features, which are then residually connected to the original input feature map to achieve stable feature enhancement, ultimately outputting semantically enhanced features. Its formula is: This output feature possesses both enhanced spatial location information and refined channel semantic information, providing high-quality feature support for subsequent bounding box regression and object classification.

[0110] Furthermore, the GWR (Gaussian Weighted Regression loss function) is a loss function designed to address the problem of large target scale spans and insufficient localization accuracy for small targets in UAV detection scenarios. It breaks through the limitations of traditional IoU-type losses that rely on geometric overlap. Through Gaussian distribution modeling and dynamic weight adjustment, it achieves accurate regression of infrared UAV targets of different scales. This loss function does not require modification of the backbone, neck, and head network structures of YOLOv13n and can be directly integrated into the bounding box regression branch of YOLOv13n, replacing the original CIoU loss function.

[0111] The core design idea of ​​the GWR loss function is to model both the predicted bounding box and the ground truth bounding box as 2D Gaussian distributions. The regression error of the bounding box is measured by calculating the Wasserstein distance between the two Gaussian distributions. Simultaneously, scale-adaptive weights are introduced to address the problem of large target loss masking small target loss. Its calculation process consists of five steps: bounding box format conversion and Gaussian modeling, Wasserstein distance calculation, normalized loss calculation, scale-adaptive weight adjustment, and final loss fusion. The technical details and calculation logic of each step are as follows:

[0112] Bounding box format conversion and Gaussian modeling: This step first converts the bounding box coordinate format from corner format (x1, y1, x2, y2) to center-width-height format (cx, cy, w, h), and then models the converted bounding box parameters as a 2D Gaussian distribution. The specific implementation is as follows:

[0113] Format Conversion: For any bounding box, the corner coordinates (x1, y1) represent the coordinates of the top-left corner of the bounding box, and (x2, y2) represent the coordinates of the bottom-right corner. The formula for converting to center point-width / height format is as follows:

[0114]

[0115] in and These represent the x and y coordinates of the center point of the bounding box, respectively. and These represent the width and height of the bounding box, respectively.

[0116] Gaussian modeling: The center point coordinates (cx, cy) of the predicted bounding box and the ground truth bounding box are modeled as mean vectors of a 2D Gaussian distribution. and The bounding box's width and height (w, h) are modeled as the diagonal elements of a 2D Gaussian distribution covariance matrix, representing the spatial location of the target. and This modeling approach characterizes the scale features of the target. The differences in bounding boxes are not only reflected in positional overlap, but also transformed into an overall difference between two Gaussian distributions, providing a stronger ability to perceive minute positional shifts and scale fluctuations in small targets.

[0117] Wasserstein distance calculation: This step calculates the Wasserstein-2 distance between two 2D Gaussian distributions. This distance comprehensively reflects the difference between mean shift and covariance. The formula is as follows: In the formula This represents the difference between the predicted center point x-coordinate and the true center point x-coordinate. This represents the difference between the predicted center point's y-coordinate and the true center point's y-coordinate. This represents the difference between the predicted width and the actual width. This represents the difference between the predicted height and the actual height; the denominator 4 is used to normalize the distance value, making the scale of the loss value easier to control.

[0118] Normalized Loss (NWD) Calculation: To control the loss scale and avoid imbalance in loss values ​​caused by differences in target scale, a normalization constant is introduced. and prevention of zero small constant The Wasserstein distance is converted into a normalized Wasserstein distance (NWD) using an exponential function, and the formula is as follows: The normalization loss ranges from (0,1). When the predicted bounding box completely overlaps with the true bounding box, the NWD value is close to 1 and the loss value is close to 0. When the predicted bounding box differs significantly from the true bounding box, the NWD value is close to 0 and the loss value is close to 1. This ensures that large and small targets receive balanced gradient feedback during training, thereby improving the stability of model training.

[0119] Scale-adaptive weight adjustment: To address the issue of small target losses being masked by large target losses, the loss weights are dynamically adjusted based on the area of ​​the true bounding box, giving larger weights to smaller targets (such as micro-drones). The specific implementation process is as follows:

[0120] Calculate the area of ​​the true bounding box: Calculate the area based on the width and height parameters of the true bounding box. Its formula is: In the formula and These represent the width and height of the actual bounding box, respectively.

[0121] Initial weight generation: The actual bounding box area is smoothed using a logarithmic function to avoid excessive weight fluctuations, thus generating initial weights. Its formula is: The function's characteristic is: when When it is small (small target). Smaller values, initial weights The value is relatively large; when When it is relatively large (large target). Larger values, initial weights Smaller values ​​allow for a bias towards smaller objectives.

[0122] Weight normalization: Calculates the maximum initial weight of all samples in the current batch. Divide the initial weight of each sample by this maximum value to obtain the normalized scale weights. Its formula is: This normalization operation limits the weight values ​​to the range of [0,1], ensuring the rationality and stability of the weights and avoiding training oscillations caused by extreme weights of individual samples.

[0123] Final regression loss calculation: normalized loss (NWD) and scale-adaptive weights ( The GWR regression loss is obtained by fusing the results together, and its formula is as follows: The loss function measures the regression error of the bounding box through the (1 - NWD) term, and through (1 + NWD) terms. The loss for small targets is appropriately amplified, so that the model pays more attention to small drone targets with low presence during training, thereby improving the detection recall and localization accuracy of small targets.

[0124] Furthermore, such as Figure 5As shown, the SAHI (Slicing Aided Hyper Inference) method is an inference enhancement method introduced to address the core pain points of low pixel ratio and sparse feature information of distant weak targets in anti-drone scenarios, and the easy memory overflow caused by direct inference of high-resolution aerial images. This method constructs a "global-local" dual-scale collaborative detection system, splits the high-resolution input image into overlapping slices for local inference, and then merges the slice and full-image detection results through non-maximum suppression (NMS). This ensures the feature capture capability of weak drone targets, avoids the omission of detection of large targets at close range, and maintains architectural compatibility and unified real-time inference efficiency with mainstream YOLO series detection networks.

[0125] The SAHI method is used only in the model inference step and does not participate in the model training process. Its core processing flow consists of five steps: slice segmentation, tile size adjustment, local inference, global inference, and result fusion. The technical details and operational logic of each step are as follows:

[0126] Slicing: The core purpose of this step is to divide the high-resolution original image into multiple overlapping small patches, significantly increasing the pixel proportion of distant, small drone targets within the local patches, making it easier for the model to capture their features. The specific implementation is as follows:

[0127] Adaptive slice size: The slice size is dynamically determined based on the resolution of the original image and the model input size. The default slice size is the same as the model input size (640×640 pixels). When the resolution of the original image is smaller than the slice size, no slice segmentation is performed, and full-image inference is used directly. When the resolution of the original image is larger than the slice size, it is uniformly segmented according to the slice size.

[0128] Overlap rate control: To avoid feature breakage caused by the segmentation of the target by the slice boundary, the overlap rate between slices is set. The overlap rate is customized according to the characteristics of the anti-drone scene. The default overlap rate is 10%-20%, that is, there is a 10%-20% overlap area between two adjacent slices in the width and height directions, ensuring that the target features across slices can be captured completely.

[0129] Slice generation: Based on the set slice size and overlap rate, the original query image is sliced... Cut into Overlapping tiles The resolution of each tile is It also records the coordinate position information of each tile in the original image for subsequent result mapping.

[0130] Tile size adjustment: Due to the resolution of the tiles generated by slicing... Since the tile size is consistent with the model input size, no scaling adjustment is needed. Only the tile needs to be standardized in the same way as the original image to ensure that the feature distribution of the tile is consistent with the input feature distribution during model training, avoiding performance degradation due to differences in data distribution. If the tile size is inconsistent with the model input size, the tile is scaled to the model input size while maintaining the tile aspect ratio. Bilinear interpolation is used during scaling to ensure a smooth transition of features.

[0131] Local inference: The object detection forward pass is applied independently to each overlapping patch, sequentially passing through the model's Backbone, Neck, and Head networks to output the local detection results for each patch, including the target's category, confidence score, and bounding box coordinates (relative to the patch's local coordinates). The local inference process is completely consistent with the full-map inference process, fully utilizing the model's feature extraction and detection capabilities to capture the features of small UAV targets within the patches, effectively addressing the issue of missed detections caused by sparse features of distant targets.

[0132] Global Inference (Optional): To avoid missing detections of large targets at close range due to slice segmentation, Full Inference (FI) is performed on the original image. This means that slice segmentation is not performed; the original image is scaled to the model input size and directly input into the model for detection. The output is the detection results for the entire image, including the category, confidence score, and bounding box coordinates (global coordinates relative to the original image) of large-scale UAV targets. Global Inference is an optional step. When only small targets need to be detected in the application scenario, global inference can be turned off to improve inference efficiency; when both large and small-scale targets exist in the scene, global inference should be enabled to ensure detection completeness.

[0133] Result fusion: This step merges the local inference results with the global inference results (if enabled) into the final detection result. The specific implementation process is as follows:

[0134] Local result coordinate mapping: Based on the tile coordinate position information recorded during tile segmentation, the bounding box coordinates of the local detection results of each tile are converted from local coordinates to global coordinates of the original image, ensuring that the coordinate system of all detection results is consistent.

[0135] Results merging: Merge the detection results of all mapped tiles with the global inference results (if enabled) into a single detection result set, which includes the category, confidence score, and global bounding box coordinates of all candidate targets.

[0136] Non-maximum suppression (NMS): To eliminate redundancy in overlapping detection boxes, non-maximum suppression is performed on the merged detection result set, setting an intersection-over-union (IoU) matching threshold. (Default value is 0.5), for IoU greater than Overlapping bounding boxes are identified, and the bounding box with the highest confidence level is retained while other bounding boxes with lower confidence levels are removed; a detection probability threshold is also set. (Default value is 0.3), the probability of removal detection is lower than The detection results are used to obtain the final UAV detection results after redundancy removal, including the target category, confidence level, and accurate global bounding box coordinates.

[0137] The core advantage of the SAHI method lies in introducing only a small amount of additional computation during the inference stage (mainly for slice segmentation and result fusion), without affecting the model's training process and parameter count. It also maintains compatibility with the real-time detection performance of YOLOv13n, and can significantly improve the detection recall rate of small UAV targets without significantly reducing inference speed.

[0138] This embodiment details how the application enhances spatial coordinates and channel semantic features through SCE and CSR dual attention modules, improves the regression accuracy of small targets using the GWR loss function, and enhances the detection capability of weak and small targets using SAHI inference, thereby achieving high-precision and robust detection of UAVs under the premise of lightweight design.

[0139] Based on Example 1, the anti-UAV dataset used in this example contains 600 video sequences and over 723k frames of densely labeled thermal infrared images, such as... Figure 6 As shown, sequence samples from the AntiUAV600 dataset in some scenes are displayed and highlighted in red. This experiment randomly selected some images from this dataset and divided them according to a 6:2:2 ratio, resulting in a total of 4800 training images, 1600 test images, and 1600 validation images.

[0140] This paper employs a generalized evaluation metric to systematically evaluate the performance of anti-drone detection models. Recall (R) reflects the percentage of correctly identified targets, while precision (P) measures the model's accuracy in target recognition and segmentation. Simultaneously, we use mean absolute precision (mAP) to comprehensively evaluate the accuracy of target recognition and segmentation. Furthermore, we record the number of parameters for each model to ensure that the number of parameters does not significantly increase compared to the original model.

[0141] All experiments in this study were conducted under the consistent environment configuration described in Table 1. The training parameter configurations for all models involved are shown in Table 1, specifically:

[0142] Table 1 Parameter Settings

[0143] To further verify the effectiveness of the proposed anti-drone model, this study compares the experimental results with the following detection models: (a) YOLOv8; (b) YOLOv9; (c) YOLOv10; (d) YOLOv11; (e) YOLOv12; (f) REDETRn. The model training results are shown in Table 2. The data in the table show that, while maintaining its lightweight characteristics, SCG-YOLO achieves a 5% improvement in recall (R) compared to the baseline model YOLOv13n, jumping from 0.91 to 0.96; and a 4.4% improvement in core detection precision (mAP50), from 0.901 to 0.941. Compared with classic lightweight models such as YOLOv8n and YOLOv9t, SCG-YOLO also demonstrates a significant advantage in mAP50, exceeding it by 2.2% and 3.1%, respectively. Although the model's precision (P) decreased slightly, SCG-YOLO's significant improvement in recall, combined with the core requirement of "prioritizing avoiding missed detections" in anti-drone tasks, better aligns with real-world scenario demands and effectively reduces the risk of missing high-risk targets. Furthermore, to test the model's performance on different datasets, the Roboflow open-source drone dataset was used, with 2000 images randomly selected for training. The dataset was then divided into training, validation, and test sets in an 8:1:1 ratio. The final metrics of the improved SCG-YOLO model (YOLOv13n) are shown in Table 3. As can be seen, on the Roboflow dataset, the SCG-YOLO model designed in this paper outperforms the YOLOv13n baseline model in all metrics.

[0144] Table 2 Performance metrics under different models

[0145] Table 3 Performance on the Roboflow dataset

[0146] like Figure 7 As shown in the bar chart, the individual performance indicators of each model are displayed. The SCG-YOLO model proposed in this paper outperforms the other models in all indicators. Figure 8 As shown, the PR curves and F1 curves for each model are plotted. Figure 8 (a) is the PR curve. Figure 8 (b) shows the F1 curve. Clearly, the curve of the improved model completely encircles the curve of the baseline model, indicating that the improved model outperforms the baseline model in accuracy and has a significant advantage.

[0147] like Figure 9 As shown, Figure 9 (a) Original image, Figure 9 (b) Ground Truth diagram Figure 9 (c)YOLOv8n、 Figure 9 (d)YOLOv10n、 Figure 9 (e)YOLOv11n、 Figure 9 (f)YOLOv13n、 Figure 9 (h) SCG-YOLO: This demonstrates the detection results of various models under different backgrounds, clearly showing the significant improvement of our proposed anti-drone detection model compared to other models through intuitive comparison. As shown in some scenarios in Figures 9(c)-(f), in scenarios with small-sized drone targets, especially in scenarios with complex backgrounds, all the comparative detection models showed varying degrees of missed detection of drone targets. However, the SCG-YOLO model used in this paper can accurately detect drone targets in all scenarios and with different target sizes. In addition, other models occasionally miss detection when the drone is at a distance, and even when they occasionally successfully identify the target, their confidence level is usually lower than that of our model. This further illustrates that the method designed in this paper can further improve the detection and identification capability of small drone targets.

[0148] To further demonstrate the effectiveness of the optimization techniques in this application, ablation experiments were conducted to analyze the synergistic effects of various improvements in the YOLOv13n model. Using the anti-uav600 dataset as a benchmark, the performance of the SAHI slice-assisted inference method, SCE module, CSR module, and GWR loss function were evaluated when applied individually. Table 3 shows the ablation experiment results for a total of 8 experimental models. The original YOLOv13n was used as the baseline, and the remaining models were successively augmented with one or more improvements, as shown in Table 4.

[0149] Table 4 Comparison of ablation test results

[0150] The ablation experiment results in Table 4 show that, compared to the baseline model YOLOv13n, the SCG-YOLO model integrating four improvements—SAHI, SCE, CSR, and GWR—achieved a 5.5% increase in recall (R) to 0.96, a 4.4% increase in mAP50 to 0.941, a 7.9% increase in mAP50-95 to 0.582, and a precision (P) of 0.777, achieving a good balance between lightweight design and detection performance, all while increasing the number of parameters by only 8.1%. Single-module validation shows that SAHI can improve the detection rate of small targets without increasing the number of parameters, the SCE and CSR modules can significantly optimize feature quality and detection accuracy, and the GWR loss function can effectively enhance the ability to resist false negatives. The synergistic effect of multiple modules further amplifies the gains of various indicators, indicating that the design of the improved scheme is reasonable and effective.

[0151] like Figure 10 As shown, the detection results of the ablation experimental model are compared. Figure 10 In Figure 10 (a)YOLOv13n、 Figure 10 (b)YOLOv13n+SCE, Figure 10 (c)YOLOv13n+SCE+CSR、 Figure 10 (d)YOLOv13n+SCE+CSR+GWR、 Figure 10 (e)SCG-YOLO Figure 10 (f) SCG-YOLO+SAHI: The detection results show that, compared with the baseline YOLOv13n model, the improvements proposed in this paper have significantly improved the detection of small targets. The confidence level for detecting small targets has been increased from about 44% to about 67%. Among them, the SCG-YOLO model in this paper has the best performance in the detection of small targets.

[0152] Therefore, the experimental results show that this application improves the accuracy of the model in locating UAVs. By strengthening the expression of target features and suppressing background noise, it further optimizes the model's classification performance for UAV targets, adapts to actual detection scenarios with complex backgrounds and dense small targets, solves the problems of sensitivity to small target position offset and poor adaptability, and adopts an improved Gaussian weighted regression (GWR) loss function adapted to infrared scenarios to replace the original regression loss, reducing the impact of small target bounding box offset on detection accuracy, further improving positioning accuracy, and making up for the shortcomings in small target detection.

[0153] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter changes made to these embodiments within the spirit and principles of the present invention, without departing from the principles and spirit of the present invention, through conventional substitutions or to achieve the same function, fall within the scope of protection of the present invention.

Claims

1. A high-precision detection method for unmanned aerial vehicles (UAVs) based on improved attention and Gaussian regression constraints, characterized in that, include: Acquire the image to be detected and input the image to be detected into the detection model based on YOLOv13n; The spatial coordinate enhancement attention module (SCE) in the Backbone network of the detection model is used to enhance the spatial coordinate features of the image to be detected, thereby obtaining spatial enhancement features. The spatial enhancement features are processed by the CSR channel semantic refinement attention module after the shallow B3 features are extracted from the Neck network of the detection model and then accessed to perform channel semantic refinement on the spatial enhancement features to obtain semantic enhancement features. By replacing the original regression loss function with the GWR Gaussian weighted regression function in the Head network of the detection model, bounding box regression and target classification are performed on the semantic enhancement features to obtain preliminary detection results. The SAHI slice-assisted reasoning method is used to slice the image to be detected and perform local reasoning. The local reasoning results are then fused with the preliminary detection results to obtain the UAV detection results.

2. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 1, characterized in that, The SCE spatial coordinate enhancement attention module enhances spatial coordinate features, including: For the input feature map Perform directional adaptive average pooling in both the vertical and horizontal directions to obtain vertical features. and horizontal features ,in For batch size, Input the number of channels. and These are the height and width of the feature map, respectively. The calculation process is as follows: Will and The intermediate features are obtained by concatenating along the height dimension, followed by 1×1 convolutional channel compression, BatchNorm normalization, and SiLU activation. ; Will Segmented into vertical branch features and horizontal branching features Vertical attention weights are generated by restoring the number of channels through 1×1 convolution and then activating with a Sigmoid function. And horizontal attention weights ; Through broadcasting mechanism , The spatially enhanced features are obtained by multiplying them element-wise with the original input feature map. .

3. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 2, characterized in that, When the 1×1 convolution performs channel compression, the number of intermediate channels... satisfy Through dynamic adjustment The value of is used to ensure the number of input channels. Even at a small size, it can still maintain sufficient feature expression ability.

4. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 2, characterized in that, The vertical attention weight And horizontal attention weights The generation process is as follows: in and for Vertical and horizontal feature branches after segmentation along the height dimension, This is the Sigmoid activation function.

5. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 1, characterized in that, The CSR channel semantic refinement attention module performs channel semantic refinement processing on spatial augmentation features, including: Based on the branch parameter and the current branch identifier, determine the target task branch for which the module takes effect; otherwise, directly output the original features. Calculate the spatial dimension variance of the input feature map for the target branch. Generate dynamic regularization coefficients ; Calculate the mean of spatial dimension features The squared central feature is obtained. Spatial attention weights are calculated based on the following formula. : , , ,in , Use the Sigmoid activation function; Channel attention weights are generated using global average pooling and a lightweight MLP. ,Will and By fusing and weakening the intensity, and combining it with a learnable parameter α with L2 regularization, semantically enhanced features are obtained. .

6. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 5, characterized in that, The channel compression ratio of the lightweight MLP Channel attention weights are generated through a concatenated structure of fully connected dimensionality reduction, ReLU activation, fully connected dimensionality increase, and Sigmoid activation. After dimensional adjustment, the result is obtained .

7. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 5, characterized in that, The semantic enhancement features The generation satisfies ,in α represents the joint attention weights after spatial and channel fusion, and α is a learnable parameter with L2 regularization, used to control the intensity of feature enhancement and suppress overfitting.

8. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 1, characterized in that, The GWR Gaussian weighted regression loss function is used for bounding box regression, including: Convert the predicted bounding boxes and the true bounding boxes to center-width-height format. ,in , , , And modeled as a 2D Gaussian distribution; Calculate the Wasserstein distance between two Gaussian distributions: ,in This represents the difference between the predicted and actual values ​​of each parameter; By introducing a normalization constant and a zero-prevention constant, the Wasserstein distance is converted into a normalized loss: ,in and All of these are constant parameters defined in the GWR Gaussian weighted regression loss function.

9. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 8, characterized in that, The GWR Gaussian weighted regression loss function also includes scale-adaptive weight adjustment, specifically: Calculate the area of ​​the true bounding box Initial weights are generated based on the bounding box area: The initial weights are normalized to obtain ,in The maximum initial weight within the current batch; By fusing the normalized loss and the scale-adaptive weights, we obtain the target regression loss: .

10. The high-precision UAV detection method based on improved attention and Gaussian regression constraints according to claim 1, characterized in that, The SAHI slice-assisted inference method fuses the detection results, including: The image to be detected is segmented into indivual Overlapping tiles Maintain the aspect ratio and adjust the size of each block; For each overlapping patch, a forward pass for object detection is performed independently, while full inference is performed on the original image to detect large-scale objects. The inference results of overlapping patches and the full inference results are restored to the original image size. The merging results are then merged using non-maximum suppression, and patches below a preset matching threshold are removed. The detection frame and detection probability are lower than The detection results are used to obtain the target detection results.

Citation Information

Patent Citations

  • Unmanned aerial vehicle target detection method based on YOLO-LiteMax neural network

    CN119863725A

  • Unmanned aerial vehicle small target detection method based on SRF-YOLO

    CN120375240A