Unmanned aerial vehicle small target detection system and method based on improved YOLOv8s model, medium and equipment
By improving the YOLOv8s model, introducing the BiFormer module and the WIoUv3 loss function, and combining it with the SAHI inference strategy, the accuracy and robustness issues of the YOLO algorithm in small target detection in UAV imagery were resolved, achieving efficient small target detection.
Patent Information
- Application Number
- CN202510265538.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-03-07
AI Technical Summary
Existing YOLO algorithms suffer from low detection rates, high error rates in class classification, and limited ability to distinguish targets in complex backgrounds when detecting small targets in UAV imagery.
We adopted an improved YOLOv8s model to construct the DSO-YOLOv8s network model, introduced the BiFormer module and C2f module for feature extraction, and combined the WIoUv3 loss function and SAHI inference strategy to enhance the feature extraction capability of small targets, reduce background interference, and improve detection accuracy.
It improves the accuracy and robustness of small target detection in UAV imagery, enhances the model's generalization ability and detection accuracy, and reduces computational complexity and resource requirements.
Smart Images

Figure CN119888542B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of computer vision, and particularly relates to a small target detection system for unmanned aerial vehicles based on a YOLOv8s improved model, a method, a medium and equipment. BACKGROUND
[0002] Small target detection has important practical application value in many fields. Generally, a small target refers to a target with a width or height less than 10% of the image size, or an area lower than a certain threshold (such as 32x32 pixels). With the rapid development of unmanned aerial vehicle technology, especially under the promotion of continuous improvement of hardware performance, unmanned aerial vehicle patrol has gradually replaced traditional manual patrol and shown many technical advantages. Unmanned aerial vehicles can efficiently and flexibly obtain large amounts of image data, multiple perspectives and ultra-high resolution image data, providing important support for fine detection. However, compared with natural images, unmanned aerial vehicle images have small target size and complex background, which brings great challenges to small target detection tasks. This particularity makes high-performance small target detection algorithms a key requirement, especially in the detection of static urban facilities such as manhole covers and traffic signs, and dynamic targets such as vehicles and pedestrians. It is particularly important to develop algorithms that adapt to complex backgrounds and improve small target detection accuracy.
[0003] YOLO, as a common target detection algorithm, has the advantages of fast detection speed, lightweight network structure, and convenient end-to-end training, and is widely used in various target detection tasks. However, the YOLO algorithm still has deficiencies in small target detection, such as lack of sufficient consideration of small target features, which can easily lead to feature loss, and limited ability to distinguish targets in complex backgrounds, which can easily cause false positives and missed detections. SUMMARY
[0004] The present application provides a small target detection system for unmanned aerial vehicles based on a YOLOv8s improved model, a method, a medium and equipment to enhance the extraction ability of small target features, reduce the interference of complex backgrounds on detection results, and improve the accuracy and robustness of detection, in order to meet the detection needs of high precision and multiple scenarios, in view of the low detection rate, high error rate of category judgment and other problems existing in the application of existing YOLO algorithms in unmanned aerial vehicle images, especially in the detection of small targets with complex backgrounds and fewer pixels.
[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a small target detection system for unmanned aerial vehicles based on a YOLOv8s improved model, comprising:
[0007] A data set module for constructing a small target detection data set of unmanned aerial vehicle images and dividing the training set, validation set and test set.
[0008] a network model module configured to construct a YOLOv8s network model for small target detection of UAV images, denoted as a DSO-YOLOv8s network model;
[0009] a training module configured to input a training set and a validation set into the DSO-YOLOv8s network model for training, generate a training weight file, introduce a WIoUv3 loss function in the training, and finally obtain a trained DSO-YOLOv8s network model through forward and backward propagation iteration optimization, and evaluate the trained DSO-YOLOv8s network model using a test set;
[0010] a detection module configured to input a UAV image to be detected into the trained DSO-YOLOv8s network model, and complete small target detection of the UAV image using a SAHI inference strategy.
[0011] Optionally, in the network model module, the DSO-YOLOv8s network model comprises a backbone network, a neck, and a head.
[0012] The backbone network is constructed based on a CBS module, a C2f module, a C2F-BiFormer module, and a SPPF module, wherein the C2F-BiFormer module is a BiFormer module embedded in the C2f module, and is configured to retain fine-grained context feature information in the feature extraction process; and the backbone network outputs a plurality of feature maps of different levels according to the input UAV image.
[0013] The neck adopts a PAFPN structure, performs multiple up-sampling and feature splicing operations on the plurality of feature maps of different levels output by the backbone network, and outputs a plurality of feature maps of different scales after the operations.
[0014] The head is provided with a plurality of detection heads of different scales, which correspond to the plurality of feature maps of different scales output by the neck respectively; the detection head is constructed using a C3Ghost module, and the features output by the neck are divided into a classification branch and a predicted frame regression branch, which are respectively used for predicting target categories and predicted frame positions of targets.
[0015] Optionally, the backbone network comprises, in sequence, a CBS module, a C2F-BiFormer module, a CBS module, a C2F-BiFormer module, a CBS module, a C2F-BiFormer module, a CBS module, a C2f module, and a SPPF module, and four feature maps of different levels are output at the three C2F-BiFormer modules and the SPPF module.
[0016] In the C2F-BiFormer module, the input feature map is divided into two paths, one of which sequentially passes through a convolution layer and multiple BiFormer modules, and the other of which only passes through a convolution layer, and then the two paths are merged for Concat operation, and the result obtained after the Concat operation is sequentially output after passing through a batch normalization layer, a SiLU activation function and a convolution layer.
[0017] Optionally, the neck part fuses multi-scale features from feature maps of different levels through paths from top to bottom and from bottom to top, to generate multiple feature maps of different scales.
[0018] Optionally, in the detection head of the head part, for the input feature map , the C3Ghost module first generates a main feature map through convolution operation:
[0019] ;
[0020] In the formula, represents the weight of convolution;
[0021] Then an additional ghost feature map is generated through linear transformation:
[0022] ;
[0023] In the formula, represents linear transformation;
[0024] The final output feature is the combination of the main feature map and the ghost feature map :
[0025] .
[0026] Optionally, in the training module, the calculation formula of the WIoUv3 loss function is as follows:
[0027] ;
[0028] ;
[0029] In the formula, is the WIoUv3 loss function, r is a non-monotonic focusing coefficient for adjusting the loss value, and are adjustment parameters for adjusting the quality cutoff criterion, represents the outlying degree of the anchor box, and the anchor box represents the initial candidate box, represents the initial WIoUv1 loss function, and the calculation formula is as follows:
[0030] ;
[0031] ;
[0032] ;
[0033] wherein, is an intermediate parameter of calculation, is an IoU loss function, denotes a natural exponential function, and denote the center coordinates of the prediction box and the target box, respectively, and denote the width and height of the minimum bounding rectangle composed of the prediction box and the target box, respectively, denotes separating and from the feature map, IoU denotes the intersection over union of the prediction box and the target box, the prediction box is generated based on the anchor box and the predicted offset, and the target box is the real box labeled in the dataset.
[0034] Optionally, the detection module inputs the unmanned aerial vehicle image to be detected into the trained DSO-YOLOv8s network model, uses a fixed-size sliding window to segment the original image of the unmanned aerial vehicle image, the trained DSO-YOLOv8s network model performs target detection on each small image obtained after segmentation, and superimposes the prediction box on the original image; wherein for a plurality of prediction boxes corresponding to each target, non-maximum suppression is used for filtering to retain the best prediction box.
[0035] In a second aspect, the present application provides a small target detection method for unmanned aerial vehicles based on a YOLOv8s improved model, comprising the following steps:
[0036] Step 1: constructing a small target detection dataset for unmanned aerial vehicle images, and dividing the dataset into a training set, a validation set and a test set;
[0037] Step 2: constructing a YOLOv8s network model for small target detection of unmanned aerial vehicle images, denoted as a DSO-YOLOv8s network model;
[0038] Step 3: inputting the training set and the validation set into the DSO-YOLOv8s network model for training, generating a training weight file, introducing a WIoUv3 loss function in the training, iteratively optimizing through forward and backward propagation, finally obtaining a trained DSO-YOLOv8s network model, and using the test set for evaluation;
[0039] Step 4: input the unmanned aerial vehicle image to be detected into the trained DSO-YOLOv8s network model, and complete the small target detection of the unmanned aerial vehicle image by using the SAHI inference strategy.
[0040] In a third aspect, the present application provides a computer readable storage medium storing a computer program, wherein the computer program causes a computer to execute the small target detection method for unmanned aerial vehicles based on the improved YOLOv8s model according to the second aspect.
[0041] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the small target detection method for unmanned aerial vehicles based on the improved YOLOv8s model according to the second aspect.
[0042] The present application has the following beneficial effects:
[0043] (1) In order to solve the problem that the small target detection is easily disturbed by noise due to the complex background of the unmanned aerial vehicle image, the present application constructs a C2F-BiFormer module based on a BiFormer module and a C2f module, and further constructs a backbone based on a CBS module, a C2F-BiFormer module, a C2f module and a SPPF module, introduces the idea of capturing long-range dependencies, preserves fine-grained context feature information in the feature extraction process, and outputs four feature maps at the C2F-BiFormer module and the SPPF module to provide more position information of small targets.
[0044] (2) In order to improve the perception of the network to small targets, the present application performs 3 times of upsampling and 3 times of feature splicing operations in the neck, fuses the position information features of high-level feature maps and shallow network, and fully utilizes the feature maps; the present application uses a C3Ghost module to construct a detection head, reduces the model complexity and computational complexity on the basis of maintaining the accuracy, and sets 4 detection heads with different scales in the head, which alleviates the problem that the resolution gradually decreases due to the large downsampling multiple in the YOLOv8s network, improves the positioning accuracy of small targets by the model and maintains the integrity of semantic information.
[0045] (3) In order to alleviate the problem that the CIoU (Complete-IoU) loss excessively depends on the IoU (Intersection over Union) and the center point distance, and easily ignores the demand for accurate positioning and shape matching in small target scenes, the present application proposes to use WIoU (Wise Intersection over Union) v3 as the boundary box regression loss, to reduce the case of generating too large or harmful gradient by extreme samples, pay more attention to samples of general quality, and thus improve the generalization ability and overall performance of the model.
[0046] (4) In order to improve the detection accuracy of the target detection algorithm for small targets in the inference stage, the present application introduces a slicing assisted hyper inference small object target detection (Slicing Aided Hyper Inference, SAHI) algorithm. This method creates a larger pixel area for small target objects in the image through slicing, preserves the unique features of small targets and prevents feature loss, increases the detection effect of small targets in the local area, and effectively improves the overall detection performance. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 Figure 1 is a structural schematic diagram of a YOLOv8s network model for unmanned aerial vehicle image small target detection.
[0048] Figure 2 Figure 2 is a structural schematic diagram of a C2F-BiFormer module.
[0049] Figure 3 Figure 3 is a structural schematic diagram of a C2f module.
[0050] Figure 4 Figure 4 is a structural schematic diagram of a BiFormer module.
[0051] Figure 5 Figure 5 is a structural schematic diagram of a Bottleneck structure in the C2f module.
[0052] Figure 6 Figure 6 is a structural schematic diagram of a CBS module.
[0053] Figure 7 Figure 7 is a structural comparison diagram of a traditional detection head and an improved small target detection head.
[0054] Figure 8 Figure 8 is a schematic diagram of a C3Ghost module.
[0055] Figure 9 Figure 9 is a visual comparison result of the prediction of the method of the present application and the traditional YOLOv8s on the VEDAI dataset.
[0056] Figure 10Visualization comparison results of the method of the present application and the traditional YOLOv8s in predicting the manhole cover target detection dataset. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
[0058] In an embodiment, the present application provides a small target detection method for unmanned aerial vehicles based on an improved YOLOv8s model, which comprises the following steps:
[0059] S1: Constructing a small target detection dataset for unmanned aerial vehicle images, and dividing the dataset into a training set, a validation set and a test set.
[0060] This step specifically includes:
[0061] S11: Collecting the VEDAI dataset for unmanned aerial vehicle image vehicle detection, and modifying the annotation format to YOLO format through an algorithm, and dividing the training set, the validation set and the test set according to a ratio of 7:2:1 to construct the VEDAI target detection dataset.
[0062] S12: Collecting high-resolution unmanned aerial vehicle images, cropping the unmanned aerial vehicle images to generate 7323 sub-images of 512x512 pixels, and dividing the training set, the validation set and the test set according to a ratio of 7:2:1, annotating the cropped samples with manhole cover targets using the LabelMe tool, and constructing a manhole cover target detection dataset for unmanned aerial vehicle images.
[0063] S2: Constructing a YOLOv8s network model for unmanned aerial vehicle image small target detection (DSO-YOLOv8s), the structure of the DSO-YOLOv8s network model being as shown in Figure 1 .
[0064] This step specifically includes:
[0065] S21: Constructing a C2F-Biformer module and a Backbone based on a CBS module, a C2F-BiFormer module, a C2f module and a SPPF module, and simultaneously outputting 4 feature maps at the C2F-BiFormer module and the SPPF module to provide more position information of small targets.
[0066] Specifically, a C2F-BiFormer module is proposed, aiming to play the efficient feature extraction of the C2f module and the global feature modeling capability of the BiFormer module, which can ensure the preservation of fine-grained contextual feature information in the feature extraction process and improve the multi-scale perception and content perception of the target detection network. The C2F-BiFormer module and the C2f module are as shown in Figure 2 and Figure 3 The C2F-Biformer module mainly consists of a convolution layer, a BiFormer module, a Concat operation, and a CBS module. BiFormer is the basic building block of the BiFormer model, and the structure is as shown in Figure 4 BiFormer uses Depthwise Separable Convolution (DWConv) to implicitly encode the relative position information of the input, and then uses Bi-Level Routing Attention (BRA) and Multilayer Perceptron (MLP) in turn to model the cross-position relationship and embed the position of the input information. It has the ability to model global features. The structure of the bottleneck in the C2f module and the CBS module is as shown in Figure 5 and Figure 6 .
[0067] Compared with the original YOLOv8s, DSO-YOLOv8s provides more shallow feature maps in the early stage of Backbone, and the shallow feature maps have higher spatial resolution and contain more local information. It is more sensitive to low-level features such as edges, textures, and colors. The fine edge and contour information and rich detail features make the low-level feature map helpful for segmentation and small-scale target detection.
[0068] S22: Perform 3 times of upsampling and 3 times of feature concatenation operations at the Neck end to fuse the high-level feature maps with the position information features of the shallow network to make full use of the feature maps, and set 4 detection heads of different scales at the Head end, as shown in Figure 7 .
[0069] Specifically, the three detection heads set by the traditional YOLOv8s correspond to P3 feature map size 64x64, P4 feature map size 32x32, and P5 feature map size 16x16, respectively, which are responsible for detecting small, medium, and large scale targets. The downsampling multiple of YOLOv8s is relatively large, and the resolution gradually decreases, which may cause the loss of information related to the manhole cover. The deeper feature map is difficult to learn the feature information of the small target. While the shallow feature map has higher resolution and contains a large amount of position information of small targets.
[0070] In order to improve the positioning accuracy of small targets by the model while maintaining good semantic information, the embodiment performs 3 times of upsampling and 3 times of feature splicing operations at the Neck end to fuse the high-level feature maps with the position information features of the shallow network. At the same time, 4 detection heads with different scales are set at the Head end to alleviate the problem of gradually reduced resolution caused by the large downsampling multiple in the YOLOv8s network, improve the positioning accuracy of small targets by the model and maintain the integrity of semantic information, so that the deep network can also learn the feature information of small targets, and the small target detection effect is improved.
[0071] S23: Reconstruct the detection head using the C3Ghost module to reduce the model complexity and computational amount while maintaining the accuracy, which alleviates the problem of increased network parameter amount and computational amount caused by the introduction of large-size feature maps and multiple feature fusion operations.
[0072] As shown in Figure 8 , given the input feature map , the C3Ghost module first generates the main feature map through convolution operation:
[0073] ;
[0074] In the formula, represents the weight of convolution.
[0075] Then, the additional ghost feature is generated through linear transformation, that is:
[0076] ;
[0077] In the formula, represents linear transformation, such as dot product or weighted average.
[0078] The final output feature is the combination of the main feature map and the ghost feature map :
[0079] .
[0080] This design greatly reduces the number of floating point operations, and the fusion of the main feature map and the ghost feature map maintains the detection ability of the model, so that better real-time performance is obtained under less resources.
[0081] S3: input the training set and the validation set into the DSO-YOLOv8s network model for training, generate a training weight file, introduce the WIoUv3 loss function, and finally obtain the trained DSO-YOLOv8s network model through forward and backward propagation iterative optimization.
[0082] This step specifically includes:
[0083] S31: through input preprocessing (such as size adjustment and normalization), the image is adjusted to a fixed size of 512x512x3 that fits the model. Then enter the Backbone, and extract multi-scale features through each core module in turn. The core modules include the CBS module, the C2F-BiFormer module, the C2f module, and the SPPF module. After passing through the three C2F-BiFormer modules and the SPPF module, four efficient feature maps are output.
[0084] S32: the Neck uses the PAFPN structure, and the four feature maps output by the Backbone fuse multi-scale features through the top-down and bottom-up paths, and output four fused feature maps, further improving the detection ability of different target sizes.
[0085] S33: in the Head, the features output by the Neck are divided into a classification branch and a predicted frame regression branch through decoupled detection heads, respectively predicting the target class and the predicted frame position.
[0086] S34: introduce the WIoUv3 loss function, and use the forward and backward propagation iterative algorithm to optimize the model, and finally obtain the trained DSO-YOLOv8s network model. Specifically, using the WIoUv3 loss function, the excessive dependence of CIoU on IoU and the center point distance is alleviated, and the problem of easily ignoring the demand for accurate positioning and shape matching in small target scenarios is solved. WIoUv3 introduces dynamic weighting in terms of center point offset, aspect ratio difference, and IoU attenuation, making the matching of the predicted frame and the target frame more accurate. Among them, the anchor frame refers to the initial candidate frame generated by the network at a certain position, and the predicted frame is the final predicted value generated based on the anchor frame and the network predicted offset, and the target frame is the real frame labeled in the data set, which is used to supervise the learning of the network. In addition, the introduction of the WIoUv3 loss function does not increase additional parameters, maintaining the lightweight of the model. The calculation formula of WIoUv3 is as follows:
[0087] ;
[0088] ;
[0089] In the formula, is the WIoUv3 loss function, is a non-monotonic focusing coefficient used to dynamically adjust the loss value, is a regulation parameter, which is used as a hyperparameter to adjust the quality cut-off criterion, represents the outlying degree of the anchor box, represents the initial Wiouvl loss function, and the calculation formula is as follows:
[0090] ;
[0091] ;
[0092] ;
[0093] In the formula, represents the natural exponential function, respectively represent the center coordinates of the predicted box and the target box, respectively represent the width and height of the minimum bounding rectangle composed of the predicted box and the target box, represents separating from the feature map, and IoU represents the intersection over union of the predicted box and the target box. Wiouv3 is weighted or scaled by a scaling factor to , and its dynamic weighting mechanism can adjust the weight according to the actual situation of the target, so as to perform better in small target detection, especially when dealing with overlapping target boxes and dense targets.
[0094] S4: Input the test set into the trained DSO-YOLOv8s network model, and introduce the SAHI inference strategy. A fixed-size sliding window is used to segment the original image, and forward propagation target detection is applied to each overlapping slice to infer small targets. At the same time, full inference of the entire image is used to detect large targets. Finally, the predicted boxes are superimposed on the original image, and non-maximum suppression (NMS) is used for filtering. The predicted boxes that meet the IoU setting threshold are matched, and the predicted boxes with low IoU are removed. Finally, the global detection result is generated.
[0095] Cutting a large resolution image into smaller sub-images can avoid interference from large-scale background information, better focus on small targets, avoid them being ignored in large images due to low resolution, and improve the network's attention to small targets.
[0096] S5: According to the target detection result, the precision evaluation of four indexes including precision, recall, Intersection over Union (IoU) greater than 0.5, and the average precision value (mAP50) and the average precision value (mAP50-95) of IoU from 0.5 to 0.95 is carried out.
[0097] For the VEDAI target detection data set, the precision evaluation of the mAP50 index is carried out; for the artificial construction of the unmanned aerial vehicle image manhole cover target detection data set, the precision evaluation of four indexes including Precision, Recall, mAP50 and mAP50-95 is carried out, and the calculation formulas of Precision and Recall are as follows:
[0098] ;
[0099] ;
[0100] In the formula, TP represents the true positive, that is, the number of cases predicted as the current class and actually belonging to the current class, FP represents the false positive, that is, the number of cases predicted as the current class but not actually belonging to the current class, and FN represents the false negative, that is, the number of cases actually belonging to the current class but predicted as other classes.
[0101] The average precision (AP) refers to the area under the Precision-Recall curve, and mAP represents the average value of AP of all classes, and the calculation formula is as follows:
[0102] ;
[0103] mAP50 and mAP50-95 are important indexes for evaluating the performance of target detection models, where mAP50 represents the mAP value when the IoU threshold is set to 0.5, and mAP50-95 represents the average mAP calculated under multiple IoU thresholds (from 0.5 to 0.95, with a step of 0.05).
[0104] S6: In actual application, the unmanned aerial vehicle image to be detected is input into the trained DSO-YOLOv8s network model, and the SAHI inference strategy is used to complete the small target detection of the unmanned aerial vehicle image.
[0105] Next, the present embodiment carries out experiments on two remote sensing image small target detection data sets. The data used are the VEDAI target detection data set for unmanned aerial vehicle image vehicle detection and the artificial unmanned aerial vehicle image manhole cover target detection data set, respectively. The vehicles and manhole covers in the data both meet the definition of small targets. Among them, the VEDAI target detection data set is a public data set for remote sensing image vehicle detection, containing about 1210 images with a resolution of 512x512 or 1024x1024, labeling 9 vehicle categories (such as cars, trucks, airplanes, etc.) and more than 2950 targets, providing two labeling formats of rotating bounding boxes and rectangular bounding boxes. The data set covers various scenes such as cities, villages and mountains, with characteristics such as light changes, complex backgrounds, and various target sizes, suitable for studying target detection, multi-scale detection and target detection algorithms. However, the number of targets in each image in the data set is small, and the background contains various geographical features (buildings, vegetation, roads, etc.), increasing the detection difficulty, and the vehicle occupies a very small proportion of the image area, giving higher requirements for the detection model. The manhole cover target detection data set is derived from a 3cm spatial resolution orthophoto product. After cropping, there are a total of 7323 512x512 pixel sub-images, which are divided into training set, validation set and test set according to the ratio of 7:2:1, and labeled using LabelMe.
[0106] In order to verify the performance of the DSO-YOLOv8s network model, the present embodiment selects the following methods for comparative experiments, and Table 1 shows the experimental hyperparameters and hardware device information.
[0107] Table 1. Experimental parameters
[0108]
[0109] Table 2 shows the detection accuracy and model parameter amount of each comparison method on the VEDAI target detection data set, and the partial detection results of YOLOv8s are visualized as follows. Figure 9The results are shown in Table 2. As can be seen from the table, DSO-YOLOv8s achieves the highest mAP50 of 62.9%, which is 8.1% higher than YOLOv5s (54.8%) and also has an improvement over YOLOv4 (62.4%), YOLOv3 (61.1%) and YOLOv8s (59.2%), with an increase of 0.5%, 1.8% and 3.7%, respectively. In terms of single-class detection performance, DSO-YOLOv8s performs outstandingly in certain specific classes, especially in the Boat and Van classes, achieving the highest mAP50 values of 53.5% and 67.4%, respectively, leading other models, and maintaining high accuracy in other classes, which indicates that DSO-YOLOv8s has balanced detection accuracy in various classes. In terms of model complexity, the parameter amount of DSO-YOLOv8s is 10.9M, which is much lower than YOLOv3 (61.54M) and YOLOv4 (52.51M), slightly lower than YOLOv8s (11.2M), and only slightly higher than YOLOv5s (7.07M). This lightweight design enables the model to significantly reduce computational cost while ensuring high accuracy. As can be seen from the visualization comparison chart, compared with YOLOv8s, DSO-YOLOv8s can detect some small targets that are ignored by YOLOv8s, showing better detection capability. In summary, DSO-YOLOv8s exhibits excellent comprehensive performance in this comparison experiment, not only outperforming traditional YOLO series models in overall mAP50 and mAP50 of multiple classes, but also effectively optimizing parameter amount and computational demand, achieving high computational efficiency and resource utilization. Especially in specific classes such as Boat and Van, it shows significant advantages, showing its strong potential in diversified target detection tasks.
[0110] Table 2 Detection accuracy and performance indicators of different models on VEDAI dataset
[0111]
[0112] Table 3 Detection accuracy and performance indicators of each comparison method on the manhole cover test set, and the visualization comparison chart of the detection results of YOLOv8s is as follows: Figure 10As shown in Table 3, compared with the traditional models of YOLO (YOLOv3-tiny, YOLOv5s, YOLOv6s, YOLOv8s and YOLOv10s), DSO-YOLOv8s shows a significant advantage in detection performance. Specifically, the Precision of DSO-YOLOv8s reaches 78.2%, which is 3.8% higher than the best YOLOv10s, and is 9.6%, 5.9%, 4.4% and 5.7% higher than YOLOv3-tiny, YOLOv5s, YOLOv6s and YOLOv8s respectively, which reflects better detection accuracy. In addition, DSO-YOLOv8s also comprehensively surpasses the traditional models in Recall, mAP50 and mAP50-95, which are 69.5%, 77.9% and 40.1% respectively, and the mAP50 is 12.5%, 5.1%, 5.1%, 4.0% and 5.3% higher than YOLOv3-tiny, YOLOv5s, YOLOv6s, YOLOv8s and YOLOv10s respectively.
[0113] Compared with other improved models (such as Faster-RCNN, Retinanet, GFL and ARSD), DSO-YOLOv8s also has obvious advantages in performance. In particular, compared with the relatively high-performance ARSD, the Precision of DSO-YOLOv8s is improved by 5.1%, the Recall is improved by 1.3%, and the mAP50 and mAP50-95 are improved by 4.6% and 2.5% respectively.
[0114] At the same time, the parameter amount of DSO-YOLOv8s is 8.2M, which is reduced by 3.0M compared with YOLOv8s, and is greatly reduced compared with Retinanet and Faster-RCNN models, which is only 1 / 7 and 1 / 5 of Retinanet (55.4M) and Faster-RCNN (41.3M), and is only slightly higher than YOLOv5s and YOLOv10s, which shows higher model efficiency.
[0115] Table 3 Detection accuracy and performance indicators of different models on the manhole cover test set
[0116]
[0117] As can also be seen from the visualization comparison chart, compared with YOLOv8s, DSO-YOLOv8s can detect some manhole covers ignored by YOLOv8s, and shows better detection capability. DSO-YOLOv8s is significantly superior to the traditional YOLO model and other improved models in performance indicators such as Precision and Recall, while keeping a low parameter amount. This shows that DSO-YOLOv8s has great practical application potential while achieving high-precision detection and taking into account the lightweight design of the model.
[0118] In another embodiment, the present application proposes a small target detection system for unmanned aerial vehicles based on a YOLOv8s improved model, which corresponds to the small target detection method for unmanned aerial vehicles based on the YOLOv8s improved model in the foregoing embodiment, and specifically includes the following modules:
[0119] A data set module is configured to construct a small target detection data set of unmanned aerial vehicle images, and divide the data set into a training set, a validation set and a test set;
[0120] A network model module is configured to construct a YOLOv8s network model for small target detection of unmanned aerial vehicle images, denoted as a DSO-YOLOv8s network model;
[0121] A training module is configured to input the training set and the validation set into the DSO-YOLOv8s network model for training, generate a training weight file, introduce a WIoUv3 loss function in the training, and finally obtain a trained DSO-YOLOv8s network model through forward and backward propagation iterative optimization, and evaluate the trained DSO-YOLOv8s network model by using the test set;
[0122] A detection module is configured to input an unmanned aerial vehicle image to be detected into the trained DSO-YOLOv8s network model, and complete small target detection of the unmanned aerial vehicle image by using a SAHI inference strategy.
[0123] In the embodiment, the functions and execution processes of the modules of the system correspond to the steps of the small target detection method for unmanned aerial vehicles based on the YOLOv8s improved model in the foregoing embodiment, and therefore will not be described here.
[0124] In another embodiment, the present application proposes a computer readable storage medium storing a computer program, the computer program causing a computer to execute the small target detection method for unmanned aerial vehicles based on the YOLOv8s improved model in the foregoing embodiment.
[0125] In another embodiment, the present application proposes an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the small target detection method for unmanned aerial vehicles based on the YOLOv8s improved model in the foregoing embodiment is realized.
[0126] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium which can contain or store programs for use by or in connection with an instruction execution system, apparatus or device. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of computer storage medium can include one or more wires, portable computer disks, hard drives, 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 of the above.
[0127] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0128] The above is only the preferred embodiment of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary skilled in the art, some improvements and refinements without departing from the principles of the present application shall be considered within the protection scope of the present application.
Claims
1. A small target detection system for UAVs based on an improved YOLOv8s model, characterized in that, It includes a dataset module, a network model module, a training module, and a detection module: The dataset module is used to construct a small target detection dataset for UAV imagery and divide it into training, validation, and test sets; The network model module is used to construct a YOLOv8s network model for small target detection in UAV imagery, denoted as the DSO-YOLOv8s network model; the DSO-YOLOv8s network model in the network model module includes a backbone network, a neck network, and a head network. The backbone network is constructed based on a CBS module, a C2f module, a C2F-BiFormer module, and an SPPF module. The C2F-BiFormer module embeds a BiFormer module within the C2f module to preserve fine-grained contextual feature information during feature extraction. The backbone network outputs multiple feature maps of different levels based on the input UAV imagery. The backbone network comprises sequentially connected CBS modules, C2F-BiFormer modules, CBS modules, C2F-BiFormer modules, CBS modules, C2f modules, and SPPF modules, outputting a total of four feature maps of different levels at the three C2F-BiFormer modules and the SPPF module. The neck region adopts a PAFPN structure, which performs multiple upsampling and feature concatenation operations on multiple feature maps of different levels output by the backbone network, and outputs multiple feature maps of different scales after the operation. The head is equipped with multiple detection heads of different scales, which correspond to multiple feature maps of different scales output from the neck. The detection heads are constructed using the C3Ghost module, which divides the features output from the neck into a classification branch and a bounding box regression branch, which are used to predict the target category and the target's bounding box position, respectively. The training module is used to input the training set and validation set into the DSO-YOLOv8s network model for training, generate a training weight file, introduce the WIoUv3 loss function during training, and iteratively optimize through forward and backward propagation to finally obtain the trained DSO-YOLOv8s network model, which is then evaluated using a test set. The detection module is used to input the UAV images to be detected into the trained DSO-YOLOv8s network model and use the SAHI inference strategy to complete the detection of small targets in the UAV images.
2. The small target detection system for UAVs based on the improved YOLOv8s model as described in claim 1, characterized in that: In the C2F-BiFormer module, the input feature map is divided into two paths. One path passes through convolutional layers and multiple BiFormer modules in sequence, while the other path passes through only convolutional layers. The two paths are then combined for a Concat operation. The result obtained after the Concat operation then passes through a batch normalization layer, a SiLU activation function, and a convolutional layer in sequence before being output.
3. The small target detection system for UAVs based on the improved YOLOv8s model as described in claim 1, characterized in that: The neck region fuses multi-scale features from feature maps at different levels via top-down and bottom-up paths to generate multiple feature maps of different scales.
4. The small target detection system for UAVs based on the improved YOLOv8s model as described in claim 1, characterized in that: In the detection head of the head, for the input feature map The C3Ghost module first generates the main feature map through convolution operations. : ; In the formula, Represents the weights of the convolution; Then, additional ghost feature maps are generated through linear transformation. : ; In the formula, Represents a linear transformation; Final output features It is the main feature map and ghost feature map The combination of: 。 5. The small target detection system for UAVs based on the improved YOLOv8s model as described in claim 1, characterized in that: In the training module, the WIoUv3 loss function is calculated using the following formula: ; ; In the formula, It is the WIoUv3 loss function. r It is a non-monotonic focusing coefficient used to adjust the loss value. and These are adjustment parameters used to adjust the quality cutoff criteria. This indicates the outlier degree of the anchor box, where the anchor box represents the initial candidate box. The initial WIoUv1 loss function is calculated as follows: ; ; ; In the formula, This represents the natural exponential function. and These represent the center coordinates of the predicted bounding box and the target bounding box, respectively. and Let represent the width and height of the smallest bounding rectangle formed by the predicted bounding box and the target bounding box, respectively. Indicates will and Separate from the feature map. IoU This represents the intersection-union ratio (IoU) between the predicted bounding box and the target bounding box. The predicted bounding box is generated based on the anchor box and the predicted offset, while the target bounding box is the ground truth bounding box labeled in the dataset.
6. The small target detection system for UAVs based on the improved YOLOv8s model as described in claim 1, characterized in that: The detection module inputs the UAV image to be detected into the trained DSO-YOLOv8s network model, uses a fixed-size sliding window to segment the original UAV image, and the trained DSO-YOLOv8s network model performs target detection on each segmented small image and overlays the predicted bounding boxes onto the original image; wherein, for multiple predicted bounding boxes corresponding to each target, non-maximum suppression is used for filtering to retain the best predicted bounding box.
7. A method for small target detection for UAVs based on an improved YOLOv8s model, characterized in that, Includes the following steps: Step 1: Construct a small target detection dataset from UAV imagery and divide it into training, validation, and test sets; Step 2: Construct a YOLOv8s network model for small target detection in UAV imagery, denoted as the DSO-YOLOv8s network model; the DSO-YOLOv8s network model includes a backbone network, a neck network, and a head network; The backbone network is constructed based on the CBS module, C2f module, C2F-BiFormer module, and SPPF module. The C2F-BiFormer module is a BiFormer module embedded in the C2f module, which is used to retain fine-grained contextual feature information during feature extraction. The backbone network outputs multiple feature maps of different levels based on the input UAV imagery. The neck region adopts a PAFPN structure, which performs multiple upsampling and feature concatenation operations on multiple feature maps of different levels output by the backbone network, and outputs multiple feature maps of different scales after the operation. The head is equipped with multiple detection heads of different scales, which correspond to multiple feature maps of different scales output from the neck. The detection heads are constructed using the C3Ghost module, which divides the features output from the neck into a classification branch and a bounding box regression branch, which are used to predict the target category and the target's bounding box position, respectively. Step 3: Input the training set and validation set into the DSO-YOLOv8s network model for training, generate the training weight file, introduce the WIoUv3 loss function during training, and iteratively optimize through forward and backward propagation to finally obtain the trained DSO-YOLOv8s network model, and evaluate it using the test set. Step 4: Input the UAV imagery to be detected into the trained DSO-YOLOv8s network model, and use the SAHI inference strategy to complete the detection of small targets in the UAV imagery.
8. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute the UAV small target detection method based on the improved YOLOv8s model as described in claim 7.
9. An electronic device, characterized in that, include: The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for small target detection of unmanned aerial vehicles based on the improved YOLOv8s model as described in claim 7.
Citation Information
Patent Citations
Traffic sign board detection method based on improved YOLOv8s
CN117392640A