Lightweight unmanned aerial vehicle aerial image detection method

By introducing MSCB blocks, EUCB convolution blocks, weighted feature fusion blocks and group convolution kernel parameter sharing detection heads into the YOLOv8 network, the balance between detection accuracy and lightweight in drone target detection is solved, and efficient target detection performance is achieved.

CN119810693AInactive Publication Date: 2025-04-11XIHUA UNIV

Patent Information

Application Number
CN202411875789.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing drone object detection algorithms are difficult to balance between detection accuracy and lightweight, resulting in computing complexity and real-time problems when deploying applications on drone platforms.

Method used

By introducing MSCB blocks to replace Bottleneck in the neck structure of the YOLOv8 network, the convolution blocks on the EUCB are constructed in combination with deep convolution and ordinary convolution cascades, and the information is fusion using weighted feature fusion blocks, and the convolution kernel parameter sharing detection head is designed through shared convolution and group normalization to form the improved YOLOv8 network structure.

Benefits of technology

While reducing the amount of model parameters and calculations, this method effectively improves detection performance, improves the model's sensitivity to complex backgrounds and detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810693A_ABST
    Figure CN119810693A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight unmanned aerial vehicle aerial image detection method, and relates to the field of unmanned aerial vehicle target detection. The implementation method comprises the following steps: acquiring an aerial image data set of an unmanned aerial vehicle, and preprocessing the data set; yOLOv8 is used as a basic network, an original PAFPN neck network is replaced by an efficient multi-scale dynamic weighted feature fusion pyramid network (EMDFPN), and the EMDFPN comprises a C2fMSCB block formed by improving Bottleneck in C2f through an MSCB block, an efficient upper convolution block EUCB and a weighted feature fusion block. Then, a group convolution kernel parameter sharing detection head (CPSD) is designed by utilizing a sharing convolution idea to replace an original decoupling head; and finally, training by using the improved YOLOv8 network to obtain a lightweight small target detection deep learning model. Inputting a to-be-detected image into the model for detection to obtain a target detection result; according to the invention, rapid and accurate identification of the small target of the unmanned aerial vehicle is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision target detection, and in particular to a method for detecting small targets in lightweight unmanned aerial vehicle aerial images based on improved YOLOv8. Background Art

[0002] UAV small target detection is an important research direction in the field of computer vision and artificial intelligence, and is mainly used in multiple application scenarios such as military, disaster relief, environmental monitoring and precision agriculture. With the continuous development of UAV technology, especially the popularity of small UAVs, the demand for small target detection is increasing. In the military, UAVs can monitor enemy dynamics in real time, accurately locate small mobile targets, and improve combat efficiency. In disaster relief, rapid identification of trapped people and assessment of disaster-stricken areas can significantly improve rescue efficiency and effectiveness. In environmental monitoring, drones are used to monitor wild animals, plants and pollution sources to provide important data support, while in the agricultural field, precision agricultural management is achieved by detecting crop growth and pests and diseases.

[0003] With the rapid development of deep learning technology, drone target detection algorithms based on deep learning have made significant progress in recent years, mainly divided into single-stage and two-stage target detection methods. Two-stage methods, such as Faster R-CNN, first generate candidate regions, and then classify and regress these regions. They usually show higher accuracy in complex scenes, but the computational overhead is large and the speed is relatively slow. Single-stage methods, such as YOLO, directly realize the positioning and classification of targets through a neural network, have faster processing speeds, and are more suitable for real-time applications on drone platforms. However, due to the low resolution of images taken by drones, the features of small targets in the images are not obvious enough, making it difficult for target recognition algorithms to accurately identify them.

[0004] At present, there are many methods to improve the detection accuracy of the model based on YOLO, but it is difficult for existing algorithms to strike a balance between detection accuracy and lightweight. The invention patent with publication number CN118470576A discloses a small target detection method for drone images. By introducing spatial depth conversion convolution to extract multi-scale image features, a fast spatial pyramid pooling module is used to process multi-scale image features to obtain small target image features; based on the backbone network, the drone small target image features are processed to obtain drone small target image feature maps of different depth dimensions, and the obtained drone small target image feature maps are spliced ​​along the depth dimension to obtain the target detection result. Although the spatial depth conversion convolution in this method can effectively improve the detection accuracy of small targets, it also increases the computational overhead, resulting in low real-time detection.

