A method for detecting a target of a UAV based on a YOLO-LiteMax neural network
By improving the backbone, neck, and head network structures of the YOLO-LiteMax neural network, the problems of false detection and false negative detection in small target detection of YOLOv8 in UAVs were solved, achieving higher detection accuracy and robustness.
Patent Information
- Application Number
- CN202510039781.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The existing YOLOv8 neural network performs poorly in detecting small targets on drones, and is prone to false positives and false negatives, especially in scenarios with multiple overlapping small targets and diverse scenarios.
We employ a YOLO-LiteMax neural network, enhancing feature extraction capabilities by replacing the Bottleneck block with a FasterNet block in the backbone network; performing multi-scale feature fusion and differential processing in the neck network to highlight information about small targets; and using group normalization and shared convolutions for feature extraction in the head network to enhance detection accuracy and robustness.
Without increasing the number of model parameters, it improves the detection accuracy for dense small targets and the robustness in complex environments, thus enhancing the detection capability.
Smart Images

Figure CN119863725B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning target detection technology, and in particular to a method for UAV target detection based on YOLO-LiteMax neural network. Background Technology
[0002] Object detection algorithms can be broadly categorized into two-stage detectors and single-stage detectors. Two-stage detectors, such as the R-CNN (Region-CNN) series, first generate candidate regions and then perform detailed classification and regression. These methods offer high accuracy, particularly suitable for complex scenes, but suffer from slow inference speed and high computational cost. In contrast, single-stage detectors like YOLO and SSD combine region proposal and classification into a single step, directly predicting the object category and bounding box in the image. They are fast, structurally simple, and well-suited for real-time detection, although they often encounter difficulties when detecting small objects and handling complex backgrounds.
[0003] The YOLOv8 neural network inherits the core idea of the YOLO series: end-to-end object detection. It uses a single region convolutional neural network to simultaneously perform object localization (bounding box regression) and classification (category prediction). The YOLOv8 object detection process includes the following key steps: preprocessing the input image; extracting features from the image using the YOLOv8 backbone network; generating object detection regions through convolution operations and anchor boxes; predicting the object's category within each candidate box while simultaneously predicting the positional offset of each candidate box (i.e., bounding box regression) to determine the object's location and size; using the NMS algorithm to remove redundant boxes; and outputting the results.
[0004] Compared to the traditional YOLOv7, the YOLOv8 neural network offers a significant improvement in accuracy. YOLOv8 demonstrates high accuracy on common object detection datasets such as COCO and VOC. However, in object detection for drones, the existing YOLOv8 performs poorly in detecting small objects, exhibiting false positives and false negatives. Further research is needed to improve the accuracy of small object detection, especially in scenarios with multiple overlapping small objects and diverse environments. Summary of the Invention
[0005] The problem to be solved by this invention is to provide a UAV target detection method based on YOLO-LiteMax neural network, which enhances the detection capability of dense small target objects and improves detection accuracy without increasing the number of model parameters, while maintaining efficiency and enhancing its robustness in complex environments.
[0006] This invention adopts the following technical solution: a UAV target detection method based on YOLO-LiteMax neural network, comprising the following steps:
[0007] Step 1: Build a YOLO-LiteMax object detection model based on YOLOv8, and train the model by inputting training set images;
[0008] Step 2: The input target object image is processed by the backbone network to extract features and generate feature maps of different scales. The backbone network contains several CBS modules, several selection convolutional blocks, and one SPPF module. The selection convolutional module replaces the Bottleneck block in the C2f module with a FasterNet block to reduce redundant information in the feature map.
[0009] Step 3: Input the generated feature maps at different scales into the neck network and perform feature fusion using the scale sequence; the neck network performs differentiated processing on the feature maps at different scales, fuses local details and global information of multi-scale feature maps, and then highlights small target information by adding large-scale feature maps, and uses the feature extraction module to obtain local details of small targets;
[0010] Step 4: Input the feature map after fusing the neck network features into the head network for classification and regression tasks; In the head network, the detection head uses group normalization and shared convolution to further extract features, shares information between features at different scales, and trains the classification and regression tasks separately through the decoupled head, and uses a scale factor to scale the feature map, finally obtaining the YOLO-LiteMax target detection model that accurately identifies dense small targets.
[0011] Step 5: Input the image of the drone to be detected into the trained YOLO-LiteMax target detection model to perform target detection and identify dense small targets in the image.
[0012] Preferably, in step 2, each CBS module consists of a convolutional kernel with a size of 3 and a stride of 2, a batch normalization layer, and a SiLU activation function;
[0013] Each selected convolutional block includes a CBS module, a Split layer, and three sequentially connected FasterNet blocks. Each FasterNet block performs convolution on only a portion of the channels. The output of each FasterNet block serves as the input to the next FasterNet block and is stored in a list. After three FasterNet blocks, all feature maps in the list are concatenated by channel.
[0014] The SPPF module consists of CBS and Maxpool operations, which enhance the feature extraction capability of the backbone network by pooling information at multiple scales.
[0015] Preferably, in step 2, the target object image undergoes feature extraction via the backbone network, as follows:
[0016] Step 201: The input image is downsampled twice by two CBS modules, the zeroth layer and the first layer, to obtain a 4x downsampled feature map, which is then used for convolution in the second layer.
[0017] In the second layer of the selected convolutional block, the 4x downsampled feature map is first processed by a CBS module, and the output enters a Split layer. The Split layer divides the feature map into two feature maps with the same number of channels, and then passes them through 3 FasterNet blocks for feature extraction to obtain a large-size feature map P2 after 4x downsampling.
[0018] The feature map P2, which is downsampled by 4 times, is passed through the third layer CBS module and downsampled by 8 times. Then it is input into the fourth layer selected convolutional block for feature extraction to obtain the feature map P3 after downsampling by 8 times.
[0019] After passing through the fifth CBS module and undergoing a 16x downsampling, the data is input into the sixth layer selected convolutional block for feature extraction, resulting in the 16x downsampled feature map P4.
[0020] After passing through the seventh layer CBS module and undergoing 32x downsampling, the data is input into the eighth layer selected convolutional block for feature extraction, resulting in the 32x downsampled feature map P5. The feature map P5 is then passed through the ninth layer SPPF module to improve the YOLO-LiteMax object detection network's ability to capture contextual details.
[0021] Step 202: Output the 8x downsampled feature map P3, 16x downsampled feature map P4, 32x downsampled feature map P5, and 4x downsampled feature map P2 to the Neck network.
[0022] Preferably, in step 3 of the neck network, feature fusion is performed on feature maps of different scales, as follows:
[0023] Step 301: Modify the connection method between the backbone network and the neck network. Instead of connecting the fourth, sixth, and ninth layers of the traditional YOLOv8 backbone network to the neck network, optimize the connection method to connect the second, fourth, sixth, and ninth layers of the backbone network to the neck network. In this case, the feature map P5 output by the SPPF module of the ninth layer will first undergo convolution processing through the CBS module of the tenth layer after entering the neck network.
[0024] Step 302: The feature maps P3, P4 and the convolutionally processed feature map P5 are used as large, medium and small-sized feature maps, and input into the first SAC module for feature fusion. Differentiated processing is performed on feature maps of different scales to balance the preservation of details and extraction of global information in feature maps, avoid the loss of small target features during upsampling, and enhance the ability to capture details of small targets.
[0025] The feature map output from the first SAC module is processed again through a selection convolution block. The feature map output from the selection convolution block, along with feature maps P2 and P3, is then input into the second SAC module to further fuse the features. After processing through the selection convolution block, the P3 scale feature map is obtained for use by the P3 detection head.
[0026] The feature map output by the second SAC module is downsampled by a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampled result is then concatted with the feature map fused with the first SAC module. After selecting convolutional blocks for processing, a P4 scale feature map is obtained for use by the P4 detection head.
[0027] The obtained feature map is then downsampled again by a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampled result is then concatenated with the feature map output by the tenth layer CBS module. After processing by selecting convolutional blocks, the P5 scale feature map is obtained for use by the P5 detection head.
[0028] Step 303: Add two C3DSF feature extraction modules to the neck network to capture the correlation between feature maps across scales. Input feature maps P3, P4, and P5 into the first C3DSF feature extraction module to fully extract feature map information.
[0029] Step 304: Add the features extracted by the first C3DSF feature extraction module and the feature map fused by the second SAC module. Add an upsampling module and a Concat module. Fuse the P3 scale feature map through upsampling and then Concat it with the output of the second layer selection convolution block in the backbone network. After processing by the selection convolution block again, input the feature maps P2, P3, and P4 into the second C3DSF feature extraction module for feature extraction. Then, add the feature map with the features processed by the selection convolution block to obtain the P2 scale feature map for use by the P2 detection head.
[0030] Preferably, in the SAC module, adaptive max pooling and adaptive average pooling are performed on the large-size feature map, the results of the two pooling are added together, interpolation upsampling is performed on the small-size feature map, and then the processed large, medium and small-size feature maps are stitched together in the channel dimension.
[0031] Preferably, in the C3DSF feature extraction module, the large, medium, and small feature maps are adjusted to have the same number of channels. Interpolation upsampling is applied to the medium and small feature maps to adjust the feature map size to the size of the large feature map. The dimensions of the tensors of the large, medium, and small feature maps are expanded and concatenated. 3D convolution is used to extract features from the concatenated feature map. Then, after passing through a normalization layer, an activation function layer, and a max pooling layer, the processed result is compressed to the dimension of the input.
[0032] Preferably, in step 4, the head network performs classification and regression tasks as follows:
[0033] Step 401: Modify the connection method between the neck network and the head network. Add a P2 scale detection head and connect the traditional YOLOv8 neck network's three-layer scale feature maps (P3, P4, P5) to the head network. Modify it so that the neck network's four-layer scale feature maps (P2, P3, P4, P5) are connected to the head network.
[0034] Step 402: Integrate group normalization into the head network CBS module, and replace BatchNormalization with GroupNormalization to obtain the improved CGS module;
[0035] Step 403: The P2 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P2 scale feature map are calculated respectively.
[0036] Step 404: The P3 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P3 scale feature map are calculated respectively.
[0037] Step 405: The P4 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P4 scale feature map are calculated respectively.
[0038] Step 406: The P5 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P5 scale feature map are calculated respectively.
[0039] Preferably, the Bbox_loss and Cls_loss of the obtained P2, P3, P4, and P5 scale feature maps are used. The regression loss Bbox_loss is used to optimize the position and size of the predicted bounding box to ensure that the object is accurately located; the classification loss Cls_loss is used to improve the accuracy of category recognition to ensure that the object category is correctly classified. By minimizing these two losses at the same time, the YOLO-LiteMax object detection network achieves a balance between localization and classification.
[0040] By constructing and applying the CGS module in the head network, the feature consistency and detection performance of the YOLO-LiteMax object detection network in multi-scale object detection are enhanced. Furthermore, through collaborative learning, the detection heads of different scales jointly optimize parameters during training, thereby improving the robustness and generalization ability of feature extraction.
[0041] The present invention also provides: an electronic device, comprising:
[0042] One or more processors;
[0043] A storage device on which one or more programs are stored;
[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-described UAV target detection methods based on the YOLO-LiteMax neural network.
[0045] The present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in any of the above-mentioned UAV target detection methods based on YOLO-LiteMax neural networks.
[0046] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0047] 1. This invention relates to a UAV target detection method based on the YOLO-LiteMax neural network. Without increasing the number of model parameters, the method reduces redundant information in the feature maps by replacing the Bottleneck block in the C2f module with a FasterNet block in the backbone network by selecting a convolutional module. In the neck network, feature maps of different scales are differentiated, and small target information is highlighted by adding large-scale feature maps to obtain local details of small targets. In the head network, group normalization and shared convolution are used to further extract features and identify dense small targets in the target object image.
[0048] 2. The UAV target detection method based on YOLO-LiteMax neural network in this invention effectively enhances the detection capability of dense small target objects, improves detection accuracy, and enhances its robustness in complex environments while maintaining efficiency. Attached Figure Description
[0049] Figure 1 This is a diagram illustrating the overall structure of the UAV target detection method based on the YOLO-LiteMax neural network of this invention.
[0050] Figure 2 This is a block diagram of the SCB module structure of the present invention;
[0051] Figure 3 This is a structural diagram of the SAC and C3DSF modules of the present invention;
[0052] Figure 4 This is a structural diagram of the improved detection head of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the application will be further described in detail below with reference to the accompanying drawings. The described embodiments are only a part of the embodiments involved in this invention. All non-innovative embodiments based on these embodiments by other researchers in the art are within the protection scope of this invention. Furthermore, the step numbers in the embodiments of this invention are only set for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0054] In one embodiment of the present invention, a UAV target detection method based on a YOLO-LiteMax neural network, such as... Figure 1 As shown, it includes the following steps:
[0055] Step 1: Construct a YOLO-LiteMax object detection network based on YOLOv8, and train the model by inputting training set images.
[0056] In this embodiment, the training set is established based on the publicly available VisDrone2019-DET dataset. The training set images are input into the YOLO-LiteMax object detection model based on YOLOv8 of this invention for model training.
[0057] Step 2: The input target object image is processed by the backbone network to extract features and generate feature maps of different scales.
[0058] Step 201: The input image first passes through two CBS (Convolutions BnSiLU) modules in the zeroth and first layers, and is downsampled twice to obtain a 4x downsampled feature map. The CBS module consists of a convolutional kernel with a size of 3 and a stride of 2, a batch normalization layer, and a SiLU activation function.
[0059] Next, the 4x downsampled feature map is input into the SCB (Selective Convolution Block) module of the second layer for convolution.
[0060] In this embodiment, the SCB module is an improvement on the traditional C2f module, replacing the Bottleneck block in the C2f module with a FasterNet block. The feature map in the SCB module is first processed by a CBS module, and then the output enters a Split layer. The SplitC2f module divides the feature map into two feature maps with the same number of channels. The output of each FasterNet block serves as the input to the next FasterNet block and is stored in a list. After three FasterNet blocks, all feature maps in the list are concatenated channel by channel.
[0061] It is worth noting that in the original YOLOv8, the large number of Bottleneck structures resulted in high computational overhead. However, this embodiment uses FasterNet blocks, which only perform convolution on a portion of the channels, thus reducing model complexity and optimizing the performance of deep neural networks.
[0062] Next, the CBS module in the third layer performs downsampling again, i.e., 8 times downsampling, and the 8 times downsampled feature map is input into the SCB module in the fourth layer for feature extraction.
[0063] Next, the feature map is downsampled again by the CBS module in the fifth layer, i.e., downsampled by 16 times. The downsampled feature map is then input into the SCB module in the sixth layer for feature extraction.
[0064] Next, the CBS module in the seventh layer performs downsampling again, i.e., 32x downsampling. The 32x downsampled feature map is then input into the SCB module in the eighth layer for feature extraction.
[0065] Finally, the feature map P5, downsampled by 32x, is used in the SPPF module of the ninth layer to improve the model's ability to capture contextual details.
[0066] In particular, the SPPF module consists of CBS and Maxpool operations, which enhance feature extraction by pooling information at multiple scales.
[0067] Step 202: Output the feature maps output by the fourth, sixth, and eighth SCB modules in the YOLOv8 Backbone to the Neck network, which are the 8x downsampled, 16x downsampled, and 32x downsampled feature maps after feature extraction by the SCB modules; and add a second SCB module, which is a large-size feature map after 4x downsampling, and output it to the Neck.
[0068] Step 3: Input the generated feature maps at different scales into the neck network and perform feature fusion using the scale sequence.
[0069] Step 301: Modify the connection method between the Backbone and the Neck, changing it from connecting the Backbone to the Neck via layers 4, 6, and 9 to connecting the Backbone to the Neck via layers 2, 4, 6, and 9.
[0070] Specifically, the feature map P5 output by the SPPF module of the ninth layer is first processed by a CBS module of the tenth layer after entering the neck network. The feature maps input to the Neck from the second, fourth, sixth and fourteenth layers are P2, P3, P4 and P5 feature maps, respectively.
[0071] Step 302: First, the feature maps of P3, P4, and P5 (8x downsampling, 16x downsampling, and 32x downsampling) are input into the first SAC (Scale Aware Concatenation) module for feature fusion to enhance the ability to capture detailed information of small targets.
[0072] The SAC module operates as follows: First, large, medium, and small feature maps are used as input. Adaptive max pooling and adaptive average pooling are performed on the large feature map, and the results of the two pooling are added together. Interpolation upsampling is performed on the small feature map. Finally, the processed large, medium, and small feature maps are concatenated along the channel dimension.
[0073] The SAC module not only adds a large-scale feature layer, but also performs differentiated processing on feature maps of different scales, which balances the preservation of details in feature maps with the extraction of global information, and avoids the loss of small target features during the upsampling process.
[0074] Preferably, in this embodiment, the formula expression for the SAC feature fusion module is:
[0075] ;
[0076] in, This indicates the output of the SAC module. , and These represent feature maps of large, medium, and small sizes, respectively. This indicates a max pooling operation. This indicates the average pooling operation. This indicates an interpolation upsampling operation. This indicates a splicing operation.
[0077] The feature map input from the SAC module is processed again by the SCB module. The P4 scale feature map output from the SCB module, along with the P2 and P3 scale feature maps, is then input into the second SAC module for further feature fusion. After processing by the SCB module, the P3 scale feature map is obtained and output to the P3 scale detection head for use by the P3 detection head.
[0078] Then, a downsampling operation is performed by a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampling result is then concatted with the feature map fused by the first SAC module. After processing by the SCB module, a P4-scale feature map is obtained and output to the P4-scale detection head for use by the P4 detection head.
[0079] The aforementioned feature map is then downsampled again using a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampled result is then concatenated with the feature map output by SPPF, and processed by the SCB module to obtain the P5-scale feature map, which is then output to the P5-scale detection head for use by the P5 detection head.
[0080] Step 303: To fully extract feature map information, in this embodiment, two C3DSF (Convolution 3D Scale Fusion) feature extraction modules are added to the Neck to capture the correlation between feature maps across scales. The input to the first C3DSF module is feature maps P3, P4, and P5, and the input to the second C3DSF module is feature maps P2, P3, and P4.
[0081] Specifically, feature maps P3, P4, and P5 are used as input to the first C3DSF module for feature extraction.
[0082] The specific feature extraction operation involves adjusting the large, medium, and small feature maps to the same number of channels, then using interpolation upsampling on the medium and small feature maps to adjust their size to match that of the large feature map. Next, the dimensions of the tensors of the large, medium, and small feature maps are expanded and concatenated. 3D convolution is used to extract features from the concatenated feature map. Then, the feature map passes through a normalization layer, an activation function layer, and a max pooling layer. Finally, the result of the above processing is compressed back to the previous dimension.
[0083] Compared to traditional 2D convolution, this embodiment performs more effective information fusion between feature layers of different scales, which can capture the correlation between scales and avoid the information loss or discontinuity problems caused by simple splicing.
[0084] Preferably, in this embodiment, the expression for the C3DSF feature extraction module is:
[0085] ;
[0086] in, , , This represents feature maps of three sizes with added 3D dimensions. This indicates a splicing operation. Represents 3D convolution. This indicates a batch normalization operation. This represents the Leaky ReLU activation function. This indicates a max pooling operation. This indicates a dimensionality reduction operation, where dim represents the dimension. In the formula, dim=2 corresponds to the third dimension (index starts from 0).
[0087] Step 304: Add the features extracted by the first C3DSF module and the feature map fused by the SAC module.
[0088] Considering that adding a third SAC module would utilize the feature map of layer P1, which would significantly increase the number of parameters and computational load, this embodiment chooses to fuse layer P2 through simple upsampling and Concat operations.
[0089] Next, an upsampling module and a Concat module are added. The P3-scale features are upsampled and fused, and then Concatted with the output of the SCB module in the second layer of the backbone. After being processed again by the SCB module, the feature maps P2, P3, and P4 are first input into the second C3DSF module for feature extraction, and then Added with the features processed by the SCB module to finally obtain the P2-scale feature map, which is output to the P2-scale detection head for use by the P2 detection head.
[0090] Step 4: Input the feature map after fusing the neck network features into the head network for classification and regression tasks.
[0091] Step 401: Modify the connection method between Neck and Head from three layers of feature maps P3, P4, and P5 to four layers of feature maps P2, P3, P4, and P5, and add a new feature map P2 (4x downsampling) scale detection head.
[0092] Step 402: Integrate group normalization into the CBS module. In this embodiment, BatchNormalization is replaced with GroupNormalization for improvement, and the improved module is named CGS.
[0093] Step 403: The feature map at scale P2 first undergoes further feature extraction through a separate CGS (Conv, GroupNormalization, SiLU) module, followed by two feature maps at scales P2, P3, P4, and P5. Figure 1 The CGS block, which shares parameters, is processed, and the features output by the CGS are finally output to the feature scales P2, P3, P4, and P5, respectively. Figure 1 The classification and regression heads, which share a 1×1 convolution, are decoupled for learning. Since sharing a single parameter can lead to inconsistent scales of the detected targets on the detection heads, the regression features are scaled using a scaling factor. Finally, the Bbox_loss and Cls_loss are calculated separately.
[0094] Step 404: The feature map at the P3 scale is first processed by a separate CGS module for further feature extraction, and then processed by two feature maps at the P2, P3, P4, and P5 scales. Figure 1 The CGS block, which shares parameters, is processed, and the features output by the CGS are finally output to the feature scales P2, P3, P4, and P5, respectively. Figure 1The classification and regression heads, which share a 1×1 convolution, are decoupled for learning. Since sharing a single parameter can lead to inconsistent scales of the detected targets on the detection heads, the regression features are scaled using a scaling factor. Finally, the Bbox_loss and Cls_loss are calculated separately.
[0095] Step 405: The feature map at scale P4 first undergoes further feature extraction through a separate CGS module, followed by two feature extraction steps involving scales P2, P3, P4, and P5. Figure 1 The CGS block, which shares parameters, is processed, and the features output by the CGS are finally output to the feature scales P2, P3, P4, and P5, respectively. Figure 1 The classification and regression heads, which share a 1×1 convolution, are decoupled for learning. Since sharing a single parameter can lead to inconsistent scales of the detected targets on the detection heads, the regression features are scaled using a scaling factor. Finally, the Bbox_loss and Cls_loss are calculated separately.
[0096] Step 406: The feature map at the P5 scale is first processed by a separate CGS module for further feature extraction, and then processed by two feature maps at the P2, P3, P4, and P5 scales. Figure 1 The CGS block, which shares parameters, is used for processing. The features output by the CGS are then output to the feature maps at scales P2, P3, P4, and P5, respectively. Figure 1 The classification and regression heads, which share a 1×1 convolution, are decoupled for learning. Since sharing a single parameter can lead to inconsistent scales of the detected targets on the detection heads, the regression features are scaled using a scaling factor. Finally, the Bbox_loss and Cls_loss are calculated separately.
[0097] In this embodiment, the head network enhances the feature consistency and detection performance of the model in multi-scale object detection by using a shared convolutional module. It also enables different scale detection heads to jointly optimize parameters during training through collaborative learning, effectively improving the robustness and generalization ability of feature extraction, thereby significantly improving the overall performance of the YOLO-LiteMax object detection network based on YOLOv8.
[0098] Step 5: Input the image of the drone to be detected into the trained YOLO-LiteMax object detection model to perform object detection and identify dense small targets in the image. The specific method is as follows:
[0099] Step 501: Input the image into the backbone network of the model and extract multi-scale feature maps.
[0100] Step 502: By using a small target scale sequence fusion network, features of different scales are fused to enhance the model's ability to detect targets at multiple scales.
[0101] Step 503: Apply the prediction head to feature maps at different scales to generate bounding boxes, class probabilities, and confidence scores.
[0102] Step 504 involves post-processing to filter predicted boxes with low confidence and suppress highly overlapping redundant boxes.
[0103] Step 505: Draw the detected target bounding boxes, category labels, and confidence scores on the original image to generate visualization results.
[0104] Furthermore, the YOLO-LiteMax object detection network based on YOLOv8 of this invention is compared with other YOLO series models, and the results are shown in Table 1 below:
[0105] Table 1. Results of the present invention YOLO-LiteMax compared to other YOLO series models.
[0106]
[0107] As can be seen, compared with other YOLO series models, the YOLO-LiteMax object detection network of this invention performs best in terms of precision, recall, mean precision at 0.5 cross-union ratio, and mean mean precision in the range of 0.5 to 0.95 cross-union ratio, while having the fewest parameters.
[0108] Furthermore, the YOLO-LiteMax object detection network based on YOLOv8 of this invention is compared with models from other classic neural network series, and the results are shown in Table 2 below:
[0109] Table 2 shows the results of this invention's YOLO-LiteMax compared to other classic models.
[0110]
[0111] As can be seen, the performance of the YOLO-LiteMax object detection network in this invention is far superior to other classic models.
[0112] In this embodiment of the invention, an electronic device is also provided, including: one or more processors; a storage device storing one or more programs thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement the UAV target detection method based on the YOLO-LiteMax neural network described in any of the above embodiments.
[0113] In this embodiment of the invention, a computer-readable storage medium is also provided, on which a computer program is stored. When the program is executed by a processor, it implements the steps in any of the UAV target detection methods based on the YOLO-LiteMax neural network in the above embodiments.
[0114] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for UAV target detection based on YOLO-LiteMax neural network, characterized in that, Includes the following steps: Step 1: Build a YOLO-LiteMax object detection model based on YOLOv8, and train the model by inputting training set images; Step 2: The input image is processed by the backbone network to extract features and generate feature maps of different scales. The backbone network includes several CBS modules, several selection convolutional blocks, and one SPPF module. The selection convolutional module replaces the Bottleneck block in the C2f module with a FasterNet block to reduce redundant information in the feature map. Step 3: Input the generated feature maps at different scales into the neck network and perform feature fusion using the scale sequence; the neck network performs differentiated processing on the feature maps at different scales, fuses local details and global information of multi-scale feature maps, and then highlights small target information by adding large-scale feature maps, and uses the feature extraction module to obtain local details of small targets; Step 4: Input the feature map after fusing the neck network features into the head network for classification and regression tasks; In the head network, the detection head uses group normalization and shared convolution to further extract features, shares information between features at different scales, and trains the classification and regression tasks separately through the decoupled head, and uses a scale factor to scale the feature map to obtain the trained YOLO-LiteMax object detection model. Step 5: Input the image of the drone to be detected into the trained YOLO-LiteMax target detection model to perform target detection and identify dense small targets in the image; In step 3 of the neck network, feature fusion is performed on feature maps of different scales, as follows: Step 301: Modify the connection method between the backbone network and the neck network. Instead of connecting the fourth, sixth, and ninth layers of the traditional YOLOv8 backbone network to the neck network, optimize the connection method to connect the second, fourth, sixth, and ninth layers of the backbone network to the neck network. In this case, the feature map P5 output by the SPPF module of the ninth layer will first undergo convolution processing through the CBS module of the tenth layer after entering the neck network. Step 302: The feature maps P3, P4 and the convolutionally processed feature map P5 are used as large, medium and small-sized feature maps, and input into the first SAC module for feature fusion. Differentiated processing is performed on feature maps of different scales to balance the preservation of details and extraction of global information in feature maps, and to avoid the loss of small target features during upsampling. The feature map output from the first SAC module is processed again through a selection convolution block. The feature map output from the selection convolution block, along with feature maps P2 and P3, is then input into the second SAC module to further fuse the features. After processing through the selection convolution block, the P3 scale feature map is obtained for use by the P3 detection head. The feature map output by the second SAC module is downsampled by a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampled result is then concatted with the feature map fused with the first SAC module. After selecting convolutional blocks for processing, a P4 scale feature map is obtained for use by the P4 detection head. The obtained feature map is then downsampled again by a CBS module consisting of convolutional kernels of size 3 and stride 2. The downsampled result is then concatenated with the feature map output by the tenth layer CBS module. After processing by selecting convolutional blocks, the P5 scale feature map is obtained for use by the P5 detection head. Step 303: Add two C3DSF feature extraction modules to the neck network to capture the correlation between feature maps across scales. Input feature maps P3, P4, and P5 into the first C3DSF feature extraction module to fully extract feature map information. Step 304: Add the features extracted by the first C3DSF feature extraction module and the feature map fused by the second SAC module. Add an upsampling module and a Concat module. Fuse the P3 scale feature map through upsampling and Concat the output of the second layer selection convolution block in the backbone network. After processing by the selection convolution block again, input the feature maps P2, P3, and P4 into the second C3DSF feature extraction module for feature extraction. Then add the features with the features processed by the selection convolution block to obtain the P2 scale feature map for use by the P2 detection head. In the C3DSF feature extraction module, large, medium, and small feature maps are adjusted to have the same number of channels. Interpolation upsampling is applied to the medium and small feature maps to adjust the feature map size to the size of the large feature map. The dimensions of the tensors of large, medium, and small feature maps are expanded and concatenated. 3D convolution is used to extract features from the concatenated feature map. After passing through a normalization layer, an activation function layer, and a max pooling layer, the processing result is compressed to the dimension of the input. The C3DSF feature extraction module uses the following feature extraction expression: ; in, , , This represents feature maps of three sizes with added 3D dimensions. This indicates a splicing operation. Represents 3D convolution. This indicates a batch normalization operation. express Activation function This indicates a max pooling operation. This indicates a dimensionality reduction operation. Indicates dimension.
2. The UAV target detection method based on YOLO-LiteMax neural network according to claim 1, characterized in that, In step 2, each CBS module consists of a convolutional kernel with a size of 3 and a stride of 2, a batch normalization layer, and a SiLU activation function; Each selected convolutional block includes a CBS module, a Split layer, and three sequentially connected FasterNet blocks. Each FasterNet block performs convolution on only a portion of the channels. The output of each FasterNet block serves as the input to the next FasterNet block and is stored in a list. After three FasterNet blocks, all feature maps in the list are concatenated by channel. The SPPF module consists of CBS and Maxpool operations, which enhance the feature extraction capability of the backbone network by pooling information at multiple scales.
3. The UAV target detection method based on YOLO-LiteMax neural network according to claim 2, characterized in that, In step 2, the target object image undergoes feature extraction via the backbone network, as follows: Step 201: The input image is downsampled twice by two CBS modules, the zeroth layer and the first layer, to obtain a 4x downsampled feature map, which is then used for convolution in the second layer. In the second layer of the selected convolutional block, the 4x downsampled feature map is first processed by a CBS module, and the output enters a Split layer. The Split layer divides the feature map into two feature maps with the same number of channels, and then passes through 3 FasterNet blocks for feature extraction to obtain a large-size feature map P2 after 4x downsampling. The feature map P2, which is downsampled by 4 times, is passed through the third layer CBS module and downsampled by 8 times. Then it is input into the fourth layer selected convolutional block for feature extraction to obtain the feature map P3 after downsampling by 8 times. After passing through the fifth CBS module and undergoing a 16x downsampling, the data is input into the sixth layer selected convolutional block for feature extraction, resulting in the 16x downsampled feature map P4. After passing through the seventh layer CBS module and undergoing 32x downsampling, the data is input into the eighth layer selected convolutional block for feature extraction, resulting in the 32x downsampled feature map P5. The feature map P5 is then passed through the ninth layer SPPF module to improve the YOLO-LiteMax object detection network's ability to capture contextual details. Step 202: Output the 8x downsampled feature map P3, 16x downsampled feature map P4, 32x downsampled feature map P5, and 4x downsampled feature map P2 to the Neck network.
4. The UAV target detection method based on YOLO-LiteMax neural network according to claim 1, characterized in that, In the SAC module, adaptive max pooling and adaptive average pooling are performed on the large-size feature map, the results of the two pooling are added together, interpolation upsampling is performed on the small-size feature map, and then the processed large, medium and small-size feature maps are stitched together in the channel dimension. The feature fusion expression for the SAC module is as follows: ; in, This indicates the output of the SAC module. , and These represent feature maps of large, medium, and small sizes, respectively. This indicates a max pooling operation. This indicates the average pooling operation. This indicates an interpolation upsampling operation. This indicates a splicing operation.
5. The UAV target detection method based on YOLO-LiteMax neural network according to claim 1, characterized in that, In step 4, the head network performs classification and regression tasks as follows: Step 401: Modify the connection method between the neck network and the head network. Add a P2 scale detection head and connect the traditional YOLOv8 neck network's three-layer scale feature maps (P3, P4, P5) to the head network. Modify it so that the neck network's four-layer scale feature maps (P2, P3, P4, P5) are connected to the head network. Step 402: Integrate group normalization into the head network CBS module, and replace BatchNormalization with GroupNormalization to obtain the improved CGS module; Step 403: The P2 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P2 scale feature map are calculated respectively. Step 404: The P3 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P3 scale feature map are calculated respectively. Step 405: The P4 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P4 scale feature map are calculated respectively. Step 406: The P5 scale feature map is first processed by an independent CGS module for further feature extraction, and then processed by two CGS modules that share parameters with the P2, P3, P4, and P5 scale feature maps. The features output by the CGS modules are output to the classification head and regression head of the 1×1 convolution shared by P2, P3, P4, and P5 for decoupled learning. The regression features are scaled by the scale factor, and the Bbox_loss and Cls_loss of the P5 scale feature map are calculated respectively.
6. The UAV target detection method based on YOLO-LiteMax neural network according to claim 5, characterized in that, The Bbox_loss and Cls_loss of the obtained P2, P3, P4, and P5 scale feature maps are used. The regression loss Bbox_loss is used to optimize the position and size of the predicted bounding box to ensure that the object is accurately located; the classification loss Cls_loss is used to improve the accuracy of category recognition to ensure that the object category is correctly classified. By minimizing these two losses at the same time, the YOLO-LiteMax object detection network achieves a balance between localization and classification. By constructing a CGS module in the head network and applying shared convolution, the feature consistency and detection performance of the YOLO-LiteMax object detection network in multi-scale object detection are enhanced. Furthermore, through collaborative learning, different scale detection heads jointly optimize parameters during training, thereby improving the robustness and generalization ability of feature extraction.
7. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the UAV target detection method based on the YOLO-LiteMax neural network as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps in the UAV target detection method based on the YOLO-LiteMax neural network as described in any one of claims 1 to 6.