An unmanned aerial vehicle aerial image target detection method and system based on improved YOLOv8s

By introducing the multi-scale feature extraction module COFM and the bidirectional feature fusion network DiFPN into the YOLOv8s model, the problem of insufficient accuracy of small target detection in UAV aerial images by the YOLOv8 model is solved, and efficient and accurate target detection is achieved.

CN122135252APending Publication Date: 2026-06-02GUILIN UNIVERSITY OF TECHNOLOGY

Patent Information

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

AI Technical Summary

Technical Problem

The existing YOLOv8 model is not efficient enough in feature fusion when detecting small targets in drone aerial images. It cannot make full use of the positional information of shallow features and the semantic information of deep features, resulting in detection accuracy that is difficult to meet the needs of practical applications.

Method used

The multi-scale feature extraction module COFM and the bidirectional feature fusion network DiFPN are adopted. Global features are extracted by 7x7 depthwise separable convolution and local features are extracted by 3x3 depthwise separable convolution. Combined with the residual connection structure, a multi-scale feature pyramid is formed to enhance the feature fusion efficiency. The bidirectional fusion of features at different scales is realized by the BiConcat module.

Benefits of technology

It significantly improves the detection accuracy of small targets, reduces missed detections and false detections, ensures the real-time detection performance of the model, and is suitable for real-time detection scenarios of UAV aerial images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135252A_ABST
    Figure CN122135252A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on improved YOLOv8s unmanned aerial vehicle aerial image target detection method and system, method includes following steps: S1, unmanned aerial vehicle aerial image dataset is preprocessed;S2, construct unmanned aerial vehicle aerial image target detection model based on multiscale feature extraction;S3, training set is input into the target detection model and is trained, and unmanned aerial vehicle aerial image detection model is obtained;S4, test set is input into the target detection model and is tested, and model detection result and and model performance performance evaluation result are obtained;S5, unmanned aerial vehicle aerial image target detection model is loaded to unmanned aerial vehicle image detection system, and real-time detection and detection result are saved;The application can improve the detection precision of target (especially small target) in unmanned aerial vehicle aerial image, while guaranteeing detection real-time, realize the efficient, accurate detection of unmanned aerial vehicle aerial image target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology in UAV aerial imagery, specifically to a method and system for target detection in UAV aerial imagery based on an improved YOLOv8s. Background Technology

[0002] Drone technology was initially applied in the military field, primarily for reconnaissance and surveillance missions. With continuous technological advancements, drone-based image target detection has been gradually extended to various civilian scenarios such as agricultural monitoring, disaster emergency response, and urban management, playing an increasingly important role. However, drone aerial images typically feature wide fields of view, small target scales, and complex backgrounds, presenting unique technical challenges for target detection. Traditional detection algorithms often struggle to achieve a good balance between detection accuracy and real-time performance when processing such images, particularly in the identification of small targets, failing to meet the needs of practical applications.

[0003] Small target detection is a challenge in drone aerial image target detection. Due to the small scale of the target itself, the resolution of the corresponding image region is extremely limited, and the environmental semantic information available for model learning is also relatively scarce. Furthermore, small targets are often difficult to distinguish from the background, especially in complex scenes where details such as target texture and shape are hard to capture, making it difficult for detectors to accurately separate them from the background or other objects, easily leading to missed or false detections. To address these issues, recent research has gradually shifted towards utilizing multi-scale feature representation to improve the detection accuracy of small targets. By extracting features from images at multiple scale levels, models can effectively preserve and enhance the fine-grained information contained in small targets, thereby improving their recognizability in complex scenes. Current mainstream multi-scale modeling methods include pyramid pooling structures, multi-scale convolution operators, and cross-layer feature fusion strategies, which improve the model's adaptability and representation robustness to varying degrees.

[0004] Existing YOLO models, especially the relatively mature YOLOv8, have made significant progress in detection speed and accuracy. However, YOLOv8 still has some shortcomings when facing small target detection tasks in UAV images. On the one hand, its feature fusion method is not efficient enough, failing to fully utilize the positional information of shallow features and the semantic information of deep features. This results in detection accuracy that is difficult to meet the needs of practical applications in complex scenes with a large number of small targets. Summary of the Invention

[0005] To address the above problems, this invention provides a target detection method and system for UAV aerial images based on an improved YOLOv8s, aiming to improve the detection accuracy of targets (especially small targets) in UAV aerial images while ensuring real-time detection, thereby achieving efficient and accurate target detection in UAV aerial images.

