An improved YOLOv8-based unmanned aerial vehicle aerial small target detection method

CN120219993BActive Publication Date: 2026-10-20CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510282082.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2026-10-20
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

然而,小目标的检测精度在复杂场景中仍面临诸多挑战

Benefits of technology

[0023]本发明通过引入WIoU v3损失函数,实现了对边界框梯度增益的优化分配,增强了模型对中等质量样本的泛化能力;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219993B_ABST
    Figure CN120219993B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer vision and target detection, in particular to a UAV aerial small target detection method based on an improved YOL0v8, which comprises the following steps: preprocessing aerial image data to generate standardized input data; adopting a WIoU v3 to optimize a boundary box regression; improving feature extraction efficiency through a lightweight adaptive partial convolution module; adopting a SAMA attention mechanism to optimize feature attention; introducing an ADWN down-sampling module to enhance feature expression; and adding a P2 detection layer to realize multi-scale feature fusion. Through the above technical means, the application effectively improves the precision and robustness of small target detection, solves the problem that targets are difficult to detect in a complex scene, and realizes more efficient and more accurate aerial small target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and target detection technology, and in particular to a method for detecting small targets in UAV aerial photography based on an improved YOL0v8. Background Technology

[0002] Drone aerial photography is widely used in disaster monitoring, crop assessment, and urban planning due to its flexible perspective and wide coverage. However, the detection accuracy of small targets in complex scenes still faces many challenges. Existing technologies mainly rely on deep learning models (such as the YOLO series) for target detection, but these methods perform poorly when dealing with low resolution, complex backgrounds, and small targets with close spacing. This is because existing models have insufficient feature extraction capabilities, inadequate feature fusion, and lack specific optimization mechanisms for small targets, resulting in a significant decrease in detection accuracy and generalization performance. Summary of the Invention

[0003] To address the numerous problems existing in the prior art, this invention provides a method for small target detection in UAV aerial photography based on an improved YOLOv8 model. This invention improves the YOLOv8 model by introducing various optimization techniques, including the WIoU v3 loss function, adaptive partial convolutional modules, SAMA attention mechanism, ADWN downsampling module, and P2 detection layer, thereby enhancing model performance in multiple aspects such as feature extraction, feature fusion, and loss optimization. These improvements significantly enhance the detection accuracy and generalization ability of small targets in complex scenes, while effectively reducing computational resource consumption.

[0004] A method for detecting small targets in UAV aerial photography based on an improved YOL0v8 includes the following steps:

[0005] The drone aerial image data is preprocessed to generate standardized input data adapted to the YOLOv8 model;

[0006] The standardized input data is then input into the improved YOLOv8 model, and the improvement includes the following features:

[0007] We use WIoU v3 as the loss function for bounding box regression and optimize gradient gain allocation through a dynamic non-monotonic mechanism to suppress excessive or harmful gradients generated by extreme samples.

[0008] The C2f module in the YOLOv8 model is replaced with a lightweight adaptive partial convolution module to reduce computation and improve the ability to extract spatial features.

[0009] The SAMA parameterless self-attention mechanism is used to replace the downsampling convolution module, and three-dimensional attention weights are generated by optimizing the energy function.

[0010] An adaptive downsampling module is introduced, and through multi-branch feature fusion design, the final feature map contains both the original feature information and the features of the additional processing path.

[0011] A new P2 detection layer is added to the Neck part of the network to improve detection efficiency through multi-scale feature fusion, while retaining the P5 detection branch;

[0012] Multi-object detection is performed based on the improved YOLOv8 model, and the detection results of object category and bounding box position are output.

[0013] Preferably, the image data preprocessing steps include the following specific operations: normalizing the UAV aerial image data and scaling the pixel values ​​to between zero and one to reduce the differences in the distribution of input data; randomly cropping the image to generate different sizes of field of view; performing directional enhancement on the image by horizontal flipping; and generating standardized input data adapted to the YOLOv8 model.

