A Small Target Detection Method for UAV Aerial Images Based on GLES-Net Model

By utilizing the global-local edge enhancement module and the adaptive global guided window sparse selection mechanism of the GLES-Net model, the accuracy and efficiency issues of small target detection in UAV aerial images are addressed, achieving high-precision real-time detection in complex backgrounds.

CN122493337APending Publication Date: 2026-07-31HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAIYIN INSTITUTE OF TECHNOLOGY
Filing Date
2026-05-14
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Small target detection in UAV aerial images is difficult to achieve with high precision in complex backgrounds, and existing methods have high computational overhead, making it difficult to meet real-time requirements.

Method used

The GLES-Net model is adopted, and the global-local edge enhancement module and the adaptive global guided window sparse selection mechanism are used to collaboratively process small target feature extraction and encoding optimization, thereby enhancing feature representation ability and reducing computational redundancy.

Benefits of technology

It significantly improves the accuracy and robustness of small target detection in complex contexts, while reducing computational complexity, meeting real-time requirements, and enhancing the model's applicability and detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493337A_ABST
    Figure CN122493337A_ABST
Patent Text Reader

Abstract

This invention provides a method for small target detection in UAV aerial images based on the GLES-Net model. The model's feature extraction module includes a global-local edge enhancement module, which decouples the input feature map into parallel local and global feature branches. Smoothing filtering is applied to the local feature branches, and gradient operator processing is applied to the global feature branches. The processing results of the two branches are fused to generate a recalibrated weight map, which is then adaptively recalibrated onto the input feature map. The encoding optimization module employs an adaptive global guided window sparse selection mechanism. This mechanism inputs the high-resolution feature map into both the local and global encoding branches, generating local window features and global semantic features. Cross-attention computation is performed using the local window features as queries and the global semantic features as keys and values. Based on the fused window features obtained after cross-attention computation, each window is scored for importance and weighted, then reassembled into a complete feature map according to its original spatial location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of artificial intelligence and target detection technology, specifically relating to a method for small target detection in UAV aerial images based on the GLES-Net model. Background Technology

[0002] In drone aerial photography applications, due to factors such as flight altitude, shooting angle, and imaging resolution, targets in images typically appear small in scale, occupy a low proportion, and are densely distributed. Meanwhile, complex background factors (such as water reflections, shadow interference, and target occlusion) further reduce target discernibility, resulting in low signal-to-noise ratios and inconspicuous feature information, thus significantly increasing the difficulty of target detection tasks.

[0003] Existing object detection methods are mostly optimized for medium- to large-scale targets in natural scenes. When processing small targets in UAV aerial images, they generally suffer from the following problems: First, during feature extraction, fine-grained feature information of small targets is easily lost due to multiple downsampling operations, resulting in insufficient feature representation ability. Second, during feature modeling, existing methods have limited ability to fuse global semantic information and local detail information, making it difficult to simultaneously extract both local texture details and global contour structure of small targets, and failing to accurately characterize the edge information of small targets, thus affecting detection accuracy. In addition, existing high-resolution feature modeling methods treat all regions equally, leading to a large amount of redundant computation, making it difficult to meet the real-time requirements of practical applications while ensuring detection accuracy.

[0004] In practical applications such as intelligent waterway monitoring, the detection results of small targets (such as ships) not only affect the accuracy of target identification but also directly relate to subsequent tasks such as traffic statistics, behavior analysis, and safety risk assessment. Therefore, how to effectively improve the detection accuracy of small targets under complex background conditions while reducing model computational overhead and improving processing efficiency has become a key technical problem that urgently needs to be solved. Summary of the Invention

[0005] To address the shortcomings and deficiencies of existing technologies, this invention provides a method for small target detection in UAV aerial images based on the GLES-Net model, comprising the following steps: acquiring UAV aerial image data, labeling the image data, constructing a small target dataset, and parsing, data augmentation, and partitioning the dataset into training, validation, and test sets; constructing a UAV aerial image small target detection model based on GLES-Net; training the detection model using the training set to obtain model weight parameters, and using these model weights to detect small targets in the UAV aerial image under test.

[0006] The innovation of this invention lies in the fact that the GLES-Net model used addresses the dual challenges of weak features of small targets and excessive redundant computation in UAV aerial photography scenarios through the collaborative design of the feature extraction module and the encoding optimization module.

[0007] The feature extraction module incorporates a global-local edge enhancement module. This module decouples the input feature map along two parallel branches: one branch extracts local spatial features and performs edge enhancement based on smoothing filtering to improve the local detail representation of small targets by suppressing noise and enhancing continuous texture; the other branch extracts global context features and performs edge enhancement based on gradient operators to enhance the overall structural information of small targets by sharpening contour responses. The two branches are then fused after adaptive recalibration of attention weights to generate an enhanced feature map, effectively compensating for the loss of fine-grained features of small targets during traditional downsampling.

