A small drone intrusion detection method based on improved YOLOv8

By introducing the SPD-Conv layer and the DP-MobileNetv3 layer into the YOLOv8 network model, the problem of excessive model parameters and calculation complexity in drone intrusion detection is solved, and high-precision and efficient detection effects are achieved.

CN119295743BActive Publication Date: 2025-02-25CIVIL AVIATION FLIGHT UNIV OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411815495.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-02-25
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

The prior art is difficult to reduce the number of parameters and calculation complexity of the model while maintaining high detection accuracy in drone intrusion detection, resulting in difficulty in deploying on edge devices.

Method used

Using the improved YOLOv8 network model, the number of parameters and computational complexity of the model is reduced by introducing space to deep convolution (SPD-Conv layer) and DP-MobileNetv3 layer, while retaining the details of the small target of the drone.

Benefits of technology

It realizes that while maintaining efficient feature extraction capabilities, reducing the model size, eliminating redundant information in the feature extraction process, and improving the accuracy and detection speed of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295743B_ABST
    Figure CN119295743B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting the intrusion of a small unmanned aerial vehicle based on an improved YOLOv8, and relates to the technical field of unmanned aerial vehicle intrusion detection. The present invention proposes an improved YOLOv8 network model, introduces an SPD-Conv layer and a DP-MobileNetv3 layer into the Backbone module of the YOLOv8 network model, reduces the number of parameters and the computational complexity of the model while maintaining efficient feature extraction capabilities, further reduces the size of the YOLOv8 model, eliminates redundant information in the feature extraction process, retains the details of the small target of the unmanned aerial vehicle, and improves the accuracy and detection speed of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle intrusion detection, and in particular to a small unmanned aerial vehicle intrusion detection method based on improved YOLOv8. Background Art

[0002] As the low-altitude economic market begins to develop rapidly, the number of drone companies has increased significantly, the types and quantity of drone products have also grown rapidly, and their applications in aerial photography, logistics distribution, public services and other fields have become more and more extensive. However, the rapid popularization of drones has brought hidden dangers to flight safety. Especially near airports, drone "illegal flying" incidents frequently occur, directly affecting the normal takeoff and landing of flights. Therefore, a variety of technologies are used to detect illegally intruding drones. The technologies for detecting illegal intrusions are mostly radar detection, image detection, sound wave detection, electromagnetic signal detection, etc. Due to the small size and fast movement speed of drones, and the characteristics of high imaging resolution and rich target detail information of visible light images, drone target detection based on visible light images has become a research hotspot. In addition, the development of deep learning has derived many excellent target detection algorithms, mainly including first-order detection methods and second-order detection methods. First-order detection methods include SSD, YOLO, etc. Second-order detection methods include R-CNN, Fast R-CNN, etc. Compared with traditional algorithms, deep learning algorithms provide a better choice for drone intrusion detection with their high-precision feature extraction and recognition, strong generalization ability, efficient calculation and real-time performance.

[0003] Although the two-stage target detection algorithm has high accuracy in the task of identifying and detecting targets based on images, it divides the detection algorithm into two steps: first, obtaining the candidate area, and then classifying it. This leads to a high amount of calculation and a long reasoning time. In application scenarios where the real-time requirements of drone intrusion detection are high, it cannot meet the requirements due to the slow reasoning speed. The one-stage target detection algorithm usually adopts an end-to-end training method, that is, directly extracting features and regressing the detection box of the input image. The detection speed is relatively fast, which is suitable for application scenarios such as drone intrusion detection with fast moving speed and small target size. Some scholars selected the one-stage target detection algorithm and improved it in actual application scenarios, but in the application of its improvement, it was found that only focusing on the detection accuracy, often ignoring the algorithm volume and computational complexity, making it difficult to deploy in edge computing devices, or only reducing the complexity of the model, while ignoring the impact on detection accuracy. In the existing technology, some researchers have proposed a two-level detection architecture that integrates ViBe and improved YOLOv7 to address the problems of low accuracy of target detection algorithms for small-scale drones in different backgrounds in urban low-altitude environments, easy missed detection and false detection, and easy interference from external factors. The improved YOLOv7 is used as a network model to detect images processed by ViBe; according to the position and size relationship between the original image and the processed image, the detected target coordinates are mapped back to the original image to complete target detection and extraction. The experimental results show that compared with the original model, the detection accuracy is significantly improved, but the number of parameters and computational complexity are increased accordingly. There is no good trade-off between model detection accuracy and model volume, which makes it difficult to deploy on edge devices. In response to the problem that low-altitude micro-drones pose a threat to public safety, some researchers have proposed a lightweight target detection model YOLOv5_SS suitable for mobile terminals based on the YOLOv5 network. By referencing the lightweight feature extraction module, introducing the attention mechanism, and replacing the bounding box loss function, the model's parameter volume and computational complexity are reduced, but compared with the original model, the detection accuracy is also reduced a lot. Summary of the invention