[0006] To achieve the objectives of this invention, the following technical solution is provided:

[0007] A target detection method for UAV aerial images based on an improved YOLOv8s includes the following steps:

[0008] S1. Preprocess the drone aerial image dataset, including converting the format of the annotation files and removing incorrect category labels, and dividing the dataset into training set, validation set and test set;

[0009] S2. Construct a drone aerial image target detection model based on multi-scale feature extraction. The target detection model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head for outputting the drone image category and location. The backbone network is composed of multiple C2f modules and a multi-scale feature extraction module COFM connected in series. The neck network is a bidirectional feature fusion network DiFPN, which includes an added small target detection head. The model construction process is as follows: the backbone network extracts feature maps from the drone aerial image, inputs them into the bidirectional feature fusion network DiFPN for fusion, generates a fused feature output map, and finally inputs it into the head for target localization and classification.

[0010] S3. Input the training set into the target detection model for training to obtain the target detection model for UAV aerial images;

[0011] S4. Input the test set into the target detection model for testing, and obtain the model detection results and the performance evaluation results of the model performance.

[0012] S5. Load the target detection model of the UAV aerial image into the UAV image detection system for real-time detection and save the detection results.

[0013] Preferably, the data processing steps of the multi-scale feature extraction module (COFM) include:

[0014] F1=FC(DWconv 7x7 (FC(LN(F in )))

[0015] F2=FC(BN(DWconv 3x3 (Fin )))

[0016] F out = F1+F2

[0017] Where F in It is the input feature map, F1 represents the output of the large convolution branch, DWconv 7x7 This indicates a depthwise separable convolution with a kernel size of 7. FC represents a fully connected convolutional layer, LN is a layer normalization layer, F2 represents the output of a small convolutional branch, BN is a batch normalization layer, and DWconv represents a depthwise separable convolutional layer. 3x3 This indicates a depthwise separable convolution with a kernel size of 3;

[0018] Preferably, the bidirectional feature fusion network DiFPN consists of 3 upsample modules, 6 BiConcat modules, 6 C2f modules, and 3 Conv modules, forming a new feature pyramid. Step S2 specifically includes:

[0019] S21. Add a small target detection head to the bidirectional feature fusion network DiFPN. The detection size of the small target detection head is 160x160. The improved bidirectional feature fusion network DiFPN can output feature maps of four different scales.

[0020] S22. In the feature fusion stage, the Neck network takes the feature maps C1, C2, C3, and C4 extracted from the backbone network as input, passes them through the bidirectional fusion structure DiFPN, and outputs features labeled with P. The feature maps output to the detection head are P1, P2, P3, and P4. The steps of the feature fusion stage include:

[0021] S221, Fusion Stage 1 yields an output feature map P1 of size 160x160:

[0022] P1 = BiConcat(C1,Unpsample8x(C4),Unpsample4x(C3),Unpsample2x(C2))

[0023] S222, Fusion Stage 2 yields an 80x80 size output feature map P2:

[0024] P2 =BiConcat(Downsample2x(C1),C2,Unpsample2x(C3),Unpsample4x(C4))

[0025] S223, Fusion Stage 3 yields a 40x40 output feature map P3:

[0026] P3 = BiConcat(Downsample4x(C1),Downsample2x(C2),C3,Unpsample2x(C4))

[0027] S224, Fusion Stage 4 yields a 20x20 output feature map P4:

[0028] P4 =BiConcat(Downsample8x(C1),Downsample4x(C2),Downsample2x(C3),C4)

[0029] BiConcat is a concatenation operation that introduces a learnable weight to each input feature, and then performs a weighted combination of these features. Upsampling... 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 4× This indicates a 4x upsampling, or Downsample. 4× Indicates a 4x downsampling, Upsample 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 8× This indicates an 8x upsampling, or downsampling. 8× This indicates an eight-fold downsampling.

[0030] BiConcat adds a learnable weight to each input feature map and uses fast normalization fusion, the calculation formula of which is shown below:

[0031]

[0032] in, These are learnable weights. These are feature maps from different scales. This is the output feature map. BiConcat allows the network to automatically adjust weights during training and dynamically fuse features from different layers according to task requirements.

[0033] Preferably, in step S3, the training set is input into the target detection model, and the target detection model is trained iteratively for 200 rounds by an optimizer until the target detection model converges to obtain the optimal target detection model.

[0034] Preferably, in step S4, the performance evaluation metrics are precision P, recall R, mean precision AP, mean AP value mAP, and the small target detection rating metric APs from the COCO evaluation metrics.

[0035] Preferably, step S5 includes:

[0036] S51. Configure the drone image detection system, configure and load the detection camera, and determine whether the camera has been successfully loaded.

[0037] S52. Input the target detection model into the UAV image detection system, and use the loading module to determine whether the model has been successfully loaded.

[0038] S53. Input the images, videos, or real-time detection scene settings to be detected into the UAV image detection system.

[0039] S54. Save the detection results of the UAV image detection system.

[0040] This invention also provides a target detection system for UAV aerial images based on an improved YOLOv8s, the system comprising a dataset preprocessing module, a target detection model construction module, a model training module, a model testing module, and a real-time detection module.

[0041] The dataset preprocessing module is used to preprocess the drone aerial image dataset;

[0042] The target detection model construction module is used to construct a target detection model for UAV aerial images based on multi-scale feature extraction.

[0043] The model training module is used to input the training set into the target detection model for training, so as to obtain the target detection model of the UAV aerial image.

[0044] The model testing module is used to input the test set into the target detection model for testing, and obtain the model detection results and performance evaluation results.

[0045] The real-time detection module is used to load the drone aerial image detection model configuration, perform real-time detection, and save the detection results.

[0046] Preferably, the real-time detection module includes a camera configuration unit, a model loading unit, a data source input unit, and a result storage unit;

[0047] The camera configuration unit is used to set up, load, and determine the loading status of the detection camera;

[0048] The model loading unit is used to load the UAV aerial image detection model and determine the model loading status;

[0049] The data source input unit is used to receive images, videos, or real-time detection scene settings that need to be detected;

[0050] The result storage unit is used to store the system's detection results.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. Based on the YOLOv8s model, this invention proposes a multi-scale feature extraction module (COFM). It extracts global features through 7x7 depthwise separable convolution and local features through 3x3 depthwise separable convolution. The two types of features are superimposed by a residual connection structure, which effectively preserves the fine-grained information of small targets in UAV aerial images, avoids excessive loss of small target information during feature downsampling, and significantly improves the detection accuracy of small targets.

[0053] 2. This invention proposes a bidirectional feature fusion network, DiFPN, which forms a four-scale detection structure by adding a small target detection head (160x160). Combined with the improved BiConcat module, it realizes bidirectional fusion of features at different scales, establishes a direct connection between shallow positional information and deep semantic information, improves feature fusion efficiency, and further enhances the model's ability to detect multi-scale targets.

[0054] 3. This invention achieves a good balance between convergence speed and detection accuracy by reasonably setting the model training hyperparameters and using the SGD optimizer for 200 rounds of iterative training, while ensuring the model's real-time detection performance. It is suitable for real-time detection scenarios of UAV aerial images.

[0055] 4. The UAV image detection system designed in this invention supports detection of static images, videos, and real-time cameras. It has a reasonable interface layout and is easy to operate. It can effectively deploy the improved model, realize the real-time display and storage of detection results, and enhance the practical application value of the technology.

[0056] 5. Experimental results show that the method of this invention outperforms the baseline YOLOv8 model on the VisDrone2019 public dataset. Specifically, mAP0.5, mAP0.5:0.95, precision, and recall are improved by 3.4%, 2.1%, 1.6%, and 2.7%, respectively, and the small object detection metric APs are improved by 3.5%. This effectively reduces false negatives and false positives, demonstrating the effectiveness and superiority of the method of this invention. Attached Figure Description

[0057] Figure 1 This is a flowchart illustrating a target detection method for UAV aerial images based on multi-scale feature information extraction, according to an embodiment of the present invention.

[0058] Figure 2 A structural diagram of the COFM module constructed according to an embodiment of the present invention;

[0059] Figure 3 This is a structural diagram of a drone aerial image target detection method based on multi-scale feature information extraction, according to an embodiment of the present invention.

[0060] Figure 4 A visual comparison of the improvements before and after the present invention on the VisDrone dataset.

[0061] Figure 5 A flowchart of an unmanned aerial vehicle (UAV) image detection system designed for an embodiment of the present invention.

[0062] Figure 6 A schematic diagram of the interface of the UAV image detection system designed for an embodiment of the present invention.

[0063] Figure 7 This is a schematic diagram of the detection process of the UAV image detection system designed for an embodiment of the present invention. Detailed Implementation

[0064] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings:

[0065] like Figures 1-7 This invention provides a target detection method for UAV aerial images based on an improved YOLOv8s, comprising the following steps:

[0066] S1. Preprocess the drone aerial image dataset.

[0067] This embodiment of the invention uses the VisDrone2019 dataset, a public dataset containing 8629 aerial images taken from the perspective of a drone. Preprocessing includes format conversion of the labeled files and removal of incorrect category labels. The dataset is then divided into training, validation, and test sets proportionally, with 6470 images in the training set, 548 in the validation set, and 1610 in the test set. The dataset covers 10 categories, including bicycles, sunshade tricycles, tricycles, pedestrians, people, cars, vans, buses, trucks, and motorcycles.

[0068] S2. Construct a target detection model for UAV aerial images based on multi-scale feature extraction. The target detection model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head for outputting the UAV image category and location. The backbone network is composed of multiple C2f modules and a multi-scale feature extraction module COFM, used to extract multi-scale features from the UAV aerial images. The neck network is a bidirectional feature fusion network DiFPN, which includes an added small target detection head. The model construction process is as follows: the backbone network extracts feature maps from the UAV aerial images, inputs them into the bidirectional feature fusion network DiFPN for fusion, generates a fused feature output map, and finally inputs it into the head for target localization and classification.

[0069] Backbone network construction

[0070] First, this invention proposes a multi-scale feature extraction module (COFM). This module obtains feature maps with different receptive fields through convolutional branches of varying sizes, and then uses an ADD structure to superimpose feature maps of different scales, avoiding excessive loss of small target information in UAV images during downsampling. Second, a bidirectional feature fusion network (DiFPN) performs bidirectional feature fusion between shallow and deep feature maps, improving the efficiency of feature fusion while fully preserving target feature information at different scales. Finally, the fused feature map is sent to a detection head for detection to obtain the final detection result.

[0071] Specifically: The COFM module uses a 7x7 convolution as the main branch to expand the receptive field to obtain global features and a 3x3 convolution as the secondary branch to obtain local features. Finally, the ADD module superimposes the local and global features to obtain an output feature map with different receptive fields, thus realizing multi-scale feature information extraction from UAV aerial images. The calculation formula of the main branch is as follows:

[0072] F1=FC(DWconv 7x7 (FC(LN(F in )))

[0073] Among them, F in It is the input feature map, F1 represents the output of the large convolution branch, DWconv 7x7 This indicates a depthwise separable convolution with a kernel size of 7. FC represents a fully connected convolutional layer, and LN is a layer normalization layer. The sub-branch extracts local features of the image, calculated using the following formula:

[0074] F2=FC(BN(DWconv 3x3 (F in )))

[0075] F2 represents the output of the small convolutional branch, BN is the batch normalization layer, and DWconv is the output of the convolutional branch. 3x3 This indicates a depthwise separable convolution with a kernel size of 3. Finally, the global features extracted by the main branch and the local features extracted by the sub-branch are subjected to an ADD operation, and the feature maps from different receptive fields are superimposed to obtain a multi-scale output feature map. The calculation formula is shown below:

[0076] F out = F1+F2

[0077] Among them, F out This represents the feature map output by the COFM module. This module can effectively extract small target features from drone aerial images, avoiding excessive loss of small target information during feature downsampling.

[0078] Bidirectional feature fusion network construction

[0079] The Bidirectional Feature Fusion Network (DiFPN) consists of 3 upsample modules, 6 BiConcat modules, 6 C2f modules, and 3 Conv modules, forming a new feature pyramid. It also incorporates a 160x160 small target detection head, enabling DiFPN to output four different sized detection heads (160x160, 80x80, 40x40, and 20x20) corresponding to target detection at different scales. DiFPN can bidirectionally fuse shallow feature maps rich in target location information and deep feature maps rich in semantic information, establishing a connection between the shallowest and deepest feature maps.

[0080] In the feature fusion stage, the feature maps C1, C2, C3, and C4 extracted from the backbone network are used as input and passed through the bidirectional fusion network DiFPN. The output features are labeled with P, and the feature maps output to the detection head are P1, P2, P3, and P4. The steps of the feature fusion stage include:

[0081] The fusion stage 1 yields an output feature map P1 of size 160x160:

[0082] P1 = BiConcat(C1,Unpsample 8x (C4), Unpsample 4x (C3), Unpsample 2x (C2));

[0083] The fusion stage 2 yields an output feature map P2 of size 80x80:

[0084] P2 = BiConcat(Downsample) 2x (C1), C2, Unpsample 2x (C3), Unpsample 4x (C4));

[0085] Fusion stage 3 yields a 40x40 output feature map P3:

[0086] P3 = BiConcat(Downsample) 4x (C1), Downsample 2x (C2), C3, Unpsample 2x (C4));