[0008] The encoding optimization module introduces an adaptive global guided window sparse selection mechanism. This mechanism feeds the high-resolution feature maps extracted from the backbone network into the local encoding branch and the global encoding branch respectively. The local encoding branch extracts local window features through multi-scale dilated convolution and window self-attention, while the global encoding branch extracts global semantic features through global pooling and fully connected mapping. Then, cross-attention computation is performed using local window features as queries and global semantic features as keys and values, allowing global semantic information to guide the enhancement of each window's features. Based on the enhanced window features, an importance score is calculated for each window, and window-level adaptive weighting is performed to highlight key region features and suppress redundant region features. Finally, the features are reassembled into a complete feature map according to their original spatial positions. This mechanism achieves intelligent sparse representation of high-resolution feature maps, improving feature utilization efficiency while reducing computational redundancy.

[0009] The convolution operations in the aforementioned global-local edge enhancement module and the adaptive global guided window sparse selection mechanism are both implemented using depthwise separable convolution. This allows the model to significantly improve the detection accuracy of small targets while maintaining a low number of parameters and computational complexity, thus balancing detection accuracy and real-time processing efficiency.

[0010] The specific technical solution adopted by this invention to solve its technical problem is as follows:

[0011] A method for small target detection in UAV aerial images based on the GLES-Net model includes the following steps:

[0012] Construct a small target dataset and perform preprocessing and data augmentation, then divide it to obtain a training set;

[0013] A small target detection model is constructed, which includes a feature extraction module and an encoding optimization module;

[0014] The detection model is trained using the training set, and small targets in the aerial images taken by the UAV under test are detected based on the weights of the trained model.

[0015] in,

[0016] The feature extraction module includes a global-local edge enhancement module, which decouples the input feature map into parallel local feature branches and global feature branches; performs smoothing filtering on the local feature branches and gradient operator processing on the global feature branches; and fuses the processing results of the two branches to generate a recalibrated weight map for adaptive recalibration of the input feature map.

[0017] The encoding optimization module sets up an adaptive global guided window sparse selection mechanism. This mechanism inputs the high-resolution feature map into the local encoding branch and the global encoding branch respectively to generate local window features and global semantic features. Cross-attention computation is performed with local window features as queries and global semantic features as keys and values. Based on the fused window features obtained after cross-attention computation, each window is scored and weighted, and then reorganized into a complete feature map according to its original spatial location.

[0018] Furthermore, the small target dataset is a ship small target dataset, in which the bounding box coordinates and category labels of ship targets are generated by manual annotation, and the annotation data is stored in COCO format files; the preprocessing includes image size unification, bounding box format conversion and normalization; the data augmentation includes random illumination perturbation, random scaling embedding, random cropping based on bounding box intersection-union constraints, invalid bounding box cleaning and image horizontal flipping.

[0019] Furthermore, the global-local edge enhancement module extracts local spatial features through a 5×5 depthwise separable convolution and extracts global contextual features through a 7×7 depthwise separable convolution with an inflation rate of 3, and inputs them into the corresponding local feature branches and global feature branches respectively.

[0020] Furthermore, the process of generating the recalibrated weight map includes: performing 1×1 convolutional channel compression on the feature maps of the local feature branch and the global feature branch respectively, then concatenating them in the channel dimension; performing global average pooling and global max pooling on the concatenated features to generate corresponding global attention weights and local attention weights; and then applying them to the corresponding branches and fusing them to obtain the recalibrated weight map.

[0021] Furthermore, the smoothing filtering process is Gaussian filtering, and the gradient operator process is Scharr operator processing;

[0022] The Gaussian filtering process includes: performing Gaussian convolution on the features of the local feature branches, processing them with batch normalization and GELU activation function, performing residual fusion with the features of the local feature branches before processing, and outputting the enhanced local features through depthwise separable convolution.

[0023] The Scharr operator processing includes: performing Scharr convolution operation on the features of the global feature branch, processing them with batch normalization and GELU activation function, performing residual fusion with the features of the global feature branch before processing, and outputting the enhanced global features through depthwise separable convolution.

[0024] Furthermore, the local coding branch performs 3×3 depth-separable dilated convolutions with receptive fields of 1, 2, and 3 on the high-resolution feature maps respectively. The outputs of the three convolutions are concatenated in the channel dimension and then fused by 1×1 convolutions. The feature sequences within each window are divided according to a preset window size, and self-attention calculation is performed to generate local window features.

[0025] Furthermore, the global encoding branch performs global average pooling on the high-resolution feature map to obtain a global semantic feature representation. After nonlinear mapping through two fully connected layers, it is expanded to the same number as the local window, generating global semantic features for cross-attention computation.