[0004] The purpose of the present invention is to provide a small UAV intrusion detection method based on improved YOLOv8 to improve the above technical problems.

[0005] In order to achieve the above-mentioned object of the invention, the embodiment of the present invention provides the following technical solutions:

[0006] A small drone intrusion detection method based on improved YOLOv8, comprising:

[0007] S1. Acquire the detection image of the drone to be detected in an air-to-air manner;

[0008] S2. Build a small UAV intrusion detection model and train it to obtain a trained small UAV intrusion detection model;

[0009] Among them, the small drone intrusion detection model adopts an improved YOLOv8 network model;

[0010] S3. Input the drone detection image to be detected into the trained small drone intrusion detection model to obtain the corresponding detection result, thereby completing the detection of small drone intrusion.

[0011] Furthermore, the improved YOLOv8 network model includes a Backbone module, a Neck module and a Head module connected in series in sequence;

[0012] The Backbone module includes a first module, a second module, a third module and a first CBS layer connected in series; the first module includes a second CBS layer, a third CBS layer and a first DP-MobileNetv3 layer connected in series; the second module includes a fourth CBS layer, a first SPD-Conv layer and a second DP-MobileNetv3 layer connected in series; the third module includes a fifth CBS layer, a second SPD-Conv layer and a third DP-MobileNetv3 layer connected in series;

[0013] The Neck module includes a fourth module, a first C2f layer, a fifth module, an SPPF layer, a second C2f layer, a sixth CBS layer, a third Concat layer, and a third C2f layer; the fourth module includes a first Concat layer and a first Upsample layer; the fifth module includes a second Concat layer and a second Upsample layer; wherein the output of the fifth module is input to the first C2f layer; the output of the first C2f layer is respectively input to the fourth module and the third Concat layer; the output of the fourth module is input to the second C2f layer; the output of the second C2f layer is input to the sixth CBS layer; the output of the sixth CBS layer is input to the third Concat layer; the output of the third Concat layer is input to the third C2f layer;

[0014] The Head module includes a first Detect layer and a second Detect layer in parallel.

[0015] Furthermore, the first DP-MobileNetv3 layer, the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer each include a first Conv layer, a DWConv layer, an SE attention module and a second Conv layer connected in series; the SE attention module includes a Pool layer, a first FC layer and a second FC layer; the convolution kernels of the first Conv layer and the second Conv layer are ; The convolution kernel of the DWConv layer is ; The first FC layer uses the Relu activation function; The second FC layer uses Activation function;

[0016] The first SPD-Conv layer and the second SPD-Conv layer both include an SPD layer and a third Conv layer connected in series; wherein the step size of the third Conv layer is 1.

[0017] Further, S2-1, obtaining the training drone detection image data;

[0018] S2-2, inputting the training drone detection image data into the second CBS layer, the third CBS layer and the first DP-MobileNetv3 layer in sequence, and outputting the first drone detection image feature data;

[0019] S2-3, inputting the first drone detection image feature data into the fourth CBS layer, the first SPD-Conv layer and the second DP-MobileNetv3 layer in sequence, and outputting the second drone detection image feature data;

[0020] S2-4, inputting the second drone detection image feature data into the fifth CBS layer, the second SPD-Conv layer and the third DP-MobileNetv3 layer in sequence, and outputting the third drone detection image feature data;

[0021] S2-5, inputting the third drone detection image feature data into the first CBS layer, and outputting to obtain fourth drone detection image feature data;

[0022] S2-6, inputting the second UAV detection image feature data, the third UAV detection image feature data and the fourth UAV detection image feature data into the Neck module, and outputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data;

[0023] S2-7, inputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data into the Head module, and outputting the final training UAV detection image detection result;

[0024] S2-8. Calculate the corresponding WIoU border loss function based on the final training drone detection image detection result;

[0025] S2-9. Based on the WIoU border loss function, the weight parameters of the improved YOLOv8 network model are adjusted to complete the training of the improved YOLOv8 network model.

[0026] Furthermore, the processing process of the first DP-MobileNetv3 layer is:

[0027] Inputting the image feature data output by the third CBS layer into the first Conv layer to obtain the image feature data after the first convolution;

[0028] Separating part of the channels of the first convolved image feature data to obtain first separated image feature data and second separated image feature data;