[0087] Fusion stage 4 yields a 20x20 output feature map P4:

[0088] P4 = BiConcat(Downsample) 8x (C1), Downsample 4x (C2), Downsample 2x (C3), (C4);

[0089] Where BiConcat is the concatenation operation, and Upsample is the upsample operation. 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 4× This indicates a 4x upsampling, or Downsample. 4× Indicates a 4x downsampling, Upsample 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 8× This indicates an 8x upsampling, or downsampling. 8× This indicates an eight-fold downsampling.

[0090] BiConcat is an improved concat module. BiConcat adds a learnable weight to each input feature map and uses fast normalization fusion. Its calculation formula is shown below:

[0091]

[0092] in, These are learnable weights. These are feature maps from different scales. This is the output feature map. BiConcat allows the network to automatically adjust weights during training and dynamically fuse features from different layers according to task requirements. By fusing multi-scale feature maps rich in different feature information using a bidirectional fusion method, the feature information of small targets in UAV images can be preserved to the greatest extent.

[0093] S3. Input the training set into the target detection model for training to obtain a drone aerial image target detection model; S31. Input the training set into the target detection model and perform 200 rounds of iterative training on the target detection model through an optimizer until the target detection model converges to obtain the optimal target detection model. In this embodiment, the YOLOv8s model size is used as a training example, and its hyperparameters are set as follows: the initial learning rate in the SGD optimizer is set to 0.01, the batch_size is set to 4, the number of iterations is 200, and the IOU threshold is 0.5. The optimal weight parameter model is obtained through multiple rounds of iterative training as the target detection model.