[0026] Furthermore, the importance score of the window feature is obtained by performing a global average operation on each window of the fused window feature obtained after cross-attention calculation, and the importance scores of all windows are then normalized by Softmax and used for window feature weighting.

[0027] Furthermore, all convolution operations of the global-local edge enhancement module and the adaptive global guided window sparse selection mechanism are implemented using depthwise separable convolution to construct a lightweight detection model.

[0028] Furthermore, a small target detection device for drone aerial images includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0029] A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0030] Compared to existing technologies, this invention and its preferred embodiments firstly achieve differentiated enhancement of local texture details and global contour structures of small targets through a parallel dual-branch architecture of the global-local edge enhancement module. This effectively alleviates the problem of fine-grained feature loss caused by multiple downsampling and improves the feature representation capability of small targets. Secondly, based on a cross-attention-guided window sparse selection mechanism, efficient modeling of high-resolution feature maps is achieved. The importance assessment of local windows is guided by global semantic information, ensuring the feature integrity of key regions while significantly reducing computational overhead, achieving a balance between detection accuracy and processing efficiency. Thirdly, both the global-local edge enhancement module and the adaptive global guided window sparse selection mechanism are implemented using depthwise separable convolution, constructing a lightweight detection model that meets the real-time requirements of practical applications while maintaining high performance. Finally, this invention is optimized for the detection of small targets such as ships in UAV aerial images. Through targeted data augmentation strategies and model architecture design, it effectively addresses complex background interference, improves the reliability of detection results, and provides accurate data support for subsequent tasks such as traffic statistics, behavior analysis, and security risk assessment. Attached Figure Description

[0031] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0032] Figure 1 This is a flowchart illustrating the operation of an embodiment of the present invention;

[0033] Figure 2 This is a network structure diagram of a model in an embodiment of the present invention;

[0034] Figure 3 This is a structural diagram of the lightweight global-local edge enhancement module according to an embodiment of the present invention;

[0035] Figure 4 This is a structural diagram of the Gaussian local edge enhancement module according to an embodiment of the present invention;

[0036] Figure 5 This is a structural diagram of the global edge enhancement module based on the Scharr operator in an embodiment of the present invention;

[0037] Figure 6 This is a schematic diagram of the adaptive global guide window sparse selection mechanism in an embodiment of the present invention. Detailed Implementation

[0038] To make the features and advantages of the present invention more apparent and understandable, specific embodiments are described below in detail:

[0039] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0040] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0041] To address the technical challenges of existing technologies in UAV aerial image processing, such as insufficient representation of small target features, inadequate utilization of edge information, poor detection stability under complex background interference, and difficulty in balancing high precision and high efficiency, this paper aims to achieve high-precision and high-efficiency detection of small targets in complex scenes.

[0042] This invention provides a method for small target detection in UAV aerial images based on the GLES-Net model. First, a small target dataset is constructed by organizing and labeling the collected UAV aerial images, and preprocessing and partitioning the dataset, including data augmentation, normalization, and appropriate division of the training and test sets, to improve the model's generalization ability and robustness. Second, a small target detection model for UAV aerial images based on GLES-Net is constructed.

[0043] The GLES-Net model incorporates a lightweight Global-Local Edge Enhancement Block (GLEEB) during the feature extraction stage. By fusing global semantic information, local detail information, and edge structure features, it effectively enhances multi-scale feature representation capabilities and improves the model's ability to perceive and discriminate small targets. Simultaneously, in the encoding stage, an Adaptive Global-guided Window Sparse Selection (AGWSS) mechanism is constructed to adaptively filter window features in high-resolution feature maps. This reduces redundant computation while highlighting key region features, thereby improving feature utilization efficiency and detection accuracy. Finally, based on the optimized feature representation, the model completes the task of detecting small ships in UAV aerial images.

[0044] Compared with existing technologies, this invention not only improves the applicability of the model in real-world scenarios, but also significantly improves the detection accuracy and robustness of small targets in UAV aerial photography scenarios by introducing a global-local edge enhancement module and an adaptive global guided sparse selection mechanism, while ensuring computational efficiency. It exhibits superior detection performance, especially in complex backgrounds, scenarios with significant scale changes and high-density targets, and has good engineering application value and promotion prospects.

[0045] The implementation of the solution will be further demonstrated and described below with reference to the accompanying drawings through more specific embodiments:

[0046] like Figure 1 As shown, the method for detecting small targets in UAV aerial images according to an embodiment of the present invention includes the following steps:

[0047] (1) Acquire aerial images of ships on the Yangtze River taken by UAVs, organize and label the image data, and construct a small target dataset of ships on the Yangtze River taken by UAVs.

[0048] (2) The constructed dataset is parsed and its format is converted, and it is divided into training set, validation set and test set according to the preset ratio. Data augmentation processing is performed on the training set images to improve the generalization ability of the model.