[0029] Inputting the first separated image feature data into the DWConv layer to obtain the second convolution image feature data;

[0030] The image feature data after the second convolution and the image feature data after the second separation are combined and input into the SE attention module to obtain the corresponding channel weight coefficient;

[0031] Multiplying the channel weight coefficient with data obtained by combining the second convolved image feature data and the second separated image feature data to obtain processed image feature data;

[0032] Inputting the processed image feature data into the second Conv layer to obtain the image feature data after the third convolution;

[0033] Merging the image feature data after the third convolution with the image feature data output by the third CBS layer to obtain the first UAV detection image feature data;

[0034] The processing process corresponding to the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer is the same as the processing process of the first DP-MobileNetv3 layer.

[0035] Furthermore, the formula of the first SPD-Conv layer is:

[0036] ;

[0037] ;

[0038] ;

[0039] ;

[0040] ;

[0041] in, represents the scale factor, , , , , , Indicates that the feature map data output by the fourth CBS layer is scaled by the factor Divide the corresponding sub-feature map data, Indicates the size of the feature map data output by the fourth CBS layer, Represents the corresponding feature map data, Represents the deep feature map data, Represents the sub-feature map data, that is , , , , , , Indicates the size of each block, Indicates the space-to-depth operation. represents the convolution function, Represents the output data of the first SPD-Conv layer;

[0042] The formula of the second SPD-Conv layer is consistent with the formula of the first SPD-Conv layer.

[0043] Furthermore, the S2-6 comprises the following steps:

[0044] S2-6-1, inputting the fourth UAV detection image feature data into the SPPF layer, and outputting the first initial human-machine detection image fusion feature data;

[0045] S2-6-2, inputting the first initial UAV detection image fusion feature data and the third UAV detection image feature data into the fifth module, and outputting the second initial UAV detection image fusion feature data;

[0046] S2-6-3, input the second initial UAV detection image fusion feature data into the first C2f layer, and output to obtain the third initial UAV detection image fusion feature data;

[0047] S2-6-4, inputting the third initial UAV detection image fusion feature data into the fourth module, and outputting the fourth initial UAV detection image fusion feature data;

[0048] S2-6-5, inputting the fourth initial drone detection image fusion feature data into the second C2f layer, and outputting the first drone detection image detection data;

[0049] S2-6-6, inputting the first drone detection image detection data into the sixth CBS layer, and outputting the fifth initial drone detection image fusion feature data;

[0050] S2-6-7, inputting the fifth initial drone detection image fusion feature data and the third initial drone detection image fusion feature data into the third Concat layer, and outputting the sixth initial drone detection image fusion feature data;

[0051] S2-6-8. Input the sixth initial UAV detection image fusion feature data into the third C2f layer, and output the second UAV detection image fusion feature data.

[0052] Furthermore, the S2-7 comprises the following steps:

[0053] S2-7-1. Input the fusion feature data of the first drone detection image into the first Detect layer, and output the first drone detection image detection result;

[0054] S2-7-2, inputting the fusion feature data of the second drone detection image into the second Detect layer, and outputting the second drone detection image detection result;

[0055] S2-7-3. Based on the first UAV detection image detection result and the second UAV detection image detection result, obtain the final training UAV detection image detection result.

[0056] Furthermore, the WIoU border loss function is WIoUv3.

[0057] The beneficial effects of the present invention are:

[0058] The present invention proposes an improved YOLOv8 network model, which introduces spatial to deep convolution (SPD-Conv layer) and DP-MobileNetv3 layer into the Backbone module of the YOLOv8 network model. While maintaining efficient feature extraction capability, the number of model parameters and computational complexity are reduced, the size of the YOLOv8 model is further reduced, redundant information in the feature extraction process is eliminated, and the details of small drone targets are retained, thereby improving the accuracy and detection speed of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0060] Figure 1 is a flow chart of a method in an embodiment of the present invention;

[0061] Figure 2 Schematic diagram of the improved YOLOv8 network model structure in an embodiment of the present invention;

[0062] Figure 3 Schematic diagram of the DP-MobileNetv3 layer structure in an embodiment of the present invention;

[0063] Figure 4 Schematic diagram of the SPD-Conv layer structure in an embodiment of the present invention;

[0064] FIG5 (a) is a schematic diagram of a top-down shooting angle of a drone in an embodiment of the present invention;

[0065] FIG5( b ) is a schematic diagram of the upward shooting angle of the drone in an embodiment of the present invention;

[0066] FIG5 (c) is a schematic diagram of the head-up shooting angle of the drone in an embodiment of the present invention;