[0014] Preferably, the WIoU v3 loss function optimizes the gradient gain for medium-quality samples by calculating the weighted intersection-union ratio between the predicted box and the target box during bounding box regression, and by combining the distance quantization of center point offset and width-height difference.

[0015] Preferably, the lightweight adaptive partial convolution module divides the input feature map into multiple continuous channel groups, selects some channels for regular convolution operations according to a set ratio, and outputs the unselected channels through direct mapping.

[0016] Preferably, the regular convolution operation uses a 3x3 convolution kernel and a unit stride to ensure that the spatial resolution of the feature map remains consistent before and after convolution.

[0017] Preferably, the SAMA parameterless self-attention mechanism generates a three-dimensional attention weight matrix for weighting by calculating the energy distribution of the surrounding area for each location point of the feature map. The weight matrix adjusts the intensity of the feature map by multiplying pixel by pixel.

[0018] Preferably, the adaptive downsampling module includes two parallel feature paths. The first path performs average pooling to extract low-frequency information, and the second path performs max pooling to capture high-frequency edge features. Finally, the output features of the two paths are fused by linear weighting to generate an enhanced downsampling feature map.

[0019] Preferably, the newly added P2 detection layer in the Neck section performs bilinear interpolation upsampling on the low-level feature map and performs point-by-point weighted fusion with the high-level feature map. The fusion result is then subjected to a set of convolution operations to generate a high-resolution feature map, which is used to optimize the detection performance of small targets.

[0020] Preferably, the feature fusion of the P2 detection layer combines spatial detail information from low-level feature maps and semantic information from high-level feature maps using a weighted averaging strategy, enabling the model to effectively detect targets at different scales.

[0021] Preferably, the multi-target detection results are obtained by weighting the category prediction score of each target with the intersection-union ratio of the bounding box position prediction to generate a comprehensive confidence score, and the final detection results are filtered by setting a confidence threshold.

[0022] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows:

[0023] This invention introduces the WIoU v3 loss function to optimize the allocation of gradient gain for bounding boxes, thereby enhancing the model's generalization ability for medium-quality samples.

[0024] This invention reduces computational complexity while improving the ability to extract spatial features through a lightweight adaptive partial convolution module.

[0025] This invention achieves precise attention to key region features and suppresses non-critical information by employing the SAMA parameterless self-attention mechanism.

[0026] This invention retains more detailed information and optimizes feature representation by introducing an ADWN downsampling module;

[0027] This invention achieves a significant improvement in multi-scale feature fusion and small target detection performance by adding a new P2 detection layer;

[0028] This invention effectively solves the problems of insufficient feature representation ability and low detection accuracy in small target detection in existing technologies, while improving detection efficiency and robustness. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall structure of the improved YOLOv8 model of this invention;

[0030] Figure 2 This is a diagram of the PCNV adaptive partial convolution structure in an embodiment of the present invention;

[0031] Figure 3 This is a comparative diagram of three attention steps in an embodiment of the present invention;

[0032] Figure 4 This is a structural diagram of the ADWN module in an embodiment of the present invention;

[0033] Figures 5a-5i This is a schematic diagram illustrating the acquisition of images from multiple angles and different scenarios using various types of drones in an embodiment of the present invention.

[0034] Figures 6a-6c These are comparison curves of amAP0.5, Precision(c), and Recall in this embodiment of the invention.

[0035] Figure 7 This is a comparison chart of the original image, YOLOv8s heatmap, and improved model heatmap in an embodiment of the present invention;

[0036] Figure 8 This is a schematic diagram comparing the inference results of three models in the embodiments of the present invention. Detailed Implementation