[0005] The invention patent with publication number CN117557774A discloses a method for detecting small targets in drone images based on improved YOLOv8. By introducing the backbone network ITNet, using dynamic convolution ODConv to replace Conv convolution, using the neck module SGFPN, introducing the feature fusion module CSF, using the CARAFE upsampling method to replace the nearest neighbor sampling, and using the improved YOLOv8 network structure as the drone image recognition network, a deep learning model for drone small target recognition and detection is obtained through training. The disadvantage of this method is that the added small target detection head and feature fusion module CSF have a high number of parameters and computational complexity, making it difficult to deploy applications on drone platforms. Summary of the invention

[0006] In order to solve the problems of low accuracy and excessive model size in UAV target detection, the present invention provides a lightweight UAV aerial image detection method.

[0007] In order to solve the above technical problems, the specific implementation steps of a lightweight UAV aerial image detection method of the present invention are as follows:

[0008] A lightweight UAV aerial image detection method.

[0009] S1. Obtain a dataset of drone aerial images and preprocess the dataset to obtain dataset images for training;

[0010] S2. Using YOLOv8 as the basic network, the neck structure of the improved YOLOv8 network introduces the MSCB block to replace the Bottleneck in C2f to form the C2f_MSCB block; and uses the deep convolution and ordinary convolution cascade to construct the EUCB convolution block; the weighted feature fusion block fuses the shallow and deep network information flows to obtain a multi-scale fusion feature map; then the above module is combined with CBS to perform channel adjustment and downsampling to form EMDFPN;

[0011] S3. Then, a group convolution kernel parameter sharing detection head (CPSD) was designed using the shared convolution and group normalization ideas to replace the original decoupling head, and the improved YOLOv8 network structure was obtained.

[0012] S4, inputting the training data set image obtained in step S1 into the improved YOLOv8 network obtained in step S3, setting initial training parameters, and obtaining a deep learning model for drone aerial image detection through training;

[0013] S5. Input the drone aerial image to be detected into the model obtained in step S4 for detection to obtain a target detection result.

[0014] In any of the above solutions, preferably, the specific implementation method of step S1 comprises the following steps:

[0015] S11. Obtain the drone aerial image dataset VisDrone2019, convert the acquired images into different formats, and finally obtain dataset images in YOLO format.

[0016] S12, dividing the YOLO format dataset images into a training set, a validation set, and a test set;

[0017] S13. The training set is enhanced by using the Mosaic data enhancement method to obtain enhanced training set images, and the resolution of the enhanced images is adjusted to 640×640.

[0018] In any of the above solutions, preferably, the improved YOLOv8 network neck structure in step S2 is constructed by the following method:

[0019] S21, use the MSCB block constructed by cascading MSDC and CBS to replace the Bottleneck in C2f to form C2f_MSCB block;

[0020] S22, cascade the depth convolution and the ordinary convolution to construct the EUCB upper convolution block;

[0021] S23, constructing a weighted feature fusion block by means of fast normalization fusion;

[0022] S24. Use the weighted feature fusion block to fuse the information from C2f_MSCB, EUCB and CBS and combine it with multi-branch auxiliary connections to obtain EMDFPN.

[0023] In any of the above solutions, preferably, the group convolution kernel parameter sharing detection head in step S3 is constructed by the following method:

[0024] S31, use group normalization instead of batch normalization and cascade with ordinary convolution and SiLU activation function to construct CGS;

[0025] S32, sharing the convolution kernel parameters of two groups of 3×3 large kernel convolutions between branches to form a parameter-sharing convolution kernel;

[0026] S33. Multiply the image of the input bounding box loss function by the scaling factor to obtain a feature map that can be dynamically scaled.

[0027] In any of the above schemes, preferably, in step S5: using the improved YOLOv8 network model to perform target detection on the test set, generating an image containing a detection frame and comparing it with the original model in combination with the evaluation index to obtain a target detection result.