[0067] FIG6 (a) is a diagram showing the detection result of a drone detection image using the improved YOLOv8 network model in an embodiment of the present invention;

[0068] FIG6( b ) is a diagram showing the detection results of a drone detection image using the YOLOv8n network model in an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0070] See also Figure 1 This embodiment provides a small drone intrusion detection method based on improved YOLOv8, which includes:

[0071] S1. Acquire the detection image of the drone to be detected in an air-to-air manner;

[0072] S2. Build a small UAV intrusion detection model and train it to obtain a trained small UAV intrusion detection model;

[0073] Among them, the small drone intrusion detection model adopts an improved YOLOv8 network model;

[0074] like Figure 2 As shown, the improved YOLOv8 network model includes a Backbone module, a Neck module and a Head module connected in series in sequence;

[0075] The Backbone module includes a first module, a second module, a third module and a first CBS layer connected in series; the first module includes a second CBS layer, a third CBS layer and a first DP-MobileNetv3 layer connected in series; the second module includes a fourth CBS layer, a first SPD-Conv layer and a second DP-MobileNetv3 layer connected in series; the third module includes a fifth CBS layer, a second SPD-Conv layer and a third DP-MobileNetv3 layer connected in series;

[0076] The Neck module includes a fourth module, a first C2f layer, a fifth module, an SPPF layer, a second C2f layer, a sixth CBS layer, a third Concat layer, and a third C2f layer; the fourth module includes a first Concat layer and a first Upsample layer; the fifth module includes a second Concat layer and a second Upsample layer; wherein the output of the fifth module is input to the first C2f layer; the output of the first C2f layer is respectively input to the fourth module and the third Concat layer; the output of the fourth module is input to the second C2f layer; the output of the second C2f layer is input to the sixth CBS layer; the output of the sixth CBS layer is input to the third Concat layer; the output of the third Concat layer is input to the third C2f layer;

[0077] The Head module includes a first Detect layer and a second Detect layer in parallel.

[0078] Compared with the YOLOv8 network model, the improved YOLOv8 network model of the present invention has only two Detect layers in the Head module, namely the first Detect layer and the second Detect layer, removes the large target detection head, reduces the size of the YOLOv8 network model, and can further reduce the model complexity and reduce the model calculation speed.

[0079] like Figure 3 As shown, the first DP-MobileNetv3 layer, the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer each include a first Conv layer, a DWConv layer, an SE attention module and a second Conv layer connected in series; the SE attention module includes a Pool layer, a first FC layer and a second FC layer; the convolution kernels of the first Conv layer and the second Conv layer are both ; The convolution kernel of the DWConv layer is ; The first FC layer uses the Relu activation function; The second FC layer uses Activation function;

[0080] like Figure 4 As shown, the first SPD-Conv layer and the second SPD-Conv layer both include a SPD layer and a third Conv layer connected in series; wherein the step size of the third Conv layer is 1.

[0081] S2-1, obtain the training drone detection image data;

[0082] S2-2, inputting the training drone detection image data into the second CBS layer, the third CBS layer and the first DP-MobileNetv3 layer in sequence, and outputting the first drone detection image feature data;

[0083] In the process of feature extraction through the Backbone module, it is observed that the information displayed by different channels of the feature map of the drone detection image is highly similar. Therefore, in the intrusion detection of drones, this feature map is undoubtedly redundant. Borrowing the idea of ​​PConv, the depth-separable operation is performed on the entire feature map, and it is modified to only perform the depth-separable convolution operation on some channels.

[0084] Thus, the processing process of the first DP-MobileNetv3 layer is:

[0085] Inputting the image feature data output by the third CBS layer into the first Conv layer to obtain the image feature data after the first convolution;

[0086] Separating part of the channels of the first convolved image feature data to obtain first separated image feature data and second separated image feature data;

[0087] Inputting the first separated image feature data into the DWConv layer to obtain the second convolution image feature data;

[0088] The image feature data after the second convolution and the image feature data after the second separation are combined and input into the SE attention module to obtain the corresponding channel weight coefficient;

[0089] Multiplying the channel weight coefficient with data obtained by combining the second convolved image feature data and the second separated image feature data to obtain processed image feature data;

[0090] Inputting the processed image feature data into the second Conv layer to obtain the image feature data after the third convolution;

[0091] Merging the image feature data after the third convolution with the image feature data output by the third CBS layer to obtain the first UAV detection image feature data;

[0092] The processing process corresponding to the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer is the same as the processing process of the first DP-MobileNetv3 layer.