[0094] S4. Input the test set into the target detection model for testing, obtain the model detection results, and evaluate the performance of the target detection model after testing. The performance evaluation metrics are precision (P), recall (R), mean precision (AP), mean AP value (mAP), and the small target detection rating metric (APs) in the COCO evaluation metrics.

[0095] S5. Load the target detection model into the UAV image detection system for real-time detection and save the detection results; Step S5 specifically includes:

[0096] S51. Configure the drone image detection system, configure and load the detection camera, and determine whether the camera has been successfully loaded.

[0097] S52. Input the target detection model into the UAV image detection system, and use the loading module to determine whether the model has been successfully loaded.

[0098] S53. Input the images, videos, or real-time detection scene settings to be detected into the UAV image detection system.

[0099] S54. Save the detection results of the UAV image detection system.

[0100] This invention also provides a target detection system for UAV aerial images based on an improved YOLOv8s, the system comprising a dataset preprocessing module, a target detection model construction module, a model training module, a model testing module, and a real-time detection module.

[0101] The dataset preprocessing module is used to preprocess drone aerial image datasets;

[0102] The target detection model building module is used to build a target detection model for UAV aerial images based on multi-scale feature extraction.

[0103] The model training module is used to input the training set into the target detection model for training, so as to obtain the target detection model of the UAV aerial image.