[0028] The beneficial effects of the above technical solution are: the improved YOLOv8 network described in the present invention, by introducing the MSCB block in the basic model to replace the Bottleneck in C2f to form the C2f_MSCB block, strengthens the network feature extraction capability, so that the network can more effectively capture target features at multiple scales; and uses deep convolution and ordinary convolution cascade to construct the EUCB convolution block, reduces the information loss in the upsampling process, and ensures that the feature map passed to the subsequent layer has higher quality; the weighted feature fusion block fuses the shallow and deep network information flows to obtain a multi-scale fusion feature map, which can enhance the feature expression capability and reduce information redundancy, making the model more sensitive when processing complex backgrounds; then the above module is combined with CBS to perform full-size channel adjustment and downsampling to form EMDFPN, ​​and the new feature pyramid network has lower parameter amount and computational complexity; then a group convolution kernel parameter sharing detection head (CPSD) is designed using the shared convolution and group normalization ideas to replace the original decoupling head, further reducing the weight of the model. The improved network can effectively improve the detection performance with a significant reduction in parameter amount and computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 The overall execution flow chart of the present invention is

[0030] Figure 2 This is the label distribution diagram of the data set used in this invention

[0031] Figure 3 This is the overall architecture diagram of the improved YOLOv8 network described in the present invention

[0032] Figure 4 This is a visualization diagram of the model training process of the present invention.

[0033] Figure 5 The schematic diagram of the structure of C2f_MSCB of the present invention is

[0034] Figure 6 The structural diagram of EUCB of the present invention is

[0035] Figure 7 The schematic diagram of the structure of the CPSD of the present invention is

[0036] Figure 8 This is a comparison chart of evaluation indicators before and after the improvement of the present invention

[0037] Fig. 9 This is the detection effect diagram of the present invention DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] The embodiment of the present invention discloses a lightweight UAV aerial image detection method, such as Figure 1 As shown, the method comprises the following steps:

[0040] S1. Obtain a dataset of drone aerial images and preprocess the dataset to obtain dataset images for training. The label distribution in the dataset is as follows: Figure 2 As shown;

[0041] S2, using YOLOv8 as the basic network, the model size is s, the neck structure of the improved YOLOv8 network introduces the MSCB block to replace the Bottleneck in C2f to form the C2f_MSCB block; and uses the deep convolution and ordinary convolution cascade to construct the EUCB convolution block; the weighted feature fusion block fuses the shallow and deep network information flows to obtain a multi-scale fusion feature map; then the above module is combined with CBS to perform channel adjustment and downsampling to form EMDFPN;

[0042] S3. Then, using the idea of ​​shared convolution and group normalization, a group convolution kernel parameter sharing detection head (CPSD) was designed to replace the original decoupling head, and the improved YOLOv8 network structure was obtained. The specific structure is as follows: Figure 3 As shown;

[0043] S4, input the training dataset image obtained in step S1 into the improved YOLOv8 network obtained in step S4, set the initial training parameters, and obtain a deep learning model for drone aerial image detection through training. The visualization results of the training process are as follows: Figure 4 As shown;

[0044] S5. Input the drone aerial image to be detected into the model obtained in step S4 for detection to obtain a target detection result.

[0045] The following is a detailed description of the above steps based on the specific content:

[0046] The specific implementation method of step S1 includes the following steps:

[0047] S11. Obtain the drone aerial image dataset VisDrone2019, convert the acquired images into different formats, and finally obtain dataset images in YOLO format.

[0048] S12, dividing the YOLO format dataset images into a training set, a validation set, and a test set;

[0049] S13. The training set is enhanced by using the Mosaic data enhancement method to obtain enhanced training set images, and the resolution of the enhanced images is adjusted to 640×640.

[0050] The improved YOLOv8 network neck structure in step S2 is constructed by the following method:

[0051] S21, use the MSCB block constructed by cascading MSDC and CBS to replace the Bottleneck in C2f to form C2f_MSCB block;

[0052] S22, cascade the depth convolution and the ordinary convolution to construct the EUCB upper convolution block;

[0053] S23, constructing a weighted feature fusion block by means of fast normalization fusion;

[0054] S24. Use the weighted feature fusion block to fuse the information from C2f_MSCB, EUCB and CBS and combine it with multi-branch auxiliary connections to obtain EMDFPN.

[0055] The group convolution kernel parameter sharing detection head in step S3 is constructed by the following method:

[0056] S31, use group normalization instead of batch normalization and cascade with ordinary convolution and SiLU activation function to construct CGS;

[0057] S32, sharing the convolution kernel parameters of two groups of 3×3 large kernel convolutions between branches to form a parameter-sharing convolution kernel;