[0093] In each DP-MobileNetv3 layer, we use The convolution kernel is a convolution kernel with a length, width and number of channels. , and When performing convolution operation on the feature map of , assuming that the size of the feature map after convolution remains unchanged, the amount of calculation required for conventional convolution is , when the channel ratio When is 1 / 4, the computational complexity of PConv is , which is 1 / 16 of the computational complexity of conventional convolution. After combining with depthwise separable convolution, the computational complexity continues to drop to , which is only a regular convolution .

[0094] in, represents a constant, Indicates the number of channels that PConv acts on.

[0095] Based on the convolution calculation process of Pconv, we choose to perform depth-separable convolution operations on some channels, which can significantly reduce the amount of calculation and meet the computing requirements of edge devices.

[0096] S2-3, inputting the first drone detection image feature data into the fourth CBS layer, the first SPD-Conv layer and the second DP-MobileNetv3 layer in sequence, and outputting the second drone detection image feature data;

[0097] Since traditional downsampling operations are mainly implemented through strided convolution and pooling layers, which are designed to reduce the spatial dimension of feature maps, small drones are small targets, and the use of traditional downsampling operations will lead to the loss of some detailed features, thus affecting the accuracy of drone intrusion detection. Therefore, the SPD-Conv layer is introduced. The SPD-Conv layer includes a spatial depth layer (SPD) and a non-stride convolution layer. Among them, the SPD layer realizes the conversion from spatial dimension to depth dimension by dividing the original feature map into several sub-feature maps and connecting these sub-feature maps into a new feature map. This can reduce the size of the spatial dimension without losing information while retaining the information within the channel. After the SPD layer, a non-stride (i.e., stride 1) convolution layer is used to perform a convolution operation on the converted feature map. Non-stride convolution helps to process features with learnable parameters while reducing the number of channels, thereby avoiding reducing the spatial resolution of the feature map and losing detail information.

[0098] Thus, the formula for the first SPD-Conv layer is:

[0099] ;

[0100] ;

[0101] ;

[0102] ;

[0103] ;

[0104] in, represents the scale factor, , , , , , Indicates that the feature map data output by the fourth CBS layer is scaled by the factor Divide the corresponding sub-feature map data, Indicates the size of the feature map data output by the fourth CBS layer, Represents the corresponding feature map data, Represents the deep feature map data, Represents the sub-feature map data, that is , , , , , , Indicates the size of each block, Indicates the space-to-depth operation. represents the convolution function, Represents the output data of the first SPD-Conv layer;

[0105] Each sub-feature map data All are based on the proportional factor Downsampling a given size is The feature map (output data of the fourth CBS layer) is obtained, which requires and can be divided by . Then, after downsampling, we get , , , Four sub-feature maps, the size of each sub-feature map becomes The four sub-feature maps become After the SPD feature conversion layer, add a layer containing The non-strided convolution of filters is used to further transform the fused feature map. , represents a constant, , Indicates a label.

[0106] The formula of the second SPD-Conv layer is consistent with the formula of the first SPD-Conv layer.

[0107] The spatial-to-depth convolution (SPD-Conv) is introduced into the improved YOLOv8 network model to achieve downsampling, so as to prevent the loss of details of small targets of drones caused by ordinary downsampling operations and improve the feature extraction capability of the model.

[0108] S2-4, inputting the second drone detection image feature data into the fifth CBS layer, the second SPD-Conv layer and the third DP-MobileNetv3 layer in sequence, and outputting the third drone detection image feature data;

[0109] S2-5, inputting the third drone detection image feature data into the first CBS layer, and outputting to obtain fourth drone detection image feature data;

[0110] S2-6, inputting the second UAV detection image feature data, the third UAV detection image feature data and the fourth UAV detection image feature data into the Neck module, and outputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data;

[0111] The S2-6 comprises the following steps:

[0112] S2-6-1, inputting the fourth UAV detection image feature data into the SPPF layer, and outputting the first initial human-machine detection image fusion feature data;

[0113] S2-6-2, inputting the first initial UAV detection image fusion feature data and the third UAV detection image feature data into the fifth module, and outputting the second initial UAV detection image fusion feature data;

[0114] S2-6-3, input the second initial UAV detection image fusion feature data into the first C2f layer, and output to obtain the third initial UAV detection image fusion feature data;

[0115] S2-6-4, inputting the third initial UAV detection image fusion feature data into the fourth module, and outputting the fourth initial UAV detection image fusion feature data;

[0116] S2-6-5, inputting the fourth initial drone detection image fusion feature data into the second C2f layer, and outputting the first drone detection image detection data;

[0117] S2-6-6, inputting the first drone detection image detection data into the sixth CBS layer, and outputting the fifth initial drone detection image fusion feature data;