[0104] The model testing module is used to input the test set into the target detection model for testing, and obtain the model detection results and performance evaluation results.

[0105] The real-time detection module is used to load the target detection model configuration, perform real-time detection, and save the detection results.

[0106] The real-time detection module includes a camera configuration unit, a model loading unit, a data source input unit, and a result saving unit; the camera configuration unit is used to set up, load, and determine the loading status of the detection camera.

[0107] The model loading unit is used to load the target detection model and determine the model loading status; the data source input unit is used to receive the images, videos or real-time detection scene settings to be detected; and the result saving unit is used to save the system's detection results.

[0108] When using this system platform, the system first initializes the detection camera, configuring and connecting the image acquisition device. Next, it loads the detection model. If loading fails, the system displays "Loading failed" and terminates the process to ensure the reliability of subsequent operations. If loading is successful, the system proceeds to the data source selection stage, where the user can choose between a real-time video stream or a local image file as input. After selecting a data source, the system invokes the detection model to infer the input data, identify and locate the target, and generate detection results containing category, confidence level, and bounding box information. Finally, the user sets the save path, and the system stores the detection results in the specified location, ending the process. Figure 6The system platform interface of the UAV image detection platform is showcased, employing a modular layout to enhance ease of operation. The interface is primarily divided into two areas: a real-time video display area and a control panel on the right. The real-time video display area shows the video stream captured by the camera or loaded from files, and draws target bounding boxes and labels in real time during detection. The control panel integrates input source selection, model parameter configuration, detection control, and real-time statistics functions. The input source section supports three modes: camera, image file, and video file. Users can select the camera device via a drop-down menu or load local files via the browse button. The model parameter module allows users to specify pre-trained model files and adjust the confidence threshold, IOU threshold, and input image size to adapt to different detection scenarios. The detection control buttons provide "Start Detection" and "Stop Detection" functions, facilitating real-time start and stop of the inference process. The bottom of the interface displays the current frame rate and the number of detected targets in real time, providing users with intuitive performance feedback. Figure 7 The system platform for drone image detection demonstrates the interface of the platform using a camera for real-time detection. The camera captures and detects images in real time, and the right sidebar displays the current detection FPS and the number of detected categories, facilitating real-time monitoring for users.