[0049] (3) Construct a small target detection model for UAV aerial images based on GLES-Net;

[0050] (4) Input the training set images into the GLES-Net model for training, obtain the trained model weight parameters, and use the model weights to detect and identify small targets in the aerial images of ships on the Yangtze River taken by UAV.

[0051] As a preferred implementation, the process of constructing the UAV aerial photography of small targets of ships on the Yangtze River in step (1) includes: First, manually annotating the ship targets in the UAV aerial photography of ships on the Yangtze River using the Labelme annotation tool, using ships as the detection category, and generating corresponding target annotation information files; Second, reading the annotation file corresponding to each image, extracting the image size information and target location information, including bounding box coordinates and category labels; Then, uniformly organizing the image information, annotation information and category information according to the preset data structure to generate standardized annotation data and construct a JSON data structure; Finally, saving the organized annotation data as a unified JSON file conforming to the COCO format, and constructing a complete UAV aerial photography of small targets of ships on the Yangtze River.

[0052] As a preferred implementation, step (2) involves parsing and format conversion of the constructed dataset, and data augmentation processing of the training set images. The data augmentation process includes: RandomPhotometricDistort performs random illumination perturbation processing on the input image, randomly adjusting the brightness, contrast, saturation, and hue of the image with a preset probability, wherein the preset probability is preferably 0.5, to enhance the model's adaptability to different lighting environments; RandomZoomOut performs random scaling and embedding processing on the image, reducing the original image by a random ratio and embedding it into the background canvas, wherein the fill value of the background canvas is preferably 0, to simulate complex background environments and enhance the small target detection capability; RandomIOUCrop performs random cropping processing on the image based on the intersection-union ratio constraint of the target bounding box, performing the cropping operation with a preset probability, wherein the preset probability is preferably 0.8, and the intersection-union ratio between the cropped region and the target bounding box meets a preset threshold, to ensure that effective target information is not lost; SanitizeBound The `ingBox` function performs validity checks on cropped or transformed target bounding boxes, removing invalid boxes smaller than a preset threshold (ideally 1 pixel) to improve data annotation quality. It then performs random horizontal flipping on the image with a preset probability (ideally 0.5) to enhance the model's robustness to changes in target orientation. The image and its corresponding annotations are then scaled to a preset resolution (ideally 640×640). The image data is converted to tensor format and further converted to the data type required by the model to meet network input requirements. The target bounding boxes are also converted from a corner-based representation to a representation based on center-point coordinates and width / height, and normalized to map the bounding box parameters to a range of 0 to 1. After these processing steps, the target bounding boxes are checked again to remove invalid boxes smaller than a preset threshold, ensuring the validity and consistency of the training data.

[0053] The constructed dataset is further divided into training set, validation set and test set according to a preset ratio, wherein the preferred ratio of the training set, validation set and test set is 8:1:1. The dataset division process is carried out on the premise of ensuring that the distribution of target categories in each subset is basically consistent, so as to improve the stability of model training and the reliability of evaluation results.

[0054] As a preferred implementation method, such as Figure 2As shown, the detection model constructed in step (3) includes a feature extraction module and an encoding optimization module. The feature extraction module introduces a lightweight global-local edge enhancement module (GLEEB) to enhance the input features. The GLEEB module integrates global semantic information, local detail information and edge structure features to jointly model multi-scale features to improve feature expression capabilities, thereby enhancing the model's ability to perceive and discriminate small targets. The encoding optimization module constructs an adaptive global guided window sparse selection mechanism (AGWSS) to filter window features in the high-resolution feature map. The AGWSS mechanism evaluates the importance of each window feature based on global context information and adaptively selects window features based on the evaluation results to highlight key regional features while reducing redundant computation, thereby improving feature utilization efficiency and detection accuracy.

[0055] The implementation process of introducing a lightweight global-local edge enhancement module (GLEEB) into the feature extraction module is as follows: The lightweight global-local edge enhancement module is integrated into the backbone network, such as... Figure 3 As shown,

[0056] First, the input feature maps are processed through multi-scale feature extraction using depthwise separable convolutions with different receptive fields. Specifically, a 5×5 depthwise separable convolution extracts local spatial features, while a 7×7 depthwise separable convolution with a dilation rate of 3 extracts global contextual information features with a large receptive field. Second, the two sets of features are channel-compressed using 1×1 convolutions and concatenated along the channel dimension to obtain fused features. Then, global average pooling and global max pooling operations are performed on the fused features, and corresponding attention weights are generated through 1×1 convolution mapping and a sigmoid activation function. The max pooling branch highlights salient local response regions, generating local attention weights, while the average pooling branch characterizes global distribution information, generating global attention weights. Finally, the attention weights are applied to feature branches at corresponding scales to construct local and global features. The features are obtained by element-wise multiplication of the local receptive field features extracted by the 5×5 depthwise separable convolution and the local attention weights. The global features are obtained by element-wise multiplication of the global receptive field features extracted by the 7×7 depthwise separable convolution with a dilation rate of 3 and the global attention weights. Then, the local features are fed into the Gaussian local edge enhancement module for local edge feature extraction, and the global features are fed into the Scharr-based global edge enhancement module for global edge feature extraction. Finally, the Gaussian-enhanced local features and the Scharr-enhanced global features are element-wise added and fused, and channel recovery is performed through a 1×1 convolution to obtain the final attention weight map. This weight map is then element-wise multiplied with the input feature map to achieve adaptive recalibration of the original features, thereby effectively improving the model's response capability to small target regions and edge structures.