[0037] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0038] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0039] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0040] The YOLO model has achieved remarkable success in computer vision, especially in object detection tasks. Researchers have improved the method and added new modules, proposing many classic models. YOLOv8 adopts an improved version of CSPDarknet53 as its backbone network, extracting five feature levels of different scales, namely B1 to B5, through five downsampling processes. In the design of this backbone network, the traditional Cross-Stage Part (CSP) module is replaced by the C2f module, which enhances the richness of feature extraction while maintaining the network's lightweight nature through gradient splitting connections. The C2f module first processes the input information through the CBS module (convolution, batch normalization, and SiLU activation function), and then the backbone network uses the Spatial Pyramid Pooling Fast (SPPF) module to pool the feature maps to accommodate different output sizes. Compared with the traditional Spatial Pyramid Pooling (SPP), SPPF reduces computation and latency through three consecutive max pooling layers. Inspired by PANet, YOLOv8 employs a PAN-FPN structure in its neck design. This design maintains the model's lightweight nature while preserving original performance by eliminating the convolutional step after upsampling. In YOLOv8, P4-P5 and N4-N5 represent two different scale features in the PAN and FPN structures, respectively. FPN enhances the semantic information of features by fusing B4-P4 and B3-P3 in a top-down manner, but may lose some localization information. To address this, PAN-FPN strengthens the learning of location information by fusing P4-N4 and P5-N5, achieving path enhancement. This top-down and bottom-up network structure effectively combines shallow location information and deep semantic information through feature fusion, enhancing the diversity and completeness of features. In the detection part, YOLOv8 uses a decoupled head structure, employing two independent branches for object classification and bounding box regression prediction, applying different loss functions to these two tasks. The classification task employs binary cross-entropy loss (BCE loss), while the bounding box regression task uses distribution focus loss (DFL) and CIoU loss. This detection structure not only improves detection accuracy but also accelerates model convergence. As an anchorless detection model, YOLOv8 can concisely identify positive and negative samples and dynamically allocates samples through a task alignment allocator, further enhancing the model's detection accuracy and robustness.

[0041] This invention provides a small target detection method for UAV aerial photography based on an improved YOLOv8 model: PAS-YOLO (i.e., an improved YOLOv8 model), as follows: Figure 1As shown. First, WIoU v3 is adopted as the loss function for bounding box regression. It implements a reasonable distribution of gradient gain through a dynamic non-monotonic mechanism, effectively suppressing excessive or harmful gradients generated by extreme samples. WIoUv3 focuses on medium-quality samples, enhancing the model's generalization ability and improving overall performance. Second, it proposes replacing the backbone C2f module in YOLOv8 with the lightweight adaptive partial convolution PCNV, reducing computation while improving spatial feature extraction capabilities. Then, it proposes replacing downsampling convolution with SAMA attention, which effectively identifies and highlights key features. An adaptive downsampling ADWN module is introduced, and through branch design, the final feature map can simultaneously contain original feature information and additional information obtained through different processing paths, enhancing the model's feature representation ability. Finally, a new P2 detection layer is added to enhance feature fusion, addressing the issues of multi-scale and low-resolution network features, thereby optimizing the overall efficiency of the model.

[0042] The implementation process of the present invention will be described below through specific embodiments:

[0043] In the field of UAV aerial photography, small targets are prevalent in target detection tasks. A well-designed loss function can significantly improve the detection performance of the model. WIoU v1 introduces distance as a metric for attention. When the target box and the predicted box overlap within a certain range, reducing the penalty for geometric metrics allows the model to achieve better generalization ability. The formulas for calculating WIoU v1 are shown in formulas (1)-(3):

[0044] L WIoUV1 =R WIoU ×L IoU (1)

[0045]

[0046] L IoU =1-IoU (3)

[0047] This invention uses WIoU v3 to evaluate anchor box quality by defining outlier β, and constructs a non-monotonic focusing factor γ based on β, which is applied to WIoU v1. A smaller β indicates higher anchor box quality, so assigning a smaller γ value reduces its weight in the loss function. Conversely, a larger β indicates lower anchor box quality, so assigning a smaller gradient gain reduces the adverse gradients they generate. By dynamically adjusting the loss weights of high-quality and low-quality anchor boxes, the model can focus on samples of average quality and improve performance. The formulas for WIoU v3 are shown in equations (4)-(6), where δ and α in equation (5) are adjustable hyperparameters used to adapt to different models.

[0048] L WIoUv3 =γ×LWIoUv1 (4)