[0058] S33. Multiply the image of the input bounding box loss function by the scaling factor to obtain a feature map that can be dynamically scaled.

[0059] Furthermore, the format conversion in step S11 refers to converting the annotation file in JSON format into a annotation file in TXT format that can be used in YOLO.

[0060] Furthermore, in step S12, the data set is divided into a ratio of training set: validation set: test set = 7:1:2.

[0061] Furthermore, the Mosaic data enhancement method in step S13 refers to randomly selecting four images from different scenes and splicing them into a new synthetic image; this process first crops each image to the same size, and then splices them in a 2x2 layout to form an image containing diverse backgrounds and targets.

[0062] The above describes in detail the specific preprocessing method of the data set.

[0063] Furthermore, the method for constructing MSCB in step S21 comprises the following steps:

[0064] For the input tensor x1, the convolution kernel size list is {k1, k2, k3}. There are 3 groups of convolution kernel lists in the neck network (Neck) structure of the present invention, and the sizes are {1, 3, 5}, {3, 5, 7} and {5, 7, 9} respectively. The use of convolution kernels of different sizes can simultaneously capture features of small, medium and large scales, better retain context information, and improve the performance of the model; apply deep convolution operation to the input tensor:

[0065] y i =DWCBS(x1)i=1,2,3

[0066] where y i is to apply the i-th convolution kernel size k i The output after DWCBS (specific structure as Figure 5 As shown in (), it represents a deep convolution block, including deep convolution, batch normalization and SiLU activation function; the formula for batch normalization is as follows:

[0067] Given a batch of data {x1,x2,…,x m}, the normalized output It can be expressed as:

[0068]

[0069] The mathematical formula of SiLU activation function is as follows:

[0070]

[0071] Then the output {y1, y2, y3} after the depth convolution is summed to get y out :

[0072]

[0073] Finally, for y out The channels are shuffled between groups to form MSDC blocks. The specific structure is as follows: Figure 5 shown.

[0074] CBS blocks are added before and after MSDC and residual connections are introduced to form MSCB. The process can be described as:

[0075] MSCB(x2)=x2+CBS(MSCD(CBS(x2)))

[0076] Where x2 is the tensor in the input MSCB, and CBS represents the convolution block, including 1×1 ordinary convolution, batch normalization, and SiLU activation function. The schematic diagram of CBS and MSCB structure is shown in Figure 5 shown.

[0077] The MSCB module can effectively extract features of different scales by combining multiple convolution kernel sizes, thus enhancing the model's expressiveness. Its extended channel strategy and jump connection help alleviate the gradient vanishing problem and improve information transmission efficiency. In addition, MSCB promotes interoperability between features through flexible feature fusion and channel shuffling operations, thus improving the overall performance and computational efficiency of the network.

[0078] Furthermore, the method for constructing EUCB in step S22 comprises the following steps:

[0079] Use UpSample with a scale factor of 2 to upsample the feature map. The UpSample operation increases the resolution of the feature map through interpolation technology. The scale factor refers to the magnification of the spatial dimension of the feature map (the height and width of the feature map) after the operation. Therefore, the present invention uses the upsampling operation to double the feature map so as to better combine information of different scales in the feature fusion stage; then extract features by applying a 3×3 deep convolution block DWCBS and channel shuffling, and then use batch normalization and SiLU activation to enhance the upsampled feature map. Finally, use a 1×1 normal convolution to adjust the number of channels to match the next stage. The above process can be described as:

[0080] EUCB(x)=Conv(SiLU(BN(CS(DWCBS(Up(x))))))

[0081] Where x is the tensor input to the module, Up represents the upsampling operation, CS represents the channel shuffle operation, and the EUCB structure is as follows Figure 6 shown.

[0082] The EUCB module significantly improves the resolution of feature maps and the operating efficiency of the model through efficient upsampling and depthwise separable convolution. Its channel shuffle operation enhances the information exchange between features and reduces the risk of model overfitting.

[0083] Furthermore, in step S23, a weighted feature fusion block is constructed (in Figure 3 The method represented as WeightedFeature Fusion in consists of the following steps:

[0084] For n feature maps of the same size, the feature fusion method can be expressed by the following formula:

[0085]

[0086] where w i (w i ≥0) represents the weight coefficient corresponding to the i-th feature map. In addition, the weight coefficient needs to be quickly normalized. The formula is as follows:

[0087]

[0088] in, is the weight value corresponding to each feature map when it is not normalized, n is the number of feature maps that need to be fused, and ξ is a small value (here 0.0001) to avoid numerical instability; in addition, in order to ensure Need to be in each Then apply the Relu activation function, the formula of which is as follows:

[0089] Relu(x)=max(0,x)

[0090] If x>0, output x, otherwise output 0.

[0091] The feature fusion module described above fuses feature maps from different scales by weighted fusion. The model can effectively integrate multi-level information and adjust the importance of different feature maps according to adaptive weights, thereby improving the ability to understand complex scenes.

[0092] Furthermore, the method for constructing EMDFPN in step S24 is as follows:

[0093] The four feature maps of different sizes (160×160, 80×80, 40×40, 20×20) output from the backbone network are adjusted in full-size channels. The present invention sets the channel sizes of the feature maps input to the neck network to 256, and then combines the CBS downsampling convolution block with a convolution kernel size of 3×3 and a step size of 2 and the weighted feature fusion block to perform multi-scale feature fusion on the information from the EUCB upsampling convolution block and the C2f_MSCB module to form the EMDFPN. The specific structure is as follows: Figure 3 As shown in the Neck part of . The network achieves effective multi-scale feature capture. By integrating features of different scales, EMDFPN can not only capture rich local details, but also obtain comprehensive contextual information, improving the model's ability to understand complex scenes.

[0094] Furthermore, the construction method of CGS in step S31 is as follows:

[0095] Use group normalization instead of batch normalization and cascade with ordinary convolution and SiLU activation function to build CGS (structure as Figure 7As shown), the ordinary convolution used contains two convolution kernels of different sizes, including 1×1 and 3×3, and the group normalization formula is as follows:

[0096] For the input feature map x∈R N×C×H×W , where N is the batch size, C is the number of channels, H and W are the height and width of the feature map, and the number of channels C is divided into G groups, each group contains C' = C / G channels. For each group g (g = 1, 2, ..., G), calculate its mean u g and variance σ g 2 :

[0097]

[0098] After normalization, we get

[0099]

[0100] Here ε is a small constant to prevent division by zero errors.

[0101] In the task of detecting small drone targets, group normalization is more advantageous than batch normalization because it does not depend on the batch size and can maintain the stability and consistency of features on small batches of data. This normalization method is calculated in the channel dimension, which helps to better extract subtle features, thereby improving the detection performance of the model.

[0102] Furthermore, the convolution kernel parameter sharing principle in step S32 is as follows:

[0103] For input feature maps x1 and x2, the convolution kernel K of size k×k, the parameter shared convolution can be expressed as follows:

[0104]

[0105] Where y1(i,j) and y2(i,j) are the values ​​of position (i,j) in the output feature map, K(m,n) is the weight of position (m,n) in the convolution kernel K (the weight is shared in the above two equations), and x1(i+m,j+n) and x2(i+m,j+n) are the values ​​of position (i+m,j+n) in the input feature map x.

[0106] Convolution kernel parameter sharing can significantly reduce the number of model parameters, thereby reducing memory usage and computational complexity, and improving training and reasoning efficiency. It enables the model to capture the translation invariance of local features, promote feature reuse, and improve the generalization ability of the model.

[0107] Furthermore, the specific implementation method of step S33 is as follows:

[0108] Suppose the input image is I, its pixel value can be expressed as I(x,y), where (x,y) is the coordinate of the pixel. The feature map I'(x,y) after scaling factor adjustment is obtained by the following formula:

[0109] I'(x,y)=Scale·I(x,y)

[0110] Among them, Scale is the scaling factor, the initial value is set to 1, the type is a 32-bit floating point number, and it can be updated during the back propagation process of the neural network to achieve the purpose of dynamically adjusting the input feature map.

[0111] The three feature maps of different sizes output from the neck network are passed through two branches through a 1×1 CGS and two 3×3 parameter sharing CGS and combined with the scaling factor and loss function to obtain the CPSD. The structure is as follows: Figure 7 shown.

[0112] Furthermore, the network training in step S4 includes the following steps:

[0113] Set the initial training parameters of the model: the training cycle is 300, the initial learning rate is 0.01, the weight decay is set to 0.0005, the optimizer selects SGD, the batch size is 16, the input image is resized to 640X640, the momentum is set to 0.932, the Mosaic data enhancement Boolean type is True, and it is turned off in the last 10 cycles.

[0114] The training dataset images obtained in step S1 are input into the improved YOLOv8 network obtained in step S4 for training, and CIoU is used to calculate the bounding box regression loss, the binary cross entropy loss is used to calculate the target confidence loss, and the multi-classification cross entropy loss is used to calculate the classification loss. Back propagation is performed to update the weight parameters, and a deep learning model for drone small target detection is obtained through training.

[0115] In order to evaluate the performance of the model, the evaluation indicators mean average precision (mAP), parameter amount and calculation amount are introduced. The mean average precision is calculated as follows:

[0116]

[0117] Among them, n represents the number of categories, AP i represents the AP of the i-th category, P represents the precision, and R represents the recall. The calculation formulas of P and R are as follows:

[0118]

[0119] Among them, T / F stands for true / false, indicating whether the prediction is correct, and P / N stands for positive / negative, indicating whether the prediction is positive or negative.

[0120] The number of model parameters refers to the total number of learnable parameters in the network, including weights and biases. The number of parameters reflects the complexity and expressiveness of the model.

[0121] The amount of computation refers to the computing resources required to perform a forward inference; the amount of computation reflects the efficiency of the model during inference or training.

[0122] Furthermore, in step S5: the improved YOLOv8 network model is used to perform target detection on the test set, an image containing a detection frame is generated and compared with the original model in combination with the evaluation index. The comparison results are as follows: Figure 8 and Fig. 9 As shown, from Figure 8 It can be seen that the present invention reduces the number of model parameters by 39%, the amount of calculation by 19%, and the average accuracy by 1.3%. Fig. 9 It can be seen that the improved model of the present invention has a good detection effect.

[0123] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation manner. Any other implementation manners derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.

[0124] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.

Claims

1. A lightweight UAV aerial image detection method, characterized in that: include: S1. Obtain a dataset of drone aerial images and preprocess the dataset to obtain dataset images for training; S2. Using YOLOv8 as the basic network, the neck structure of the improved YOLOv8 network introduces the MSCB block to replace the Bottleneck in C2f to form the C2f_MSCB block; and uses the deep convolution and the ordinary convolution cascade to construct the EUCB upper convolution block; The weighted feature fusion block fuses the shallow and deep network information flows to obtain a multi-scale fusion feature map; then the above module is combined with CBS to perform channel adjustment and downsampling to form EMDFPN; S3. Then, a group convolution kernel parameter sharing detection head (CPSD) was designed using the shared convolution and group normalization ideas to replace the original decoupling head, and the improved YOLOv8 network structure was obtained. S4, inputting the training data set image obtained in step S1 into the improved YOLOv8 network obtained in step S3, setting initial training parameters, and obtaining a deep learning model for drone aerial image detection through training; S5. Input the drone aerial image to be detected into the model obtained in step S4 for detection to obtain a target detection result.

2. The lightweight UAV aerial image detection method according to claim 1, characterized in that: The specific implementation method of step S1 includes the following steps: S11. Obtain the drone aerial image dataset VisDrone2019, convert the acquired images into different formats, and finally obtain dataset images in YOLO format. S12, dividing the YOLO format dataset images into a training set, a validation set, and a test set; S13. The training set is enhanced by using the Mosaic data enhancement method to obtain enhanced training set images, and the resolution of the enhanced images is adjusted to 640×640.

3. A lightweight UAV aerial image detection method as claimed in claim 1, characterized in that: The improved YOLOv8 network neck structure in step S2 is constructed by the following method: S21, use the MSCB block constructed by cascading MSDC and CBS to replace the Bottleneck in C2f to form C2f_MSCB block; S22, cascade the depth convolution and the ordinary convolution to construct the EUCB upper convolution block; S23, constructing a weighted feature fusion block by means of fast normalization fusion; S24. Use the weighted feature fusion block to fuse the information from C2f_MSCB, EUCB and CBS and combine it with multi-branch auxiliary connections to obtain EMDFPN.

4. A lightweight UAV aerial image detection method according to claim 3, characterized in that: The method for constructing MSCB in step S21 comprises the following steps: Assuming the input tensor x1, given the convolution kernel size list {k1, k2, k3}, apply the depthwise convolution operation to the input tensor: y i =DWCBS(x1)i=1,2,3 where y i is to apply the i-th convolution kernel size k i The output after, DWCBS represents the deep convolution block, including deep convolution, batch normalization and SiLU activation function; Then sum the outputs {y1, y2, y3} to get y out : Finally, for y out The channels are shuffled between groups via channel shuffle to form the MSDC block. Add CBS blocks before and after MSDC and introduce residual connections to form MSCB: MSCB(x2)=x2+CBS(MSCD(CBS(x2))) Where x2 is the tensor in the input MSCB, and CBS represents the convolution block, including ordinary convolution, batch normalization, and SiLU activation function.

5. The lightweight UAV aerial image detection method according to claim 3 is characterized in that: The method for constructing EUCB in step S22 comprises the following steps: UpSample with a scaling factor of 2 is used to upsample the feature map. Then features are extracted by applying a deep convolution block DWCBS and channel shuffling, followed by batch normalization and SiLU activation to enhance the upsampled feature map. Finally, ordinary convolution is used to adjust the number of channels to match the next stage. The above process can be described as: EUCB(x)=Conv(SiLU(BN(CS(DWCBS(Up(x)))))) Where x is the tensor input to the module, Up represents the upsampling operation, and CS represents the channel shuffle operation.

6. A lightweight UAV aerial image detection method according to claim 3, characterized in that: The method for constructing the weighted feature fusion block in step S23 comprises the following steps: Given n feature maps of the same size, the feature fusion method can be expressed as follows: where w i (w i ≥0) represents the weight coefficient corresponding to the i-th feature map.

7. A lightweight UAV aerial image detection method as claimed in claim 1, characterized in that: The group convolution kernel parameter sharing detection head in step S3 is constructed by the following method: S31, use group normalization instead of batch normalization and cascade with ordinary convolution and SiLU activation function to construct CGS; S32, sharing the convolution kernel parameters of the two groups of 3X3 large kernel convolutions between branches to form a parameter-sharing convolution kernel; S33. Multiply the image of the input bounding box loss function by the scaling factor to obtain a feature map that can be dynamically scaled.

8. A lightweight UAV aerial image detection method according to claim 7, characterized in that: The convolution kernel parameter sharing principle in step S32 is as follows: For input feature maps x1 and x2, the convolution kernel K of size k×k, the parameter shared convolution can be expressed as follows: Where y1(i,j) and y2(i,j) are the values ​​of position (i,j) in the output feature map, K(m,n) is the weight of position (m,n) in the convolution kernel K (the weight is shared in the above two equations), and x1(i+m,j+n) and x2(i+m,j+n) are the values ​​of position (i+m,j+n) in the input feature map x.

9. A lightweight UAV aerial image detection method according to claim 7, characterized in that: The specific implementation method of step S33 is as follows: Suppose the input image is I, its pixel value can be expressed as I(x,y), where (x,y) is the coordinate of the pixel. The feature map I'(x,y) after scaling factor adjustment is obtained by the following formula: I'(x,y)=Scale·I(x,y) Among them, Scale is the scaling factor, the initial value is set to 1, the type is a 32-bit floating point number, and it can be updated during the back propagation process of the neural network to achieve the purpose of dynamically adjusting the input feature map.

10. The lightweight drone aerial image detection method according to claim 1, characterized in that: In step S5: use the improved YOLOv8 network model to perform target detection on the test set, generate an image containing a detection frame, and compare it with the original model in combination with the evaluation index to obtain the target detection result.

Citation Information

Patent Citations

  • Unmanned aerial vehicle image small target detection method based on improved YOLOv8

    CN117557774A

  • Small target detection method and system for unmanned aerial vehicle image

    CN118470576A

  • Road damage detection method based on improved YOLOv8

    CN118521869A

Cited By

  • Electric control part appearance detection method and device based on deep learning

    CN120198439A

  • Unmanned aerial vehicle image recognition method and device based on YOLOv8 lightweight network model

    CN120564083A

  • Unmanned aerial vehicle target detection and tracking method

    CN121170655A

  • Flame detection method for intelligent operation and maintenance fire-fighting inspection robot

    CN121582548A