[0057] The calculation process can be expressed as follows:

[0058]

[0059]

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066] in, This represents the Sigmoid activation function. This indicates element-wise multiplication. This indicates the Gaussian filter enhancement operation. This indicates an enhanced operation based on the Scharr operator.

[0067] In this embodiment, the structures of the Gaussian local edge enhancement module and the global edge enhancement module based on the Scharr operator are as follows:

[0068] The Gaussian local edge enhancement module works as follows: First, a two-dimensional Gaussian convolution kernel is constructed. Second, the constructed Gaussian convolution kernel is expanded to match the number of input feature channels, and a Gaussian filtering operation is constructed based on a 5×5 depthwise separable convolution to perform channel-by-channel convolution operations on the input local features to obtain smooth features. Then, batch normalization and GELU activation function processing are applied to the smooth features to enhance their expressive power. Next, the enhanced features are added element-wise with the original input features to achieve feature residual fusion. Finally, the fused features are sequentially processed through a 3×3 depthwise separable convolution, batch normalization, GELU activation function, and 1×1 convolution to obtain the final enhanced local features, effectively enhancing the texture details and weak edge information of local regions.

[0069] The global edge enhancement module based on the Scharr operator works as follows: First, convolutional kernels of the Scharr operator are constructed in the horizontal and vertical directions. Second, the constructed convolutional kernels are expanded to each channel, and 3×3 depthwise separable convolutions are used to calculate the gradients in the horizontal and vertical directions of the input global features. Then, the gradients in the two directions are amplified and fused, the edge response intensity is calculated, and batch normalization and GELU activation function processing are applied to enhance its nonlinear expressive power. Next, the enhanced edge features are residually fused with the input features. Finally, the fused features are sequentially passed through 3×3 depthwise separable convolutions, batch normalization, GELU activation function, and 1×1 convolutions to obtain the final enhanced global features, effectively enhancing the target contour information and global structural features.

[0070] More specifically, such as Figure 4 As shown, the implementation process of the Gaussian local edge enhancement module is as follows:

[0071] First, a two-dimensional Gaussian convolution kernel is constructed, with a kernel size of K×K and a standard deviation of . The Gaussian function can then be expressed as:

[0072]

[0073] in, Represents the kernel coordinates, exp This represents an exponential function. The Gaussian kernel is normalized so that the sum of all its elements is 1.

[0074] Secondly, the constructed Gaussian convolution kernel is expanded to match the number of input feature channels, and a Gaussian filtering operation is constructed based on a 5×5 depthwise separable convolution. Channel-by-channel convolution is then performed on the local features of the input to obtain smooth features, which can be represented as:

[0075]

[0076] in, This represents the convolution operation.

[0077] Next, batch normalization and GELU activation function are applied to the smooth features to enhance their expressive power.

[0078]

[0079] Then, the enhanced features are added element-wise to the original input features to achieve residual feature fusion:

[0080]

[0081] Finally, the fused features are sequentially processed through a 3×3 depthwise separable convolution, batch normalization, GELU activation function, and 1×1 convolution to obtain the final enhanced local features:

[0082]

[0083] The above processing effectively enhances the texture details and weak edge information in local areas.

[0084] like Figure 5 As shown, the implementation process of the global edge enhancement module based on the Scharr operator is as follows:

[0085] First, construct the convolution kernels of the Scharr operator in the horizontal and vertical directions, respectively, as follows:

[0086]

[0087] Secondly, the above convolutional kernels are expanded to each channel, and 3×3 depthwise separable convolutions are used to calculate the gradients in the horizontal and vertical directions of the input global features, respectively, to obtain:

[0088]

[0089] Next, the gradients in the two directions are amplified and fused to calculate the edge response intensity:

[0090]

[0091] in, To prevent numerically unstable small constants.

[0092] Subsequently, the edge response features are batch normalized and processed using the GELU activation function to enhance their nonlinear expressive power.

[0093]

[0094] Then, the enhanced edge features are residually fused with the input features:

[0095]

[0096] Finally, the fused features are sequentially passed through a 3×3 depthwise separable convolution, batch normalization, GELU activation function, and a 1×1 convolution to obtain the final enhanced global features:

[0097]

[0098] Through the above processing, the target contour information and global structural features are effectively enhanced.

[0099] like Figure 6 As shown, the implementation process of building the Adaptive Global Bootstrap Window Sparse Selection Mechanism (AGWSS) in the encoding optimization module is as follows:

[0100] First, the high-resolution feature maps extracted from the backbone network are input into the local encoding branch and the global encoding branch, respectively. The local encoding branch is used to extract local window features, and the global encoding branch is used to extract global semantic features.

[0101]

[0102]

[0103] in, The form of the feature map is represented by B, where B represents the batch size and C represents the feature dimension. G represents a local encoding operation. This indicates a global encoding operation.

[0104] Secondly, cross-attention computation is performed between local window features and global semantic features, where local window features are used as the query and global features are used as the key and value, in order to guide and enhance local window features with global semantic information.

[0105]

[0106] in, This is a cross-attention computation operation.

[0107] Next, a global averaging operation is performed on the features of each fused window to calculate the importance score of the window, and then Softmax normalization is applied to the importance scores of all windows.

[0108]

[0109]

[0110] in, Rate the importance of the window, window size is × In this embodiment, the high-resolution feature map is divided into multiple non-overlapping windows according to a preset window size. Each window contains feature vectors (Tokens) at multiple spatial locations, and the set of all Tokens in each window constitutes a window feature.

[0111] Then, the windows are weighted using the normalized weights to enhance the feature responses of key windows while suppressing feature information from redundant windows, thus achieving a sparse representation of window-level features.

[0112]

[0113] in, This indicates a weighted operation, which can be implemented using methods such as element-wise multiplication.

[0114] Finally, the weighted window features are reorganized according to their original spatial locations to restore the complete feature map, and the enhanced feature representation is output.

[0115] like Figure 6 As shown, the implementation process of local coding branches and global coding branches is as follows:

[0116] Local encoding branch: First, to enhance the multi-scale feature representation capability of local regions, three sets of depthwise separable convolution operations are performed on the input high-resolution feature map. The receptive fields of each convolution operation are 1, 2, and 3 respectively, and the kernel size of each convolution operation is 3×3.

[0117]

[0118] Subsequently, the features output from the three sets of convolutions are concatenated along the channel dimension and fused using a 1×1 convolution to obtain local fused features; then, the local fused features are processed according to a preset window size. × The tokens are divided into segments, and self-attention is calculated for the token sequence within each window to capture dependencies within local regions.

[0119]

[0120] in, This indicates a self-attention computation operation.

[0121] Global Encoding Branch: First, global average pooling is performed on the input high-resolution feature map along the token dimension to obtain a global semantic feature representation. Then, a two-layer fully connected (Linear) network is used to perform a non-linear mapping on the global semantic features to enhance their expressive power. Finally, the mapped global semantic features are expanded to match the number of local windows, thus obtaining the globally encoded features used for cross-attention computation.

[0122]

[0123] in, This is a global average pooling operation. Perform nonlinear mapping operations on fully connected networks. It is a non-linear activation function.

[0124] As a preferred implementation, in step (4), to fully utilize the performance of the computing device and ensure the stability and convergence effect of the model training process, the detection model is trained on the training set. Specifically, the following settings are included: during the model training process, the training rounds are set to 300 rounds, the batch size is set to 6, the input image size is uniformly set to 640×640, the number of data loading threads is set to 8, and a GPU-based computing device is used for accelerated computation to improve training efficiency. In the model initialization stage, pre-trained weights are used to initialize the model parameters to improve the convergence speed and initial performance of the model. In terms of optimization strategy, the AdamW optimization algorithm is selected to update the model parameters. The initial learning rate is set to 0.001, the learning rate decay coefficient is set to 0.01, the weight decay coefficient is set to 0.0005, and the momentum parameter is set to 0.937, thereby improving the generalization ability of the model while ensuring training stability. During training, a warm-up mechanism is introduced, with 5 warm-up rounds. The learning rate is gradually increased in the early stages of training to reduce instability and improve model convergence. Simultaneously, an automatic mixed-precision training strategy is employed to reduce memory usage and improve training efficiency while maintaining model computational accuracy. Furthermore, an early stopping mechanism is implemented: training is automatically terminated if the validation set performance fails to meet a preset improvement condition within 30 consecutive evaluation periods to avoid overfitting and conserve computational resources. After training, the final weight parameters of the model and the optimal weight parameters on the validation set are saved. The optimal weight model is then selected for small target detection in UAV aerial images to achieve accurate identification and localization of small-scale targets.

[0125] Compared with the prior art, the outstanding advantages of the solutions provided in the embodiments of the present invention include:

[0126] (1) To address the issues of small target size, low proportion, and easy loss of feature information in UAV aerial images, a dataset of small targets of ships on the Yangtze River surface was constructed for complex water environments. Combined with data preprocessing and data augmentation strategies, the model's ability to learn the features of small targets was effectively improved, thereby enhancing the model's generalization performance and environmental adaptability.

[0127] (2) By introducing the GLEEB global-local edge enhancement module in the feature extraction stage, the collaborative modeling of global semantic information, local detail information and edge structure information is realized, which enhances the multi-scale feature expression capability and thus significantly improves the model's perception capability and detection accuracy for small targets.

[0128] (3) By constructing an AGWSS adaptive global guided window sparse selection mechanism, the window features in the high-resolution feature map are adaptively filtered, which effectively suppresses redundant information and highlights key regional features, thereby improving feature utilization efficiency and detection accuracy while reducing computational complexity.

[0129] (4) Under complex background conditions, including water surface reflection, shadow interference and target occlusion, the present invention can still maintain high detection accuracy and stability, especially in scenarios with significant changes in target size and high density distribution.

[0130] (5) While taking into account both detection accuracy and computational efficiency, it can meet the application requirements for real-time performance and accuracy in UAV aerial photography scenarios, and has good engineering application value and promotion prospects.

[0131] In the model performance evaluation process of this invention, the mean average precision (mAP) is used as the main evaluation index to comprehensively reflect the overall performance of the model in terms of target localization accuracy and category classification accuracy. To further evaluate the model's performance under different detection standards and target scales, a multi-index comprehensive evaluation method is adopted, specifically including:

[0132] (1) mAP@0.5 (mAP 50 ): This represents the average accuracy calculated under an Intersection over Union (IoU) threshold of 0.5, used to evaluate the model's detection performance under relatively lenient matching conditions;

[0133] (2) mAP@0.5:0.95 (mAP 50-95): This represents the average accuracy calculated under multiple threshold conditions with IoU thresholds ranging from 0.5 to 0.95 and a step size of 0.05. It is used to comprehensively reflect the overall detection capability of the model under different positioning accuracy requirements.

[0134] (3) Small Target Detection Index (mAP) small Based on the general evaluation criteria for object detection, targets with a size smaller than 32×32 pixels are defined as small targets, and their detection performance is evaluated using the corresponding average precision value to more accurately reflect the detection effect of the model in small-scale target scenes.

[0135] In addition to detection accuracy metrics, the following performance metrics are also introduced to comprehensively evaluate the model's computational performance and engineering application capabilities:

[0136] (4) Number of model parameters (Params): used to characterize the total number of learnable parameters in the model, reflecting the model size and storage overhead;

[0137] (5) Computational complexity (GFLOPs): This measures the number of floating-point operations required by the model in one forward inference process, in units of one billion floating-point operations, and is used to evaluate the computational complexity of the model.

[0138] (6) Inference speed (Frames Per Second, FPS): This measures the number of image frames that the model can process per unit of time, in order to evaluate the model’s real-time processing capability in practical applications.

[0139] Through comprehensive analysis of the above evaluation indicators, the performance of the method of the present invention can be fully evaluated from multiple dimensions such as detection accuracy, computational complexity, and inference efficiency.

[0140] The specific experimental comparison results are shown in Table 1.

[0141] Table 1. Experimental Comparison Results

[0142]

[0143] As can be seen from the results in Table 1,

[0144] (1) In terms of detection accuracy, the GLES-Net model proposed in this invention shows significant advantages. Specifically, mAP 50 The accuracy reached 94.7%, significantly outperforming all comparison models; in mAP 50-95 The performance index reached 66.1%, an improvement of approximately 10.7 percentage points compared to the superior RT-DETR-R101 model (55.4%); and the small target detection index mAP... smallThe accuracy rate reached 56.1%, which is about 18.1 percentage points higher than the YOLO11-X model (38.0%), indicating that the present invention significantly enhances the small target detection capability in complex scenes.

[0145] (2) In terms of model complexity, the number of parameters of the GLES-Net model is 26.1M, which is significantly lower than most of the comparison models (such as YOLOv5-X with 97.2M and YOLOv6-X with 173M). At the same time, its computational cost is 147.1GFLOPs, which is at a low level overall. This shows that the present invention effectively controls the model size and computational cost while improving detection performance.

[0146] (3) In terms of inference performance, the GLES-Net model achieves 22.3 FPS, which is better than most of the comparison models (such as RT-DETR-R101, which only has 7.3 FPS), indicating that the present invention has good real-time performance while ensuring high accuracy, and can meet the needs of practical applications.

[0147] The experimental results above show that the GLES-Net model proposed in this invention achieves a good balance and significant improvement in detection accuracy, small target detection capability, model lightweighting, and inference speed.