[0049]

[0050] in, Monotonic focusing coefficient. WIoU v3 combines the advantages of EIoU

[29] and SioU

[30] . It evaluates the quality of the anchor box through a dynamic non-monotonic mechanism, making the model pay more attention to the medium-quality anchor box, thereby improving the accuracy of target localization. And by dynamically adjusting the loss weight of small targets, it enhances the model's ability to detect small targets. The meanings of the relevant symbols in formulas (1)-(6) are shown in Table 1:

[0051] Table 1. Explanation of Loss Function Symbols

[0052]

[0053] In the field of drone aerial photography, lightweight networks such as MobileNet

[31] , ShuffleNet

[32] and GhostNet

[33] use depthwise convolution or group convolution to extract features and reduce parameters. Although these models reduce FLOPs, they rarely consider FLOPs, and reducing parameters does not necessarily improve computational speed. For input features of size h×w×c, the FLOPs required by using regular convolution of size k×k are shown in Equation (7). In Equation (7), c represents the number of channels of the input data.

[0054] FLOPs Conv =h×w×k 2 ×c 2 (7)

[0055] The depthwise convolution kernel performs a sliding operation on the input channel space to derive the output channel features, and the FLOPs of the depthwise convolution are calculated as shown in Equation (8).

[0056] FLOPs DWConv =h×w×k 2 ×c (8)

[0057] Therefore, lightweight network blocks designed with depthwise or group convolutions sometimes fail to accelerate computation and may even increase latency. This invention uses adaptive partial convolution (PCNV) to replace the C2f modules in the backbone network. Figure 2 As shown, the PCNV module uses regular convolution to process selected continuous features in the input channels, while preserving other features through identity mapping, thus maintaining the number of channels unchanged. This method not only simplifies the computation process but also effectively reduces storage requirements, providing an efficient processing strategy for small object detection.

[0058] By analyzing the input features containing channel number cp The first continuous feature is convolved, and the formula for calculating the FLOP of PCNV is derived, as shown in formula (9):

[0059]

[0060] If the segmentation ratio r = 1 / 4, the FLOPs of PCNV are only 1 / 16 of those of a regular Conv. The memory access volume of PCNV is shown in formula (10):

[0061]

[0062] Since only c p Since channels are involved in feature extraction, other (c-cp) channels cannot be removed to avoid PCNV degenerating into a simple convolution with fewer channels, which would violate the original intention of reducing computational redundancy. For continuous or regular memory accesses, the first or last continuous channel is selected as the representative of the feature map for calculation. This reduces the number of memory accesses and parameters while ensuring the effective extraction of spatial information. The meanings of the relevant symbols in formulas (7)-(10) are shown in Table 2:

[0063] Table 2. Explanation of PCNV Convolution Symbols

[0064]

[0065] Many existing attention modules generate only 1D or 2D weights, which may lead to insufficient feature detection for small targets. This invention proposes a parameter-free self-attention mechanism, SAMA, which generates 3D attention weights by optimizing the energy function, thereby better focusing on key regions while maintaining computational efficiency and a lightweight model. An energy function solution that converges rapidly is defined and derived based on neuroscience principles. SAMA outperforms SE and CBAM attention modules in multiple scenarios, such as... Figure 3 As shown.

[0066] This invention identifies key neurons and defines an energy function, using binary labels and adding conventional terminology. Finally, the minimum energy can be calculated using formula (11):

[0067]

[0068] Where, μ t and The definition is shown in the following formula (12):

[0069]

[0070] Here, μ t Represents the average value of neurons. This represents their variance. The target neuron and other neurons in the input feature channels, x i The differences between them are related through an energy function. The total number of neurons M in a channel can be obtained by H×W. The importance of each neuron can be calculated. This value is measured and optimized through scaling operations. The entire optimization phase of the SAMA module is as follows:

[0071]