[0109] To verify the effectiveness of the present invention, the following experiment was conducted:

[0110] Experiments were conducted on the VisDrone dataset, including ablation experiments, to verify the effectiveness of each module. The model was trained for 200 iterations. To validate the effectiveness of the proposed algorithm, mAP, precision (P), recall (R), and APs from the COCO evaluation metric were used to evaluate the performance of multi-scale targets. APs is the detection rating metric for small targets in the COCO evaluation metric. The ablation experiment results are shown in Table 1. The data in Table 1 show that, compared with the baseline YOLOv8, the proposed method improves mAP by 3.4%, mAP0.5-0.95, precision by 2.1%, and recall by 1.6% and 2.7%, respectively, validating the effectiveness of the proposed modules. Furthermore, compared with the original model, the improved model improves APs by 3.5%, demonstrating that the algorithm improves the accuracy of small target detection. Overall, the target detection method proposed in this invention has better multi-scale target detection capabilities and is more suitable for UAV aerial images with large scale variations.

[0111] Table 1. Ablation experimental results of the proposed method on the VisDrone dataset.

[0112]

[0113] like Figure 4The diagram shows the detection visualization results of the baseline model and the model of the present invention. (a1)-(c1) are the detection results of the baseline model, and (a2)-(c2) are the detection results of the model of the present invention. The visualization results show that the model of the present invention has a higher detection accuracy than the baseline model in complex environments, and also reduces the number of missed detections and false detections.

Claims

1. A target detection method for UAV aerial images based on an improved YOLOv8s, characterized in that, Includes the following steps: S1. Preprocess the drone aerial image dataset, including converting the format of the annotation files and removing incorrect category labels, and dividing the dataset into training set, validation set and test set; S2. Construct a target detection model for UAV aerial images based on multi-scale feature extraction. The target detection model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head for outputting the UAV image category and location. The backbone network is composed of multiple C2f modules and a multi-scale feature extraction module COFM connected in series. The neck network is a bidirectional feature fusion network DiFPN, which includes an added small target detection head. The model construction process is as follows: the backbone network extracts feature maps from the UAV aerial images, inputs them into the bidirectional feature fusion network DiFPN for fusion, generates a fused feature output map, and finally inputs it into the head for target localization and classification. S3. Input the training set into the target detection model for training to obtain the target detection model for UAV aerial images; S4. Input the test set into the target detection model for testing, and obtain the model detection results and the performance evaluation results of the model performance. S5. Load the target detection model from the UAV aerial image into the UAV image detection system for real-time detection and save the detection results.

2. The target detection method for UAV aerial images based on improved YOLOv8s as described in claim 1, characterized in that, In step S2, the data processing steps of the multi-scale feature extraction module COFM include: F1=FC(DWconv 7x7 (FC(LN(F in ))) F2=FC(BN(DWconv 3x3 (F in )))) F out = F1+F2 Among them, F in It is the input feature map, F1 represents the output of the large convolution branch, DWconv 7x7 This indicates a depthwise separable convolution with a kernel size of 7. FC represents a fully connected convolutional layer, LN is a layer normalization layer, F2 represents the output of a small convolutional branch, BN is a batch normalization layer, and DWconv represents a depthwise separable convolutional layer. 3x3 This indicates a depthwise separable convolution with a kernel size of 3, F out This is the feature map that is finally output by the COFM module.