[0148] In summary, this invention proposes a small target detection method for UAV aerial images based on the GLES-Net model. In the feature extraction stage, a lightweight global-local edge enhancement module is introduced. By fusing global semantic information, local detail information, and edge structure features, the expressive power of multi-scale features is effectively improved, thereby enhancing the model's perception and discrimination capabilities for small targets. In the encoding stage, an adaptive global guided window sparse selection mechanism is constructed to adaptively weight and filter window features in high-resolution feature maps. This reduces redundant computation while highlighting key region features, thereby improving feature utilization efficiency and detection accuracy. Therefore, this invention effectively reduces model complexity and computational overhead while improving small target detection performance, achieving a balance between lightweight model and efficient inference, and possesses good engineering application value and promising prospects for widespread application.

[0149] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.

[0150] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0151] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0152] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

[0153] This invention is not limited to the preferred embodiment described above. Anyone inspired by this invention can derive other various forms of small target detection methods for UAV aerial images based on the GLES-Net model. All equivalent variations and modifications made within the scope of the claims of this invention shall fall within the scope of this invention.

Claims

1. A method for small target detection in UAV aerial images based on the GLES-Net model, characterized in that, Includes the following steps: Construct a small target dataset and perform preprocessing and data augmentation, then divide it to obtain a training set; A small target detection model is constructed, which includes a feature extraction module and an encoding optimization module; The detection model is trained using the training set, and small targets in the aerial images taken by the UAV under test are detected based on the weights of the trained model. in, The feature extraction module includes a global-local edge enhancement module, which decouples the input feature map into parallel local feature branches and global feature branches; performs smoothing filtering on the local feature branches and gradient operator processing on the global feature branches; and fuses the processing results of the two branches to generate a recalibrated weight map for adaptive recalibration of the input feature map. The encoding optimization module sets up an adaptive global guided window sparse selection mechanism. This mechanism inputs the high-resolution feature map into the local encoding branch and the global encoding branch respectively to generate local window features and global semantic features. Cross-attention computation is performed with local window features as queries and global semantic features as keys and values. Based on the fused window features obtained after cross-attention computation, each window is scored and weighted, and then reorganized into a complete feature map according to its original spatial location.

2. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The small target dataset is a ship small target dataset. The bounding box coordinates and category labels of the ship targets are generated by manual annotation, and the annotation data is stored in COCO format files. The preprocessing includes image size unification, bounding box format conversion and normalization; the data augmentation includes random illumination perturbation, random scaling embedding, random cropping based on bounding box intersection-union constraints, invalid bounding box cleanup and image horizontal flipping.

3. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The global-local edge enhancement module extracts local spatial features through a 5×5 depthwise separable convolution and extracts global contextual features through a 7×7 depthwise separable convolution with an inflation rate of 3, and inputs them into the corresponding local feature branches and global feature branches respectively.

4. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The process of generating the recalibrated weight map includes: performing 1×1 convolutional channel compression on the feature maps of the local feature branches and the global feature branches respectively, then concatenating them in the channel dimension; performing global average pooling and global max pooling on the concatenated features to generate corresponding global attention weights and local attention weights; and then applying them to the corresponding branches and fusing them to obtain the recalibrated weight map.

5. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The smoothing filter is a Gaussian filter, and the gradient operator is a Scharr operator. The Gaussian filtering process includes: performing Gaussian convolution on the features of the local feature branches, processing them with batch normalization and GELU activation function, performing residual fusion with the features of the local feature branches before processing, and outputting the enhanced local features through depthwise separable convolution. The Scharr operator processing includes: performing Scharr convolution operation on the features of the global feature branch, processing them with batch normalization and GELU activation function, performing residual fusion with the features of the global feature branch before processing, and outputting the enhanced global features through depthwise separable convolution.

6. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The local coding branch performs 3×3 depth-separable dilated convolutions with receptive fields of 1, 2, and 3 on the high-resolution feature maps respectively. The outputs of the three convolutions are concatenated in the channel dimension and then fused by 1×1 convolutions. The feature sequences within each window are divided according to a preset window size, and self-attention calculation is performed to generate local window features.

7. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The global encoding branch performs global average pooling on the high-resolution feature map to obtain a global semantic feature representation. After nonlinear mapping through two fully connected layers, it is expanded to the same number as the local window, generating global semantic features for cross-attention computation.

8. The method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: The importance score of the window feature is obtained by performing a global average operation on each window of the fused window feature obtained after cross-attention calculation, and the importance scores of all windows are then normalized by Softmax and used for window feature weighting.

9. A method for small target detection in UAV aerial images based on the GLES-Net model according to claim 1, characterized in that: All convolution operations of the global-local edge enhancement module and the adaptive global guided window sparse selection mechanism are implemented using depthwise separable convolution to construct a lightweight detection model.

10. A device for detecting small targets in drone aerial images, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1 to 9.