[0072] In formula (13), X represents the input feature. It is the output feature enhanced by sigmoid. E combines all channels and spatial dimensions. Grouping was performed, and a sigmoid function was added to limit excessive values ​​in E. An energy function was designed following spatial inhibition theory to evaluate the attention weights of neurons. An innovative attention module was constructed using this function, aiming to highlight key features while suppressing non-key information, thereby significantly improving the efficiency of feature extraction. The meanings of the relevant symbols in formulas (11)-(13) are shown in Table 3:

[0073] Table 3. Explanation of SAMA Attention Symbols

[0074]

[0075] In YOLOv8, traditional 3×3 convolutional layers are used for downsampling. While they can capture local features, they may lose some detailed information. This invention introduces the ADWN downsampling module, which adaptively adjusts the sampling rate. This not only reduces computational cost but also preserves more detailed information, thereby improving the accuracy of target detection in UAV aerial photography. Figure 4 As shown.

[0076] By performing multi-path processing on the input feature map X, the information loss caused by traditional single-path convolution is compensated. First, average pooling is performed on the input feature map X, and X' is obtained through step (14). This step helps to retain more global information while reducing the spatial dimension of the feature map.

[0077] X'=Avgpool2d(X) (14)

[0078] Average pooling is used to compress information by calculating the mean of adjacent elements, which can effectively reduce the loss of details. Next, the obtained feature map X' is divided into two sub-feature maps X1 and X2, as shown in step (15):

[0079] X' = ​​[X1, X2] (15)

[0080] Then, a convolution operation with a kernel size of 3, a stride of 2, and padding of 1 is applied to X1 to obtain X1' through step (16):

[0081] X1'=Conv(X1; k=3, s=2, p=1) (16)

[0082] This operation captures local features in X1 and downsamples them through a convolution with a stride of 2. For another sub-feature map X2, max pooling is first performed to obtain X2, pool through step (17). This step helps to preserve salient features in the image.

[0083] X2, pool=MaxPool2d(X2) (17)

[0084] Then, for X2 after max pooling, perform a 1×1 convolution operation on pool to obtain X2' through step (18):

[0085] X2'=Conv(X2, pool; k=1, s=1, p=0) (18)

[0086] Finally, the outputs X1' and X2' of the two paths are concatenated along the channel dimension in step (19) to obtain the final output feature map:

[0087] Output=Concat(X1',X2') (19)

[0088] By retaining multiple information through dual paths, the sampling rate of the feature map can be dynamically adjusted. Combined with pooling to capture global and local features, the quality of the feature map is improved, the target detection features are optimized, and richer and more accurate feature information is provided for subsequent target detection. The meanings of the relevant symbols in formulas (14)-(19) are shown in Table 4:

[0089] Table 4. Explanation of ADWN downsampling symbols

[0090] X, X1, X2, X1′, X2′ All are feature maps

[0091] Traditional YOLO models suffer from insufficient feature resolution and a limited receptive field due to the limited number of detection layers, making it difficult to capture features of small objects effectively. Therefore, this invention adds a P2 layer to the existing three detection scales. Assuming the original image size is F, the receptive field R can be calculated using the following formula:

[0092] R(F)=R(F-1)+(k-1)×s#(20)

[0093] R(F) is the receptive field of the Fth layer, R(F-1) is the receptive field of the previous layer, k is the kernel size, and s is the current stride. The feature map size of the P2 layer is 160×160. Assume that the kernel size and stride are the same (3×3 kernel, stride 2). According to the above formula, the receptive field of the first downsampling (from 640→320) is: R=1+(3-1)×2=5; the receptive field of the second downsampling (from 320→160) is: R=5+(3-1)×2=9. Therefore, the receptive field of the P2 layer is also a 9×9 region. The feature map of the P2 layer has a higher resolution and a smaller receptive field, so it can detect finer details in the same original image area, which is suitable for detecting small-scale targets. The meanings of the relevant symbols in formula (20) are shown in Table 5:

[0094] Table 5. Explanation of P2 detection layer symbols

[0095] F Feature map size R Feel the size of the field k, s kernel size and stride R(F) Represents the receptive field of layer F.