3. The target detection method for UAV aerial images based on improved YOLOv8s as described in claim 1, characterized in that, The bidirectional feature fusion network DiFPN consists of 3 upsample modules, 6 BiConcat modules, 6 C2f modules, and 3 Conv modules, forming a new feature pyramid. Step S2 specifically includes: S21. Add a small target detection head to the bidirectional feature fusion network DiFPN. The detection size of the small target detection head is 160x160. The improved bidirectional feature fusion network DiFPN can output feature maps of four different scales. S22. In the feature fusion stage, the neck network takes the feature maps C1, C2, C3, and C4 extracted from the backbone network as input, and performs bidirectional fusion through the bidirectional feature fusion network DiFPN. The output features are labeled with P, and the feature maps output to the detection head are P1, P2, P3, and P4. The steps of the feature fusion stage include: S221, Fusion Stage 1 yields an output feature map P1 of size 160x160: P1 = BiConcat(C1,Unpsample 8x (C4),Unpsample 4x (C3),Unpsample 2x (C2)) S222, Fusion Stage 2 yields an 80x80 size output feature map P2: P2 =BiConcat(Downsample2x(C1),C2,Unpsample2x(C3),Unpsample4x(C4)) S223, Fusion Stage 3 yields a 40x40 output feature map P3: P3 = BiConcat(Downsample 4x (C1),Downsample 2x (C2),C3,Unpsample 2x (C4)) S224, Fusion Stage 4 yields a 20x20 output feature map P4: P4=BiConcat(Downsample 8x (C1),Downsample 4x (C2),Downsample 2x (C3),C4) BiConcat is an improved concatenation module that introduces a learnable weight for each input feature and then performs a weighted combination of these features, upsampling. 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 4× This indicates a 4x upsampling, or Downsample. 4× Indicates a 4x downsampling, Upsample 2× Indicates double upsampling, Downsample 2× Upsample indicates double downsampling. 8× This indicates an 8x upsampling, or downsampling. 8× This indicates an eight-fold downsampling.

4. The target detection method for UAV aerial images based on improved YOLOv8s as described in claim 1, characterized in that, In step S3, the training set is input into the target detection model, and the target detection model is trained iteratively for 200 rounds by an optimizer until the target detection model converges to obtain the optimal target detection model.

5. The target detection method for UAV aerial images based on improved YOLOv8s according to claim 1, characterized in that, In step S4, the performance evaluation metrics include precision P, recall R, average precision AP, average AP value mAP, and the small target detection rating metric APs from the COCO evaluation metrics.

6. The target detection method for UAV aerial images based on improved YOLOv8s as described in claim 1, characterized in that, Step S5 includes: S51. Configure the UAV image detection system, configure and load the detection camera, and determine whether the camera has been successfully loaded. S52. Input the target detection model into the UAV image detection system, and use the loading module to determine whether the model has been successfully loaded. S53. Input the images, videos, or real-time detection scene settings to be detected into the UAV image detection system; S54. Save the detection results of the UAV image detection system.

7. A target detection system for UAV aerial images based on an improved YOLOv8s, characterized in that, The system includes a dataset preprocessing module, an object detection model building module, a model training module, a model testing module, and a real-time detection module. The dataset preprocessing module is used to preprocess the drone aerial image dataset; The target detection model construction module is used to construct a target detection model for UAV aerial images based on multi-scale feature extraction. The model training module is used to input the training set into the target detection model for training, so as to obtain the target detection model of the UAV aerial image. The model testing module is used to input the test set into the target detection model for testing, and obtain the model detection results and performance evaluation results. The real-time detection module is used to load the target detection model, perform real-time detection, and save the detection results.

8. The UAV aerial image target detection system based on improved YOLOv8s according to claim 7, characterized in that, The real-time detection module includes a camera configuration unit, a model loading unit, a data source input unit, and a result storage unit; The camera configuration unit is used to set up, load, and determine the loading status of the detection camera; The model loading unit is used to load the target detection model and determine the model loading status; The data source input unit is used to receive images, videos, or real-time detection scene settings that need to be detected; The result storage unit is used to store the system's detection results.