[0118] S2-6-7, inputting the fifth initial drone detection image fusion feature data and the third initial drone detection image fusion feature data into the third Concat layer, and outputting the sixth initial drone detection image fusion feature data;

[0119] S2-6-8. Input the sixth initial UAV detection image fusion feature data into the third C2f layer, and output the second UAV detection image fusion feature data.

[0120] S2-7, inputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data into the Head module, and outputting the final training UAV detection image detection result;

[0121] The S2-7 comprises the following steps:

[0122] S2-7-1. Input the fusion feature data of the first drone detection image into the first Detect layer, and output the first drone detection image detection result;

[0123] S2-7-2, inputting the fusion feature data of the second drone detection image into the second Detect layer, and outputting the second drone detection image detection result;

[0124] S2-7-3. Based on the first UAV detection image detection result and the second UAV detection image detection result, obtain the final training UAV detection image detection result.

[0125] S2-8. Calculate the corresponding WIoU border loss function based on the final training drone detection image detection result;

[0126] S2-9. Based on the WIoU border loss function, the weight parameters of the improved YOLOv8 network model are adjusted to complete the training of the improved YOLOv8 network model.

[0127] The WIoU border loss function is WIoUv3. WIoU v3 adopts a reasonable gradient gain allocation strategy to dynamically optimize the weights of high-quality and low-quality prediction boxes, so that the model focuses on average quality samples; and the complexity of the drone flight environment makes it more difficult to detect drones. The use of the WIoU loss function to optimize the bounding box regression can balance the gradient effects of high-quality and low-quality samples and improve the accuracy of drone target positioning.

[0128] S3. Input the drone detection image to be detected into the trained small drone intrusion detection model to obtain the corresponding detection result, thereby completing the detection of small drone intrusion.

[0129] In one embodiment, the present invention uses the public dataset "Det-Fly" to train the improved YOLOv8 network model. "Det-Fly" includes more than 10,000 drone images captured in an air-to-air manner. As shown in Figure 5 (a), Figure 5 (b), and Figure 5 (c), the drone images are taken from three different perspectives and incorporate challenging background elements, such as changing lighting conditions, dynamic blur and other complex factors, so as to truly and accurately reflect the complex scenes of drones in actual operation.

[0130] A total of 5722 images were selected from "Det-Fly" and divided into training set, validation set and test set in a ratio of 8:1:1, resulting in 4578 training set images, 572 validation set images and 572 test set images.

[0131] The experimental configuration of the present invention is Windows 10 Professional Edition, the CPU is Intel Core-i7-12700K@3.60GHz, the GPU is NVIDIA GeForce RTX 3090, the running memory is 24GB, and the cuda11.6.2 and Pytorch1.13.0 deep learning frameworks are used. The parameter settings of the improved YOLOv8 network model include not using pre-trained weights for transfer learning, the input image size is 640×640; the initial learning rate is set to 0.001; the batch size is set to 32; the SGD optimizer is used; the number of training rounds is 200; and the other parameters use the default parameters of the YOLOv8 network model. The width details of the improved YOLOv8 network model are shown in Table 1.

[0132] Table 1

[0133]

[0134] The widening factor is to adjust the width of the network by modifying the number of channels in each layer. The larger the value of the widening factor, the greater the complexity of the model can be to a certain extent, so that the model can better learn the characteristics of the target and improve the generalization ability of the model. However, since the present invention only detects one type of drone, a smaller network structure is sufficient to meet the detection requirements. Therefore, the redundancy of the model is reduced by reducing the widening factor. It can be seen from Table 1 that the widening factor and deepening factor of the improved YOLOv8 network model are smaller than the widening factor and deepening factor of the YOLOv8n network model. It can be seen that the complexity of the improved YOLOv8 network model is smaller than that of the YOLOv8n network model, which can further improve the model detection speed.

[0135] The present invention adopts mean average precision (mAP), floating point operations (FLOPs), parameter quantity (Params), and detection frames per second (FPS) as performance evaluation indicators of the improved YOLOv8 network model. In the target detection task, mAP is the core indicator for measuring model performance and fully reflects the comprehensive ability of the model. The higher the mAP, the better the comprehensive performance of the improved YOLOv8 network model in detecting drones. mAP@0.5 evaluates the performance of the improved YOLOv8 network model when the threshold of the intersection over union (IOU) ratio of the predicted box and the true box is taken as 0.5. In addition, the smaller the FLOPs, the smaller the complexity of the improved YOLOv8 network model algorithm, the smaller the Params, the smaller the memory occupied by the improved YOLOv8 network model, and the larger the FPS, the faster the detection speed of the improved YOLOv8 network model.