[0096] Experimental verification in practical applications:

[0097] The VisDrone2019 dataset is an important drone aerial photography dataset jointly collected and created by Tianjin University and the AISKYEYE data mining team. Covering 10 different target categories, the dataset was created using various drones to perform diverse tasks from multiple angles and in different scenarios, capturing rich information. This information encompasses the diversity of target categories (from simple to complex), the variability in the number of targets (from sparse to numerous), the wide distribution of targets (from sparse to dense), and images under different lighting conditions.

[0098] Figure 5(a)-(i) respectively represent: (a) sparse object distribution; (b) dense object distribution; (c) few objects; (d) many objects; (e) many object types; (f) very small objects; (g) morning; (h) evening; (i) night.

[0099] The hardware platform used in the experimental training phase is shown in Table 6.

[0100]

[0101] Table 7 shows some key parameter settings during model training.

[0102]

[0103] To verify the improvement effect of the improved model on detection performance, a comparative experiment was conducted between the improved model and the benchmark YOLO series. The YOLO algorithm family used in this invention is as follows: YOLOv3[7], which first used multi-scale detection, and its lightweight version YOLOv3-tiny; YOLOv4[8] uses the idea of ​​CSPNet

[40] to build a new backbone network structure, called CSPDarknet53. YOLOv5 uses Mosaic data augmentation and adopts a Focus structure. YOLOv7 uses the efficient network architecture ELAN

[10] . YOLOv9 introduces programmable gradient information and efficient aggregation network. YOLOv10 adopts the latest network, through NMS-free training and optimization architecture. YOLOv11 first introduces the Transformer backbone network, adopts dynamic head design, and uses dual label assignment. The results of the comparative experiment are shown in Table 8.

[0104] Table 8. Detection results of some YOLO series models and prediction models

[0105]

[0106] As shown in Table 8, the PAS-YOLO model (i.e., the improved YOLOv8 model) outperforms the YOLO series models in average detection accuracy, demonstrating the best overall performance.

[0107] This invention also compares the PAS-YOLO algorithm model with other mainstream models. Faster R-CNN[3] optimizes the high computational and structural complexity of R-CNN; Cascade R-CNN

[35] proposes a multi-level detection architecture based on R-CNN; RetinaNet

[34] proposes Focal loss; CenterNet

[36] proposes anchorless frame detection; FSAF

[37] algorithm solves the shortcomings of heuristic feature selection; ATSS

[38] proposes an adaptive training sample selection mechanism.

[0108] Table 9. Detection results of the classic model and the proposed model

[0109]

[0110] As can be seen from the comparative experimental results in Table 9, the PAS-YOLO model (i.e., the improved YOLOv8 model) has the best performance compared with other mainstream models.

[0111] To verify the effectiveness of each improvement strategy proposed in this invention, ablation experiments were conducted on the baseline model using the VisDrone2019 dataset. The experimental results are shown in Table 10.

[0112] Table 10. Detection results after introducing different improvement strategies

[0113]

[0114] The experimental results in Table 10 show that each improvement strategy improved detection performance to varying degrees when applied to the baseline model. Introducing PCNV convolution into the backbone to replace the C2f module reduced redundant computation, improved context awareness, and increased mAP50 by 0.9%. Replacing the neck convolution with SAMA attention increased mAP50 by 1.5%. Dynamically adjusting attention weights effectively reduced the false negative rate for small targets. Utilizing the efficient and fast ADWN module alleviated the computational and storage burden of feature fusion, reducing the model's parameters and thus increasing mAP50 by 1.0%. Adding the P2 detection layer allowed for sufficient fusion of shallow and deep information, increasing mAP50 by 2.9%. WIoU v3 was integrated into the regression loss of the predicted bounding box. By employing a more refined sample allocation strategy, WIoU v3 enhanced the model's localization accuracy, thus improving the mAP50 metric by 0.4%. The improved model further reduced the false negative rate for small targets, increasing the average detection accuracy by 6.7%. This demonstrates that the small target detection algorithm proposed in this invention effectively improves the model's detection performance.

