Unmanned aerial vehicle target detection system and method based on multi-scale feature fusion
By introducing average pooling downsampling, global multi-scale attention enhancement, and adaptive feature fusion strategies into the UAV target detection system, the problem of insufficient detection accuracy in complex low-altitude scenarios is solved, and the ability to identify and detect small-scale targets is improved.
Patent Information
- Application Number
- CN202610080829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2046-01-21
AI Technical Summary
Existing UAV target detection algorithms suffer from problems such as weak target and background discrimination ability, large differences in sensitivity to scale changes, and severe occlusion effects in complex low-altitude scenarios, leading to decreased detection accuracy, especially in the case of small-scale targets and occlusion.
An average pooling downsampling module is introduced into the backbone network, a global multi-scale attention enhancement module is constructed in the neck network, and an adaptive enhanced multi-scale feature fusion strategy is introduced into the detection head. The detection results are optimized by aggregating the non-maximum suppression module, and the detection accuracy is improved by combining the improved loss function.
It improves the accuracy and robustness of UAV target detection, especially the detection accuracy of small-scale targets in complex and dense scenes, reduces false detections and false negatives, and enhances the sensitivity to multi-scale targets.
Smart Images

Figure CN121564327A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and in particular relates to a UAV target detection system and method based on multi-scale feature fusion. Background Technology
[0002] In the field of computer vision, anti-drone detection technology based on target detection models is a widely applied and popular research direction, specifically applied to the intelligent processing core component module of anti-drone systems. The task of anti-drone detection based on target detection models mainly involves using computer vision techniques to accurately detect and identify drone target instances in images, videos, and video stream data, and then locating them. This task essentially belongs to a classification and regression process. In real-world applications, drone target detection and recognition technology plays a crucial role and has high application value in areas such as air traffic management, ensuring airport public safety, and corporate campus security.
[0003] Deep learning-based drone target detection algorithms can be categorized into single-stage and two-stage algorithms based on their detection approach. Single-stage algorithms are primarily represented by the YOLO series of network models, while two-stage algorithms are represented by the R-CNN series of network models. However, most classic target detection algorithms lack specific consideration for the detection scenario, especially in complex and variable environments. This affects the robustness of these mainstream detection algorithms, primarily in the following aspects: (1) In complex low-altitude scenarios, the contrast and distinguishability between UAV targets and environmental background information are low. In this case, the detection model has a weak ability to distinguish between UAV targets and background, which can easily lead to false detection of targets; (2) In complex low-altitude scenarios, the large scale variation of UAV targets leads to significant differences in the sensitivity of feature extraction networks to targets of different scales, which can easily cause false or missed detections. This phenomenon is particularly pronounced for smaller, weaker targets. (3) In complex low-altitude scenarios, severe occlusion of UAV targets can negatively impact the detection performance of detection algorithms. Image analysis of open-source UAV target datasets reveals that UAV target occlusion primarily includes intra-class occlusion and inter-class occlusion. Intra-class occlusion refers to the mutual overlap and occlusion between UAV targets; inter-class occlusion refers to the UAV being occluded by other targets or by background information. Intra-class and inter-class occlusion mainly affect the feature extraction stage, thereby reducing the information required for inference by the algorithm's detection module and affecting the detection accuracy. Summary of the Invention
[0004] In view of this, the present invention aims to provide a UAV target detection system and method based on multi-scale feature fusion. An average pooling downsampling module is introduced into the backbone network to replace the traditional convolutional structure, further optimizing the acquisition of detailed features. A global multi-scale attention enhancement module is constructed in the neck network, designed from both channel attention and spatial attention perspectives to improve the system's ability to locate key feature information. An adaptive enhanced multi-scale feature fusion strategy is introduced into the detection head to further enhance the system's sensitivity to multi-scale UAV targets, thereby improving detection accuracy.
[0005] To achieve the above objectives, the technical solution created by this invention is implemented as follows: A UAV target detection system based on multi-scale feature fusion is used to identify UAVs in complex aerial scenes. The system includes: a backbone network, obtained by replacing convolutional operations in the original YOLOv11 network architecture with average pooling downsampling operations; a neck network, obtained by introducing average pooling downsampling operations and global multi-scale attention enhancement operations into the original YOLOv11 network architecture neck network; a head network, including multiple original detection heads of the YOLOv11 network architecture and a feature fusion submodule matched with each original detection head. Each feature fusion submodule fuses multi-scale features from the neck network, and the fused features are input into the corresponding detection head to obtain initial target detection boxes; an aggregation non-maximum suppression module selects the detection boxes with the highest confidence scores from the initial target detection boxes output by the head network and removes redundant detection boxes with excessive overlap with the retained detection boxes; based on the aggregation characteristics of redundant detection boxes, a decision score is generated for the retained detection boxes to measure their resistance to removal; then, the decision score is used as the criterion for non-maximum suppression to retain the correct detection results with severe occlusion and overlap, thus obtaining the final target detection boxes.
[0006] Furthermore, in the average pooling downsampling operation: average pooling is performed on the input features, and the pooled features are split into two parts by channel splitting; convolution operation is performed on one part of the features, and max pooling and convolution operation are performed on the other part of the features; the two processed features are concatenated to obtain the output features.
[0007] Furthermore, in the global multi-scale attention enhancement operation: the input features are grouped; for each sub-feature map, average pooling and max pooling operations are performed along the height and width directions of the sub-feature map, respectively, and the resulting four pooled features are non-linearly mapped; the two pooled features in the height direction are summed element-wise, and the two pooled features in the width direction are summed element-wise; sigmoid activation operations are performed on the two summed features respectively to obtain the weights of the sub-feature map in the height and width directions; the two weights are multiplied by the sub-feature map to obtain the enhanced sub-feature map; the enhanced sub-feature maps are combined to obtain the output features.
[0008] Furthermore, in the feature fusion submodule: multi-scale features from the neck network are fused using the following formula: ; in, , and Let represent the feature vectors at coordinates (i,j) in the three feature maps of the l-th level, respectively. This indicates the result of the corresponding fusion. , and These represent the corresponding fusion weights, and the sum of the three is 1.
[0009] Furthermore, the three fusion weights , and We obtain it from the following formula: ; ; ; in, , and This represents the vector value of the feature vector at coordinate (i,j) in the three feature maps of the l-th level.
[0010] Furthermore, in the aggregation non-maximum suppression module: the overlap score between any two initial target detection boxes is calculated; if the overlap score is greater than a preset overlap threshold, the two initial target detection boxes related to this overlap score are defined as aggregation detection boxes; the above operation is repeated to calculate the overlap score of each initial target detection box and obtain all aggregation detection boxes related to each initial target detection box, thus obtaining the aggregation detection box set of each initial target detection box, and defining the detection box with the highest confidence in each aggregation detection box set as the retained detection box, thus constructing the retained detection box set; in each aggregation detection box set, the overlap score of each aggregation detection box is sorted in descending order, and the corresponding overlap score is mapped to an interval using the index of each aggregation detection box to obtain the discriminant suppression score of each aggregation detection box; using the discriminant suppression score and the retained detection boxes, non-maximum suppression is performed on each initial target detection box until all retained detection boxes in the retained detection box set are traversed to obtain the final target detection box.
[0011] Furthermore, the overlap score is: ; Among them, GScore ij Represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap score between them, IoG(Box) i Box j ) represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap ratio between them and Represents the i-th initial target detection box. i The coordinates of the top left and bottom right corners are given by AMap, which represents the mapping function: ; Where λ represents the input of the mapping relationship, σ t This indicates the preset parameter threshold.
[0012] Furthermore, the process of obtaining the discriminant suppression score includes: defining the detection boxes other than the retained detection boxes in each aggregated detection box set as redundant detection boxes; sorting the overlap scores of the retained detection boxes and all redundant detection boxes in descending order in each aggregated detection box set to obtain the index coefficient of each redundant detection box; dividing the overlap score by the index coefficient of the corresponding redundant detection box, and then summing all the quotients; using the mapping function of the following formula to perform interval mapping on the total value of the quotients to obtain the corresponding discriminant suppression score: ; Where BMap represents the mapping function, λ represents the input of the mapping, and ε t This indicates the preset parameter threshold.
[0013] A UAV target detection method based on multi-scale feature fusion includes: S1: Obtain the low-altitude image dataset, preprocess the low-altitude image dataset to obtain the training set; S2: Construct a UAV target detection system based on multi-scale feature fusion as provided in this invention; S3: Use the training set obtained in step S1 to train the target detection system constructed in step S2 to obtain the target detection model; S4: Input the image to be detected into the target detection model obtained in step S3 to obtain the detection result.
[0014] Furthermore, in step S3, the target detection system is trained using the loss function of the following formula: L = η1 × L1 + η2 × L2; Where L represents the loss function of the training object detection system, η1 and η2 represent the loss weights, and their sum is 1. L1 represents the bounding box regression loss function, and L2 represents the Gaussian distribution distance loss function. The bounding box regression loss function is: L1 = 1 - IoU + α × factor distance +β×factor shape ; Where IoU represents the intersection-union ratio between the predicted detection box and the ground truth labeled box, and α and β represent the factor weights. distance The distance correction factor is represented by the factor. shape Indicates the shape correction factor; Distance correction factor distance for: ; Among them, (x Pre ,y Pre (x) represents the center coordinates of the predicted detection box output by the object detection model. GT ,y GT ) represents the center coordinates of the ground truth bounding box, d represents the diagonal length of the minimum bounding box between the predicted detection box and the ground truth bounding box, and ρ represents the center coordinates of the ground truth bounding box. h and ρ w These represent the weighting coefficients for the vertical and horizontal directions, respectively. Vertical weighting coefficient ρ h for: ; Among them, hGT w represents the actual height of the annotation box. GT Scale represents the width of the actual annotation box; Scale represents the scale factor. Horizontal weighting coefficient ρ w for: ; Shape correction factor shape for: ; Among them, h Pre w represents the height of the predicted detection box. Pre Indicates the width of the predicted detection box; The Gaussian distance loss function L2 is: ; Where ζ represents a constant value, and D represents the Gaussian distance between the predicted detection box and the ground truth annotation box, which is: .
[0015] Compared with the prior art, the present invention can achieve the following beneficial effects: (1) In the UAV target detection system based on multi-scale feature fusion described in this invention, an average pooling downsampling module is introduced into the backbone network to replace the traditional convolutional structure, thereby avoiding the increased resource consumption caused by the computation of large convolutional kernels, and further optimizing the acquisition of detailed features. Secondly, this invention constructs a global multi-scale attention enhancement module in the neck network, and designs the attention enhancement module from the perspectives of channel attention and spatial attention, aiming to improve the network's ability to locate key feature information, thereby further improving the accuracy of UAV target recognition. Then, from the perspective of data-driven approach, an adaptive enhanced multi-scale feature fusion strategy is introduced, aiming to further improve the system's sensitivity to multi-scale UAV targets, thereby improving detection accuracy; (2) In the UAV target detection system based on multi-scale feature fusion described in this invention, an aggregation non-maximum suppression module (Gather-NMS) is constructed after the head network. First, the detection box with the highest confidence score in the set of concentrated overlapping detection boxes is selected, and the detection box with too high overlap ratio with the box is removed. Based on the aggregation characteristics of redundant detection boxes in the aggregated detection box set, a judgment score is generated for the detection box with the highest confidence score to measure its anti-removal ability. Then, the judgment score is used as the discrimination criterion for non-maximum suppression, so as to retain the correct detection results with severe occlusion and overlap as much as possible. Compared with the traditional non-maximum suppression algorithm, the Gather-NMS algorithm constructed in this invention can better adapt to complex and dense scenes, especially to improve the detection accuracy of small-scale targets. (3) In the UAV target detection method based on multi-scale feature fusion described in this invention, the loss function has been optimized and improved. The shape and scale of the bounding box are taken into account, and the similarity between the distribution of the real box and the predicted box is further measured. The two are weighted and fused to give full play to their respective advantages and improve the accuracy of UAV target recognition. Attached Figure Description
[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of the UAV target detection system based on multi-scale feature fusion as described in an embodiment of the present invention; Figure 2 A schematic diagram of the average pooling downsampling operation described in an embodiment of the present invention; Figure 3 A schematic diagram illustrating the global multi-scale attention enhancement operation described in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the UAV target detection method based on multi-scale feature fusion as described in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0018] The invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0019] like Figure 1As shown in the embodiment of the present invention, the UAV target detection system based on multi-scale feature fusion is used to identify UAVs in complex aerial scenarios, including a backbone network, a neck network, a head network, and an aggregated nonmaximum suppression module. The backbone network is obtained by replacing the convolutional operations in the original YOLOv11 network architecture with average pooling downsampling operations. The neck network is obtained by introducing average pooling downsampling operations and global multi-scale attention enhancement operations into the original neck network of the YOLOv11 network architecture. The head network includes multiple original detection heads of the YOLOv11 network architecture and a feature fusion submodule matched with each original detection head. Each feature fusion submodule fuses multi-scale features from the neck network, and the fused features are input into the corresponding detection head to obtain the initial target detection box. The aggregation non-maximum suppression module selects the retention detection box with the highest confidence score from the initial target detection boxes output by the head network and removes redundant detection boxes with excessive overlap with the retention detection boxes. Based on the aggregation characteristics of redundant detection boxes, a decision score is generated for the retention detection boxes to measure their resistance to removal. Then, the decision score is used as the criterion for non-maximum suppression to retain the correct detection results that are severely occluded and overlapped, thus obtaining the final target detection box.
[0020] In the backbone network provided in this embodiment of the invention, the input UAV image with a complex low-altitude background is subjected to two consecutive convolutions. The processed features are then extracted by the first C3k2 module (class False), and then average pooling downsampling is used to further optimize the acquisition of detailed features. The output features of average pooling downsampling are then processed by the second C3k2 module (class False) and average pooling downsampling in sequence. The processed features are then processed by the third C3k2 module (class True) and average pooling downsampling in sequence. The processed features are then processed by the fourth C3k2 module (class True), the SPFF module, and the C2PSA module in sequence. At this time, the output features of the second C3k2 module, the third C3k2 module, and the C2PSA module are the multi-scale features output by the backbone network. In the neck network provided in this embodiment of the invention, the output features of the C2PSA module are upsampled and then concatenated with the output features of the third C3k2 module. The concatenated features are then passed through the fifth C3k2 module (class False) and an upsampling operation, and then concatenated with the output features of the second C3k2 module. The concatenated features are then passed through the sixth C3k2 module (class False) and an average pooling downsampling operation, and then concatenated with the output features of the fifth C3k2 module. The concatenated features are then processed by the seventh C3k2 module (class False), and the output features are then subjected to global multi-scale attention enhancement and average pooling downsampling operations in sequence. The processed features are then concatenated with the output features of the C2PSA module and input into the eighth C3k2 module (class True) for feature extraction. The extracted features are then subjected to global multi-scale attention enhancement. At this point, the output features of the sixth C3k2 module, the seventh C3k2 module, and the last global multi-scale attention enhancement operation are the multi-scale features output by the neck network. The head network provided in this embodiment of the invention includes three detection heads and corresponding feature fusion submodules for the three detection heads. The sixth C3k2 module is input into its respective feature fusion submodule. The output features after feature fusion by the feature fusion submodule are then input into their respective detection heads to output initial target detection boxes. All initial target detection boxes are processed by the Gather-NMS module to output the detection results of UAV targets in the image to be detected.
[0021] In some embodiments, the average pooling downsampling operation includes: performing average pooling on the input features, splitting the pooled features into two parts by channels; performing convolution on one part of the features, and performing max pooling and convolution on the other part of the features; and concatenating the two processed features to obtain the output features.
[0022] The processing procedure for the average pooling downsampling operation provided in this embodiment of the invention is as follows: Figure 2 As shown, average pooling is performed on the input features to obtain overall features and reduce computational cost. The average-pooled features are then split into two parts along the channel dimension. The first part undergoes max pooling to highlight key features, followed by a 1×1 convolutional kernel to further enhance feature expressiveness. The second part utilizes a 3×3 convolutional kernel to enhance the learning and acquisition of detailed features. The outputs of the two parts are then concatenated along the channel dimension to obtain the output features.
[0023] In some embodiments, the processing steps of the global multi-scale attention enhancement operation include: grouping the input features; for each sub-feature map, performing average pooling and max pooling operations along the height and width directions of the sub-feature map respectively, and performing nonlinear mapping on the resulting four pooled features; adding the two pooled features in the height direction element-wise, and adding the two pooled features in the width direction element-wise; performing sigmoid activation operations on the two added features respectively to obtain the weights of the sub-feature map in the height and width directions; multiplying the two weights with the sub-feature map to obtain the enhanced sub-feature map; and combining the enhanced sub-feature maps to obtain the output features. This invention improves the system's sensitivity to UAV targets of different scales and enhances detection and recognition accuracy by performing multi-scale feature fusion on features from the backbone network; and by designing the attention enhancement module from both channel attention and spatial attention perspectives through the global multi-scale attention enhancement operation, it aims to improve the network's ability to locate key feature information, thereby further improving the accuracy of UAV target recognition.
[0024] The global multi-scale attention enhancement operation provided in the embodiments of the present invention is as follows: Figure 2 As shown, it includes: For input features Divide the channel into N groups to obtain multiple sub-feature maps. , of which F M Let M represent the Mth sub-feature map, where M = 1, 2, 3, ..., N, and H, W, and C represent the height, width, and number of channels of the feature, respectively. For each sub-feature map F M Average pooling and max pooling operations are performed along the height and width directions of the sub-feature map, respectively, as shown in the following formula: ; ; ; ; in, and Representing the sub-feature maps F respectively MThe features obtained after performing average pooling and max pooling operations along the height direction, respectively. and Representing the sub-feature maps F respectively M The features obtained by performing average pooling and max pooling operations along the width direction, F M (H,i) represents a feature map with width i at height H, F M (W,j) represents a feature map with a width of W and a height of j; The four pooling features obtained , , and Perform nonlinear mapping, specifically including mapping the four pooling features respectively. , , and Channel compression is performed using a 1×1 convolutional kernel, followed by normalization and ReLU nonlinear activation. The number of channels is then restored using a 1×1 convolutional kernel to complete the pooling of four features. , , and Nonlinear mapping; The attention weights g in the height direction are obtained by element-wise summing of two pooling features in the same direction and normalizing them using the Sigmoid function. H Attention weights g in the width direction W ; The two weights g H and g W With sub-feature map F M After multiplying the following formulas, we obtain the enhancer feature map. : ; Strengthening sub-feature maps Following the inverse operation of the initial channel partitioning, the enhanced sub-feature map is processed. By combining the features, we obtain the output feature F. out .
[0025] After obtaining the feature map fused with the global multi-scale attention enhancement module, considering that feature pyramid-based object detection algorithms directly fuse features from different levels, some important feature information will be lost. To address this, this invention takes a data-driven approach, introducing a feature fusion submodule based on an adaptive enhanced multi-scale feature fusion strategy into the head network of the traditional YOLOv11 architecture. This submodule adjusts the multi-level features from the neck network to the same resolution as the current level features and adaptively adjusts the weight information through training, thereby obtaining the optimal fusion result. Specifically, in some embodiments, the feature fusion submodule's processing includes fusing the multi-scale features from the neck network using the following formula: ; in, , and Let represent the feature vectors at coordinates (i,j) in the three feature maps of the l-th level, respectively. This indicates the result of the corresponding fusion. , and These represent the corresponding fusion weights, and the sum of the three is 1. Fusion Weights , and We obtain it from the following formula: ; ; ; in, , and This represents the vector value of the feature vector at coordinate (i,j) in the three feature maps of the l-th level. Fusion weights , and The optimal value and optimal feature fusion can be obtained by training and learning through propagation along the error direction.
[0026] In some embodiments, the processing procedure of the aggregation nonmaximum suppression module includes: (1) Calculate the overlap score between any two initial target detection boxes. Analysis of the preliminary detection results output by the detection head shows that for a real UAV target, the system model will generate multiple highly overlapping and aggregated detection boxes to predict it; therefore, it can be determined that for a detection area, if multiple overlapping detection boxes are generated in the area, then there is a real target in the area. In the aggregation nonmaximum suppression module (Gather-NMS) provided by the present invention, the overlap score between any two initial target detection boxes is first calculated. This overlap score not only considers the overlap ratio between detection boxes, but also considers and designs the proximity of each edge of the detection box. The specific design idea is that if two initial target detection boxes have more than one very similar and close opposite edge, and their overlap ratio is also relatively large, it can be determined that they correspond to the detection results of the same UAV target. Specifically: In some embodiments, the i-th initial target detection box Box is calculated by the following formula. i and the j-th initial object detection box Box j Overlapping fractions between: ; Among them, GScore ij Represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap score between them, IoG(Box) i Box j ) represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap ratio between them and Represents the i-th initial target detection box. i The coordinates of the top-left and bottom-right corners are given, where k=1 represents the top-left corner of the initial object detection box, and k=1 represents the bottom-right corner. AMap represents the mapping function, which is: ; Where λ represents the input of the mapping relationship, σ t This represents the preset parameter threshold, which depends on the dataset. (2) If the overlap score is greater than the preset overlap threshold, the two initial target detection boxes related to this overlap score are defined as aggregate detection boxes, as shown in the following formula: ; in, Represents the initial target detection box (Box) of the i-th type. i The set of related aggregated detection boxes, where φ represents the overlap threshold, and T boxThis represents the set of all initial object detection boxes; (3) Repeat steps (1) to (2) to calculate the overlap score of each initial target detection box and obtain all aggregated detection boxes related to each initial target detection box. This results in an aggregated detection box set for each initial target detection box. The detection box with the highest confidence in each aggregated detection box set is defined as the retained detection box. The retained detection box set is constructed as follows: ; Among them, Save box Indicates the set of bounding boxes to be retained, score i and score j These represent the i-th and j-th initial object detection boxes, respectively. i Confidence score; (4) In each aggregated detection box set, the overlap scores of each aggregated detection box are sorted in descending order, and the corresponding overlap scores are mapped to intervals using the index of each aggregated detection box to obtain the discriminant suppression score of each aggregated detection box. In some embodiments, the process of obtaining the discriminant suppression score includes: In each aggregated detection box set, the detection boxes other than the retained detection boxes are defined as redundant detection boxes. The purpose of redundant detection boxes is to measure the resistance to removal of the retained detection boxes and to remove these redundant boxes from the detection result set to reduce their interference with the final detection result. In each aggregated detection box set, the overlap scores of the retained detection boxes with all redundant detection boxes are sorted in descending order from high to low to obtain the index coefficient of each redundant detection box. Divide the overlap score by the index coefficient of the corresponding redundant detection box, then sum all the quotients. Use the mapping function in the following formula to map the total value of the quotients to the interval to obtain the corresponding discrimination suppression score, as follows: ; Among them, JScore i The function represents the discrimination suppression score of the i-th redundant detection box, DeOrder represents the function that sorts the overlap scores in descending order to obtain the corresponding index coefficient, and BMap represents the mapping function, specifically: ; Where λ represents the input of the mapping relationship, ε t This represents a preset parameter threshold, which is specifically set to 0.05 in this embodiment of the invention.
[0027] (5) Using the discriminant suppression score and the retained detection boxes, non-maximum suppression is applied to each initial target detection box until all retained detection boxes in the retained detection box set are traversed to obtain the final target detection box. This process specifically includes: When the final discrimination suppression score is higher than or equal to the preset threshold of non-maximum suppression, the redundant detection box is removed; when the final discrimination suppression score is lower than the preset threshold of non-maximum suppression, the redundant detection box is retained and sent to the retained detection box set of the next round of non-maximum suppression; the post-processing of the algorithm ends when all rounds of non-maximum suppression are completed, that is, when the retained detection box set is empty, and the result obtained is the final target detection result.
[0028] This invention also provides a UAV target detection method based on multi-scale feature fusion, combined with Figure 1 and Figure 4 ,include: S1: Obtain the low-altitude image dataset and preprocess it to obtain the training set. In this embodiment of the invention, low-altitude image datasets of Anti-UAV and Anti-UAV410 are selected, and the UAV targets in the images are re-annotated to obtain the training set.
[0029] S2: Construct a UAV target detection system based on multi-scale feature fusion as provided in this invention.
[0030] S3: Use the training set obtained in step S1 to train the object detection system constructed in step S2 to obtain the object detection model.
[0031] In complex low-altitude scenarios, the varying scales of UAV targets negatively impact the accuracy of bounding box regression. To address this, this invention comprehensively considers the shape and scale of the bounding boxes and further measures the similarity between the distributions of the ground truth and predicted boxes, proposing an improved loss function. Specifically, in some embodiments, the target detection system is trained using the following loss function: L = η1 × L1 + η2 × L2; Where L represents the loss function for training the object detection system, η1 and η2 represent the loss weights, and their sum is 1. They are learned and updated to their optimal values through model training. L1 represents the bounding box regression loss function, and L2 represents the Gaussian distribution distance loss function. The bounding box regression loss function is: L1 = 1 - IoU + α × factor distance +β×factor shape ; Where IoU represents the intersection-union ratio between the predicted detection bounding box and the ground truth labeled bounding box, i.e. Box Pre Box represents the predicted detection box. GT This represents the true bounding box, where α and β represent factor weights. distance The distance correction factor is represented by the factor.shape Indicates the shape correction factor; Distance correction factor distance for: ; Among them, (x Pre ,y Pre (x) represents the center coordinates of the predicted detection box output by the object detection model. GT ,y GT ) represents the center coordinates of the ground truth bounding box, d represents the diagonal length of the minimum bounding box between the predicted detection box and the ground truth bounding box, and ρ represents the center coordinates of the ground truth bounding box. h and ρ w These represent the weight coefficients in the vertical and horizontal directions, respectively, depending on the shape of the ground truth bounding box. It should be noted that the minimum bounding box here is the minimum bounding box of the union of the predicted detection box and the ground truth bounding box. Vertical weighting coefficient ρ h for: ; Among them, h GT w represents the actual height of the annotation box. GT This represents the width of the actual bounding box; Scale represents the scale factor, which can be set according to the scale of the targets in the dataset. Horizontal weighting coefficient ρ w for: ; Shape correction factor shape for: ; Among them, h Pre w represents the height of the predicted detection box. Pre Indicates the width of the predicted detection box; This invention enhances the stability of detection and recognition of small-scale UAV targets by reconstructing the regression detection box into a two-dimensional Gaussian distribution function and calculating the similarity between the predicted box and the ground truth box. Specifically, the Gaussian distance loss function L2 is: ; Where ζ represents a constant value, the specific value of which depends on the dataset, and D represents the Gaussian distribution distance between the predicted detection box and the ground truth predicted detection box, as follows: .
[0032] In the training process of this embodiment of the invention, a stochastic gradient descent optimizer is used for 50 epochs of training, with a momentum factor of 0.937. A warm-up strategy is adopted for the learning rate, and the initial learning rate is set to a low value, which is 1.25 × 10 in this invention. -4 In each epoch, from the first iteration to the 800th iteration, the learning rate increases linearly to 1.25 × 10⁻⁶. -3 Then it remains unchanged. By the 35th epoch, the learning rate is reduced to 10% of the original, and by the 40th epoch, the learning rate becomes 1% of the original.
[0033] S4: Input the low-altitude image of the target to be detected into the target detection model obtained in step S3 to obtain the detection result.
[0034] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0035] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A UAV target detection system based on multi-scale feature fusion, used to identify UAVs in complex aerial scenes, characterized in that, include: The backbone network is obtained by replacing the convolution operations in the original backbone network of the YOLOv11 network architecture with average pooling downsampling operations; The neck network is derived by introducing average pooling downsampling and global multi-scale attention enhancement operations into the original neck network of the YOLOv11 network architecture. The head network consists of multiple original detection heads of the YOLOv11 network architecture, and a feature fusion submodule matched with each original detection head. Each feature fusion submodule fuses multi-scale features from the neck network, and the fused features are input into the corresponding detection head to obtain the initial target detection box. The aggregation nonmaximum suppression module selects the detection boxes with the highest confidence scores from the initial target detection boxes output by the head network and removes redundant detection boxes with excessive overlap with the retained detection boxes. Based on the aggregation characteristics of redundant detection boxes, a decision score is generated for the retained detection boxes to measure their resistance to removal. Then, the decision score is used as the criterion for nonmaximum suppression to retain the correct detection results that are severely occluded and overlapped, thus obtaining the final target detection boxes.
2. The UAV target detection system based on multi-scale feature fusion according to claim 1, characterized in that, In average pooling downsampling operations: The input features are average pooled, and the pooled features are then split into two parts by channel splitting. Perform convolution operations on one part of the features, and max pooling and convolution operations on the other part of the features; The output feature is obtained by concatenating the two processed features.
3. The UAV target detection system based on multi-scale feature fusion according to claim 1, characterized in that, In global multi-scale attention enhancement operations: Group the input features; For each sub-feature map, average pooling and max pooling operations are performed along the height and width directions of the sub-feature map, and non-linear mapping is applied to the four pooled features obtained. The two pooling features in the height direction are summed element by element, and the two pooling features in the width direction are summed element by element. Apply sigmoid activation to the two summed features respectively to obtain the weights of the sub-feature map in the height and width directions; Multiplying the two weights by the sub-feature map yields the enhanced sub-feature map; The enhanced sub-feature maps are combined to obtain the output features.
4. The UAV target detection system based on multi-scale feature fusion according to claim 1, characterized in that, In the feature fusion submodule: Multi-scale features from the neck network are fused using the following formula: ; in, , and Let represent the feature vectors at coordinates (i,j) in the three feature maps of the l-th level, respectively. This indicates the result of the corresponding fusion. , and These represent the corresponding fusion weights, and the sum of the three is 1.
5. The UAV target detection system based on multi-scale feature fusion according to claim 4, characterized in that, Three fusion weights , and We obtain it from the following formula: ; ; ; in, , and This represents the vector value of the feature vector at coordinate (i,j) in the three feature maps of the l-th level.
6. The UAV target detection system based on multi-scale feature fusion according to claim 1, characterized in that, In the aggregation nonmaximum suppression module: Calculate the overlap score between any two initial object detection boxes; If the overlap score is greater than the preset overlap threshold, the two initial target detection boxes related to this overlap score are defined as aggregate detection boxes; Repeat the above operations to calculate the overlap score of each initial target detection box and obtain all aggregated detection boxes related to each initial target detection box. This will result in an aggregated detection box set for each initial target detection box. The detection box with the highest confidence in each aggregated detection box set will be defined as the retained detection box, and the retained detection box set will be constructed. In each set of aggregated detection boxes, the overlap scores of each aggregated detection box are sorted in descending order to obtain the index of each aggregated detection box; By using the index of each aggregated detection box to perform interval mapping on the corresponding overlap score, the discriminant suppression score of each aggregated detection box is obtained; Using the discriminant suppression score and the retained detection boxes, non-maximum suppression is performed on each initial target detection box until all retained detection boxes in the retained detection box set are traversed to obtain the final target detection box.
7. The UAV target detection system based on multi-scale feature fusion according to claim 6, characterized in that, The overlap score is: ; Among them, GScore ij Represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap score between them, IoG(Box) i Box j ) represents the i-th initial target detection box. i and the j-th initial object detection box Box j The overlap ratio between them and Represents the i-th initial target detection box. i The coordinates of the top left and bottom right corners are given by AMap, which represents the mapping function: ; Where λ represents the input of the mapping relationship, σ t This indicates the preset parameter threshold.
8. The UAV target detection system based on multi-scale feature fusion according to claim 6, characterized in that, The process of obtaining the discriminant suppression score includes: Define the remaining detection boxes in each aggregated detection box set as redundant detection boxes; In each aggregated detection box set, the overlap scores of the retained detection boxes and all redundant detection boxes are sorted in descending order to obtain the index coefficient of each redundant detection box. Divide the overlap score by the index coefficient of the corresponding redundant detection box, and then sum all the quotients after division. The total quotient is mapped across intervals using the following mapping function to obtain the corresponding discriminant suppression score: ; Where BMap represents the mapping function, λ represents the input of the mapping, and ε t This indicates the preset parameter threshold.
9. A method for UAV target detection based on multi-scale feature fusion, characterized in that, include: S1: Obtain the low-altitude image dataset, preprocess the low-altitude image dataset to obtain the training set; S2: Construct a UAV target detection system based on multi-scale feature fusion as described in any one of claims 1 to 8; S3: Use the training set obtained in step S1 to train the target detection system constructed in step S2 to obtain the target detection model; S4: Input the image to be detected into the target detection model obtained in step S3 to obtain the detection result.
10. The UAV target detection method based on multi-scale feature fusion according to claim 9, characterized in that, In step S3, the target detection system is trained using the loss function expressed in the following formula: L = η1 × L1 + η2 × L2; Where L represents the loss function of the training object detection system, η1 and η2 represent the loss weights, and their sum is 1. L1 represents the bounding box regression loss function, and L2 represents the Gaussian distribution distance loss function. The bounding box regression loss function is: L1=1-IoU+α×factor distance +β×factor shape ; Where IoU represents the intersection-union ratio between the predicted detection box and the ground truth labeled box, and α and β represent the factor weights. distance The distance correction factor is represented by the factor. shape Indicates the shape correction factor; Distance correction factor distance for: ; Among them, (x Pre ,y Pre (x) represents the center coordinates of the predicted detection box output by the object detection model. GT ,y GT ) represents the center coordinates of the ground truth bounding box, d represents the diagonal length of the minimum bounding box between the predicted detection box and the ground truth bounding box, and ρ represents the center coordinates of the ground truth bounding box. h and ρ w These represent the weighting coefficients for the vertical and horizontal directions, respectively. Vertical weighting coefficient ρ h for: ; Among them, h GT w represents the actual height of the annotation box. GT Scale represents the width of the actual annotation box; Scale represents the scale factor. Horizontal weighting coefficient ρ w for: ; Shape correction factor shape for: ; Among them, h Pre w represents the height of the predicted detection box. Pre Indicates the width of the predicted detection box; The Gaussian distance loss function L2 is: ; Where ζ represents a constant value, and D represents the Gaussian distance between the predicted detection box and the ground truth annotation box, which is: 。
Citation Information
Patent Citations
A defect target detection method based on an attention mechanism
CN109829893A
Transverse wind ridging small target detection method and system based on dual non-maximum suppression
CN117541594A
Safety helmet detection algorithm and system based on coordinate attention and softening non-maximum suppression
CN118470423A
Remote sensing image target detection method and system based on improved YOLOv11 network
CN120932121A
General target detection method for adaptive attention guidance mechanism
WO2021139069A1