[0136] As shown in Table 2, the present invention achieves a balance between detection accuracy and model size. While improving the detection accuracy of the improved YOLOv8 network model, it also reduces the number of parameters and computational complexity of the improved YOLOv8 network model, thereby improving the detection speed.

[0137] Table 2

[0138]

[0139] The same data set is tested by the improved YOLOv8 network model and the YOLOv8n network model respectively. The corresponding drone intrusion detection effect comparison is shown in Figure 6 (a) and Figure 6 (b). Under normal lighting and clarity, the improved YOLOv8 network model can always maintain good detection capabilities. When facing complex environmental challenges, including situations where the drone body color is similar to the background color and easily causes confusion, and insufficient light causes the image quality to decrease, the improved YOLOv8 network model can still accurately identify the drone target and maintain a high confidence level. It can be seen that even with a lightweight design, the improved YOLOv8 network model can still show high robustness and strong adaptability for the detection of small-sized drones in complex scenes. This feature not only reflects the significant advantages of the improved YOLOv8 network model in maintaining high accuracy while reducing computational costs, but also provides strong support for its deployment in practical application scenarios such as real-time detection and resource-constrained environments.

[0140] In summary, the present invention proposes an improved YOLOv8 network model, which introduces the spatial to deep convolution (SPD-Conv layer) and DP-MobileNetv3 layer into the Backbone module of the YOLOv8 network model, while maintaining efficient feature extraction capability, reducing the number of model parameters and computational complexity, further reducing the size of the YOLOv8 model, eliminating redundant information in the feature extraction process, retaining the details of small targets of drones, and improving the accuracy and detection speed of the model.

[0141] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A small drone intrusion detection method based on improved YOLOv8, characterized in that: include: S1. Acquire the detection image of the drone to be detected in an air-to-air manner; S2. Build a small UAV intrusion detection model and train it to obtain a trained small UAV intrusion detection model; Among them, the small drone intrusion detection model adopts an improved YOLOv8 network model; S3, inputting the drone detection image to be detected into the trained small drone intrusion detection model to obtain the corresponding detection result, thereby completing the detection of small drone intrusion; The improved YOLOv8 network model includes a Backbone module, a Neck module and a Head module connected in series in sequence; The Backbone module includes a first module, a second module, a third module and a first CBS layer connected in series; the first module includes a second CBS layer, a third CBS layer and a first DP-MobileNetv3 layer connected in series; the second module includes a fourth CBS layer, a first SPD-Conv layer and a second DP-MobileNetv3 layer connected in series; the third module includes a fifth CBS layer, a second SPD-Conv layer and a third DP-MobileNetv3 layer connected in series; The Neck module includes a fourth module, a first C2f layer, a fifth module, an SPPF layer, a second C2f layer, a sixth CBS layer, a third Concat layer, and a third C2f layer; the fourth module includes a first Concat layer and a first Upsample layer; the fifth module includes a second Concat layer and a second Upsample layer; wherein the output of the fifth module is input to the first C2f layer; the output of the first C2f layer is respectively input to the fourth module and the third Concat layer; the output of the fourth module is input to the second C2f layer; the output of the second C2f layer is input to the sixth CBS layer; the output of the sixth CBS layer is input to the third Concat layer; the output of the third Concat layer is input to the third C2f layer; The Head module includes a first Detect layer and a second Detect layer in parallel; The first DP-MobileNetv3 layer, the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer each include a first Conv layer, a DWConv layer, an SE attention module and a second Conv layer connected in series in sequence; the SE attention module includes a Pool layer, a first FC layer and a second FC layer; the convolution kernels of the first Conv layer and the second Conv layer are both ; The convolution kernel of the DWConv layer is ; The first FC layer uses the Relu activation function; The second FC layer uses Activation function; The first SPD-Conv layer and the second SPD-Conv layer both include a SPD layer and a third Conv layer connected in series; wherein the step length of the third Conv layer is 1; The training process of the small drone intrusion detection model includes the following steps: S2-1, obtain the training drone detection image data; S2-2, inputting the training drone detection image data into the second CBS layer, the third CBS layer and the first DP-MobileNetv3 layer in sequence, and outputting the first drone detection image feature data; S2-3, inputting the first drone detection image feature data into the fourth CBS layer, the first SPD-Conv layer and the second DP-MobileNetv3 layer in sequence, and outputting the second drone detection image feature data; S2-4, inputting the second drone detection image feature data into the fifth CBS layer, the second SPD-Conv layer and the third DP-MobileNetv3 layer in sequence, and outputting the third drone detection image feature data; S2-5, inputting the third drone detection image feature data into the first CBS layer, and outputting to obtain fourth drone detection image feature data; S2-6, inputting the second UAV detection image feature data, the third UAV detection image feature data and the fourth UAV detection image feature data into the Neck module, and outputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data; S2-7, inputting the first UAV detection image fusion feature data and the second UAV detection image fusion feature data into the Head module, and outputting the final training UAV detection image detection result; S2-8. Calculate the corresponding WIoU border loss function based on the final training drone detection image detection result; S2-9. Based on the WIoU border loss function, the weight parameters of the improved YOLOv8 network model are adjusted to complete the training of the improved YOLOv8 network model.