[0115] To demonstrate the scalability of this algorithm, a comparative experiment was conducted on the remote sensing dataset RSOD. The experimental results are shown in Table 11.

[0116] Table 11. Detection results of the classical model and the model of this invention.

[0117]

[0118] Based on the comparative experimental results in Table 11, the algorithm proposed in this invention improves mAP0.5 by 2.3% on the RSOD dataset, proving that the algorithm is scalable and suitable for small target detection scenarios.

[0119] To visualize and facilitate the visualization of the model's detection performance, a comparative experiment was conducted to analyze the model's detection performance from three aspects: graphs, heatmaps, and model inference results.

[0120] First, Figure 6 shows the curves of some important evaluation metrics of the PAS-YOLO model (i.e., the improved YOLOv8 model), YOLOv8, and YOLOv5 during the training process.

[0121] As shown in Figure 6, the improved model achieves the best results in three detection metrics: precision, recall, and mAP 0.5. Compared with YOLOv5 and YOLOv8s, this method has a faster training speed and better detection performance.

[0122] Secondly, gradient-weighted class activation mapping (Grad-CAM

[39] ) was used to generate heatmaps for YOLOv8 and PAS-YOLO models (i.e., improved YOLOv8 models). Experimental results are as follows... Figure 7 As shown, it can be inferred that YOLOv8s has shortcomings in focusing on small objects and is not sensitive enough to identify distant objects. In contrast, the model proposed in this invention performs better in suppressing background noise and pays more attention to small objects. Furthermore, the model's attention is more focused on the central region of the object, which helps improve the accuracy of bounding box prediction, thereby improving the overall detection performance of the model.

[0123] Finally, inference experiments were conducted using three algorithm models: PAS-YOLO (i.e., the improved YOLOv8 model), YOLOv8s, and YOLOv5s. This invention selected three scenarios—urban roads, public facilities, and market intersections—as experimental data to intuitively verify the detection effectiveness of the improved method. The detection results of the three models are as follows: Figure 8 As shown.

[0124] Figure 8 These are the inference results for YOLOv5, YOLOv8s, and the PAS-YOLO model (i.e., the improved YOLOv8 model). Compared to YOLOv5s and YOLOv8s, the method proposed in this invention has the best detection accuracy for objects at the far end of the field of view, while improving the model's leakage detection rate for occlusion and dense targets, effectively improving detection performance.

[0125] This invention proposes a PAS-YOLO object detection algorithm model (i.e., an improved YOLOv8 model), specifically designed for small object detection, capable of handling challenges such as varying object size, occlusion, and unstable lighting. First, the WIoU v3 loss function is introduced, and a dynamic sample allocation strategy effectively reduces the model's focus on extreme samples, improving overall performance. Second, addressing the computational redundancy and information loss issues in small object detection in aerial images, a lightweight adaptive partial convolutional network (PCNV) is integrated into the YOLOv8 backbone network, replacing the C2f module to reduce computational redundancy and enhance context awareness, thus minimizing information loss. Furthermore, in the model's neck structure, non-parametric self-attention (SAMA) replaces downsampling convolutions to highlight key features and suppress secondary information, enhancing feature extraction capabilities. An adaptive downsampling (ADWN) module is introduced, enabling the model to adaptively adjust the sampling rate, reducing computational burden while preserving key information. Finally, the addition of a P2 detection layer enhances the network's multi-scale feature fusion capability, improving the performance of small object detection. Experiments were conducted on the VisDrone and RSOD datasets, including ablation experiments, comparative experiments, and scalability experiments, validating the effectiveness of the proposed method from multiple perspectives. Experimental results show that, compared to the baseline model, the proposed method improves mAP performance by 6.7% and 2.3% on the VisDrone and RSOD datasets, respectively. Overall, the proposed method is suitable for deployment in complex environments, demonstrating good versatility and robustness. Future research will focus on leveraging unsupervised learning theory to reduce the distributional differences between public and self-built datasets, thereby reducing the dependence of deep learning on labeled data.