2. According to the method for detecting small drone intrusion based on improved YOLOv8 according to claim 1, it is characterized in that: The processing process of the first DP-MobileNetv3 layer is: Inputting the image feature data output by the third CBS layer into the first Conv layer to obtain the image feature data after the first convolution; Separating part of the channels of the first convolved image feature data to obtain first separated image feature data and second separated image feature data; Inputting the first separated image feature data into the DWConv layer to obtain the second convolved image feature data; The image feature data after the second convolution and the image feature data after the second separation are combined and input into the SE attention module to obtain the corresponding channel weight coefficient; Multiplying the channel weight coefficient with data obtained by combining the second convolved image feature data and the second separated image feature data to obtain processed image feature data; Inputting the processed image feature data into the second Conv layer to obtain the image feature data after the third convolution; Merging the image feature data after the third convolution with the image feature data output by the third CBS layer to obtain the first UAV detection image feature data; The processing process corresponding to the second DP-MobileNetv3 layer and the third DP-MobileNetv3 layer is the same as the processing process of the first DP-MobileNetv3 layer.

3. According to a method for detecting small drone intrusion based on improved YOLOv8 according to claim 1, it is characterized in that: The formula for the first SPD-Conv layer is: ; ; ; ; ; in, represents the scale factor, , , , , , Indicates that the feature map data output by the fourth CBS layer is scaled by the factor Divide the corresponding sub-feature map data, Indicates the size of the feature map data output by the fourth CBS layer, Represents the corresponding feature map data, Represents the deep feature map data, Represents the sub-feature map data, that is , , , , , , Indicates the size of each block, Indicates the space-to-depth operation. represents the convolution function, Represents the output data of the first SPD-Conv layer; The formula of the second SPD-Conv layer is consistent with the formula of the first SPD-Conv layer.

4. According to a method for detecting small drone intrusion based on improved YOLOv8 according to claim 1, it is characterized in that: The S2-6 comprises the following steps: S2-6-1, inputting the fourth UAV detection image feature data into the SPPF layer, and outputting the first initial human-machine detection image fusion feature data; S2-6-2, inputting the first initial UAV detection image fusion feature data and the third UAV detection image feature data into the fifth module, and outputting the second initial UAV detection image fusion feature data; S2-6-3, input the second initial UAV detection image fusion feature data into the first C2f layer, and output to obtain the third initial UAV detection image fusion feature data; S2-6-4, inputting the third initial UAV detection image fusion feature data into the fourth module, and outputting the fourth initial UAV detection image fusion feature data; S2-6-5, inputting the fourth initial UAV detection image fusion feature data into the second C2f layer, and outputting the first UAV detection image fusion feature data; S2-6-6, inputting the first UAV detection image fusion feature data into the sixth CBS layer, and outputting the fifth initial UAV detection image fusion feature data; S2-6-7, inputting the fifth initial drone detection image fusion feature data and the third initial drone detection image fusion feature data into the third Concat layer, and outputting the sixth initial drone detection image fusion feature data; S2-6-8. Input the sixth initial UAV detection image fusion feature data into the third C2f layer, and output the second UAV detection image fusion feature data.

5. According to a method for detecting small drone intrusion based on improved YOLOv8 according to claim 1, it is characterized in that: The S2-7 comprises the following steps: S2-7-1. Input the fusion feature data of the first drone detection image into the first Detect layer, and output the first drone detection image detection result; S2-7-2, inputting the fusion feature data of the second drone detection image into the second Detect layer, and outputting the second drone detection image detection result; S2-7-3. Based on the first UAV detection image detection result and the second UAV detection image detection result, obtain the final training UAV detection image detection result.

6. According to a method for detecting small drone intrusion based on improved YOLOv8 according to claim 1, it is characterized in that: The WIoU border loss function is WIoUv3.

Citation Information

Patent Citations

  • YOLOv8 target detection method based on attention mechanism and multi-scale feature fusion

    CN116883801A

  • Substation grounding wire state target detection method based on improved YOLOv5

    CN117253188A