[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.

[0127] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for detecting small targets in UAV aerial photography based on an improved YOLOv8, characterized in that, Includes the following steps: The drone aerial image data is preprocessed to generate standardized input data adapted to the YOLOv8 model; The standardized input data is then input into the improved YOLOv8 model, and the improvement includes the following features: We use WIoU v3 as the loss function for bounding box regression and optimize gradient gain allocation through a dynamic non-monotonic mechanism to suppress excessive or harmful gradients generated by extreme samples. A lightweight adaptive partial convolution module is integrated into the YOLOv8 model's backbone to replace the C2f module in the backbone, thereby reducing computational cost and improving the ability to extract spatial features. In the improved YOLOv8 model, a new P2 detection layer is added to the Neck part while retaining the P5 detection branch. The P2 detection layer performs bilinear interpolation upsampling on the low-level feature map and performs point-by-point weighted fusion with the high-level feature map. The fusion result is then processed by a set of convolution operations to generate a high-resolution feature map. In the Neck section, parameterless self-attention modules are set at scales P2, P3, P4 and P5 respectively. The parameterless self-attention modules calculate the energy distribution of the surrounding area for each location point of the current scale feature map, generate a three-dimensional attention weight matrix for weighting, and recalibrate the current scale feature map by multiplying pixel by pixel. The recalibrated feature maps at scales P2, P3, and P4 are input into the corresponding adaptive downsampling modules. The outputs of each adaptive downsampling module are concatenated with the feature maps with the same spatial resolution in the top-to-bottom feature transfer path of the Neck section, and then processed by the C2f module to form feature maps at scales P3, P4, and P5 in sequence. The recalibrated P2, P3, P4 and P5 scale feature maps are input into the corresponding detection heads respectively; Multi-object detection is performed based on the improved YOLOv8 model, and the detection results of object category and bounding box position are output.

2. The method according to claim 1, characterized in that, The image data preprocessing steps include the following specific operations: normalizing the UAV aerial image data and scaling the pixel values ​​to between zero and one to reduce the differences in the distribution of input data; randomly cropping the image to generate different sizes of field of view; performing directional enhancement on the image by horizontal flipping; and generating standardized input data adapted to the YOLOv8 model.

3. The method according to claim 1, characterized in that, The WIoU v3 loss function optimizes the gradient gain for medium-quality samples by calculating the weighted intersection-union ratio between the predicted box and the target box during bounding box regression, and by combining the distance quantization of center point offset and width-height difference.

4. The method according to claim 1, characterized in that, The lightweight adaptive partial convolution module divides the input feature map into multiple continuous channel groups, selects some channels for regular convolution operations according to a set ratio, and outputs the unselected channels through direct mapping.

5. The method according to claim 4, characterized in that, The regular convolution operation uses a 3x3 convolution kernel and a unit stride to ensure that the spatial resolution of the feature map remains consistent before and after convolution.

6. The method according to claim 1, characterized in that, The adaptive downsampling module performs an average pooling operation on the input feature map to obtain a pooled feature map, and divides the pooled feature map into a first sub-feature map and a second sub-feature map; Perform a convolution operation with a kernel size of 3, a stride of 2, and padding of 1 on the first sub-feature map to obtain the first path output feature map; Max pooling is performed on the second sub-feature map, and a convolution operation with kernel size 1, stride 1, and padding 0 is performed on the max pooled feature map to obtain the second path output feature map. The first path output feature map and the second path output feature map are concatenated along the channel dimension to obtain the output feature map of the adaptive downsampling module.

7. The method according to claim 1, characterized in that, The feature fusion of the P2 detection layer combines spatial detail information from low-level feature maps and semantic information from high-level feature maps using a weighted averaging strategy, enabling the model to effectively detect targets at different scales.

8. The method according to claim 1, characterized in that, The multi-target detection results are weighted by the intersection-union ratio of the category prediction score and the bounding box position prediction of each target to generate a comprehensive confidence score, and the final detection results are filtered by setting a confidence threshold.