Unmanned aerial vehicle detection method, system, equipment and medium
By constructing a drone dataset and adopting a deep learning method with a multi-layer dual-branch feature extraction network and a gated convolution module, the accuracy problem of drone detection in complex environments is solved, and efficient drone detection is achieved.
Patent Information
- Application Number
- CN202510859655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
AI Technical Summary
Existing drone detection methods lack detection accuracy in complex environments, especially when the background is complex, the targets are small, weak, and dim, and a large number of false targets are easily generated.
A deep learning method is used to construct a drone dataset. A multi-layer dual-branch feature extraction network, an upsampling module, and a threshold segmentation module are used. The first and second frequency domain feature extraction modules are combined with a gated convolution module to fuse edge features and drone features to improve detection accuracy.
It effectively reduces the false alarm rate in complex environments and improves the accuracy of drone detection, making up for the shortcomings of traditional methods and single-branch deep learning methods, and can accurately detect drones.
Smart Images

Figure CN120747788A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a drone detection method, system, device, and medium. Background Art
[0002] Among the three popular drone detection algorithms, filtering and matrix decomposition are the primary approaches. Their core goal is to leverage prior image information to detect drones under strong assumptions. However, in practice, most scenes lack the clean backgrounds and relatively small, prominent targets required by these algorithms. Consequently, these algorithms often produce detection results that contain a large number of false targets.
[0003] Traditional drone detection methods attempt to manually design contrast balancing factors and various hyperparameters in order to extract drones and enhance their image saliency. Among these, methods based on low-rank sparse matrix factorization are among the most popular. However, the backgrounds in natural scenes are highly variable, and most scenes do not satisfy the low-rank sparse assumptions of these methods.
[0004] With the introduction of drone detection methods, this approach, while fully leveraging prior image information, has significantly improved the high false alarm rate caused by traditional methods. Unmanned aerial vehicle detection methods, which only use a single branch to extract hierarchical information, are unable to address the lack of edge information in drone images. This makes it difficult to detect small, weak, and dim drones, severely impacting the quality of the final detection results.
[0005] Therefore, in order to solve the above technical problems, it is urgent to provide a new drone detection method to improve the accuracy of drone detection in complex environments. Summary of the Invention
[0006] The purpose of this application is to provide a drone detection method, system, device and medium that can improve the accuracy of drone detection in complex environments.
[0007] To achieve the above objectives, this application provides the following solutions:
[0008] In a first aspect, the present application provides a drone detection method, comprising:
[0009] Constructing a drone dataset; the drone dataset includes: drone images and corresponding edge images;
[0010] Based on the drone data set, a drone detection model is obtained by using a deep learning method; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the first frequency domain feature extraction module in the dual-branch feature extraction network of the next layer The first frequency domain feature extraction module is connected to the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to extract features based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second to last layer; the threshold segmentation module is used to obtain a drone detection result by performing threshold segmentation on the fused feature image;
[0011] Based on the drone image to be detected and the corresponding edge image, the trained drone detection model is used to obtain the drone detection result.
[0012] Optionally, constructing the drone dataset specifically includes:
[0013] Acquire drone imagery;
[0014] Preprocessing the drone image;
[0015] Based on the pre-processed UAV image, the edge image is extracted using the Canny operator to obtain the edge image corresponding to the UAV image;
[0016] A drone dataset is constructed based on multiple drone images and corresponding edge images.
[0017] Optionally, the loss function of the trained drone detection model specifically includes:
[0018] Using the formula L = L edge (Edge, GT edge )+L dice (OUTPUT, GT) determines the loss function of the trained drone detection model;
[0019] Among them, L represents the loss function of the trained drone detection model, GT edge represents the edge image corresponding to the drone image, L edge Represents the loss function of the edge feature image, L dice Represents the dice loss calculation function, Edge represents the edge feature image, GT represents the drone image, and OUTPUT represents the target feature image.
[0020] Optionally, the first frequency domain feature extraction module and the second frequency domain feature extraction module both include: a fast Fourier transform unit, a first frequency domain convolution unit, a first frequency domain batch normalization unit, a first frequency domain activation function unit, a second frequency domain convolution unit, a second frequency domain batch normalization unit, a second frequency domain activation function unit and an inverse Fourier transform unit.
[0021] Optionally, the first frequency domain feature extraction module and the second frequency domain feature extraction module specifically include:
[0022] Use the formula x = FFT (Input) to determine the frequency domain image and edge frequency domain image of the drone;
[0023] Using the formula x inter =Cbn(Cconv(Crelu(Cbn(Cconv(x)))))) determines the frequency domain feature image and edge frequency domain feature image of the drone;
[0024] Using the formula Output = IFFT (Crelu (x inter ))Determine the drone feature image and edge feature image;
[0025] Where x represents the frequency domain image and edge frequency domain image of the drone, FFT represents the fast Fourier transform function, Input represents the drone image and the corresponding edge image; x inter represents the frequency domain feature image and edge frequency domain feature image of the drone, Cbn represents the frequency domain batch normalization operation, Cconv represents the complex domain convolution, Crelu represents the complex domain activation function Relu; Output represents the drone feature image and edge feature image, and IFFT represents the inverse Fourier transform.
[0026] Optionally, the gated convolution module specifically includes:
[0027] Using the formula Output1 = Gate (x1, Edge) and Y Gate =Output1⊙σ(edge) determines the target feature image;
[0028] Among them, OUtput1 represents the image after the UAV feature image and the edge feature image are superimposed, Gat represents the gated convolution operation, x1 represents the UAV feature image, Y Gate Represents the target feature image, ⊙ represents the element-by-element multiplication operation, and σ represents the Sigmoid function
[0029] Optionally, the upsampling module specifically includes:
[0030] Use the formula High=Dimcg((Bintp(High input )))+TC(High input ) and Output2 = Conv(Low input )+High*Sigmoid(Cont(Low input ))Determine the fusion feature image;
[0031] Among them, High represents the result of the target feature image output by the dual-branch feature extraction network of the last layer after being processed by the upsampling module, Dimcg represents dimension adjustment, Bintp represents bilinear interpolation, TC represents deconvolution function, High input Represents the target feature image output by the dual-branch feature extraction network of the last layer, OUtput2 represents the fused feature image, Conv represents the convolution operation function, Sigmoid represents the activation function, Low input Target feature image representing the output of the penultimate layer’s two-branch feature extraction network.
[0032] In a second aspect, the present application provides a drone detection system, which is applied to any of the drone detection methods described above, and the drone detection system includes:
[0033] A data set construction module is used to construct a drone data set; the drone data set includes: drone images and corresponding edge images;
[0034] The drone detection model acquisition module is used to obtain a drone detection model based on a drone data set using a deep learning method; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module, and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module, and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the dual-branch feature extraction module of the next layer The first frequency domain feature extraction module in the network is connected; the first frequency domain feature extraction module is used to perform feature extraction based on the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to perform feature extraction based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second-to-last layer; the threshold segmentation module is used to obtain a drone detection result by performing threshold segmentation on the fused feature image;
[0035] The drone detection module is used to obtain drone detection results based on the drone image to be detected and the corresponding edge image using the trained drone detection model.
[0036] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the drone detection method.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the drone detection method when executed by a processor.
[0038] According to the specific embodiments provided in this application, this application has the following technical effects:
[0039] The present application provides a drone detection method, system, device and medium. A drone dataset is constructed by using drone images and corresponding edge images, and a deep learning method is used to obtain a drone detection model including a multi-layer dual-branch feature extraction network, an upsampling module and a threshold segmentation module; wherein the dual-branch feature extraction network also includes a first frequency domain feature extraction module, a second frequency domain feature extraction module and a gated convolution module; the dual-branch feature extraction network is used to extract multi-level features from the drone image and the corresponding edge image respectively. During the feature extraction process, the first frequency domain feature extraction branch continuously inputs edge feature images to the first frequency domain feature extraction network at different network depth levels to eliminate the dual-branch feature extraction network. The invention relates to an improvement in the detection accuracy of drones in complex environments, which can effectively reduce the high false alarm rate caused by traditional methods and make up for the underutilization of image prior information in some deep learning-based methods. The invention also relates to an improvement in the detection accuracy of drones in complex environments, which can effectively reduce the high false alarm rate caused by traditional methods and make up for the underutilization of image prior information in some deep learning-based methods. The invention also relates to an improvement in the detection accuracy of drones in complex environments, which can effectively reduce the high false alarm rate caused by traditional methods and make up for the underutilization of image prior information in some deep learning-based methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] Figure 1 This is a flow chart of a drone detection method in one embodiment of the present application;
[0042] Figure 2 This is a schematic diagram of the detection process of the drone detection model;
[0043] Figure 3 It is a structural diagram of the first frequency domain feature extraction module and the second frequency domain feature extraction module;
[0044] Figure 4 It is a structural diagram of the upsampling module;
[0045] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0047] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0048] In an exemplary embodiment, Figure 1 and Figure 2 As shown, a drone detection method is provided, the method comprising:
[0049] S1: Construct a drone dataset; the drone dataset includes drone images and corresponding edge images.
[0050] Specifically, the above S1 is replaced by the following steps S101 to S104:
[0051] S101: Acquire drone images.
[0052] S102: Preprocessing the drone image.
[0053] S103: Based on the pre-processed UAV image, edge image extraction is performed using a Canny operator to obtain an edge image corresponding to the UAV image.
[0054] S104: Construct a drone dataset based on multiple drone images and corresponding edge images.
[0055] In one exemplary embodiment, after batch loading multiple drone images, the drone images are uniformly resized to 224 pixels * 224 pixels * 3 pixels. The resized drone images are then subjected to edge image extraction using the Canny operator to obtain edge images corresponding to the 224 pixels * 224 pixels * 3 pixels drone images. Based on the multiple drone images and the corresponding edge images, a drone dataset is generated.
[0056] S2: Based on the drone data set, a deep learning method is used to obtain a drone detection model; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the first frequency domain feature extraction module in the dual-branch feature extraction network of the next layer The frequency domain feature extraction module is connected; the first frequency domain feature extraction module is used to perform feature extraction based on the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to perform feature extraction based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second to last layer; the threshold segmentation module is used to obtain the drone detection result by performing threshold segmentation on the fused feature image.
[0057] like Figure 3 As shown, both the first frequency domain feature extraction module and the second frequency domain feature extraction module include: a fast Fourier transform unit, a first frequency domain convolution unit, a first frequency domain batch normalization unit, a first frequency domain activation function unit, a second frequency domain convolution unit, a second frequency domain batch normalization unit, a second frequency domain activation function unit, and an inverse Fourier transform unit. Among them, the first frequency domain convolution unit has 3 input channels, 16 output channels, a convolution kernel of 3, a step size of 1, and a padding size of 1; the second frequency domain convolution unit has 16 input channels, 16 output channels, a convolution kernel of 3, a step size of 2, and a padding size of 1.
[0058] In an exemplary embodiment, the adjusted drone image and the corresponding edge image are respectively input into the second frequency domain feature extraction module and the first frequency domain feature extraction module of the dual-branch feature extraction network to obtain an edge feature image and a drone feature image, and the edge feature image and the drone feature image are superimposed and fused through a gated convolution module to obtain a target feature image of size 112 pixels * 112 pixels * 16 pixels, and used as the input of the second frequency domain feature extraction module of the next layer of dual-branch feature extraction network. The above work is repeated three times, and the target feature image output by the last layer of dual-branch feature extraction network and the target feature image output by the penultimate layer of dual-branch feature extraction network are processed by an upsampling module respectively, and finally a fused feature image of the same size as the drone image is obtained. The fused feature image is threshold segmented by a threshold segmentation module to obtain a target binary segmentation image and a corresponding edge binary segmentation image, and the drone detection result is obtained.
[0059] Specifically, the first frequency domain feature extraction module and the second frequency domain feature extraction module specifically include:
[0060] The frequency domain image and edge frequency domain image of the drone are determined using the formula x=FFT(Inmut).
[0061] Using the formula x inter =Cbn(Cconv(Crelu(Cbn(Cconv(x))))) determines the frequency domain feature image and edge frequency domain feature image of the drone.
[0062] Using the formula Output = IFFT (Crelu (x inter ))Determine the drone feature image and edge feature image.
[0063] Where x represents the frequency domain image and edge frequency domain image of the drone, FFT represents the fast Fourier transform function, Input represents the drone image and the corresponding edge image; x inter represents the frequency domain feature image and edge frequency domain feature image of the drone, Cbn represents the frequency domain batch normalization operation, Cconv represents the complex domain convolution, Crelu represents the complex domain activation function Relu; Output represents the drone feature image and edge feature image, and IFFT represents the inverse Fourier transform.
[0064] The first frequency domain convolution module and the second frequency domain convolution module are introduced into the first frequency domain feature extraction module in the drone detection model to extract drone information from the drone's frequency domain image and edge frequency domain image, thereby enhancing the feature extraction capability of the drone.
[0065] Since the deeper the dual-branch feature extraction network is, the more detailed information is lost. In order to retain more detailed information in the detection results and more effectively protect the information integrity of the drone feature image and the edge feature image, a gated convolution method is used to fuse the information in the edge feature image with the information in the drone feature image.
[0066] Given the intermediate features X, Y∈R in the three feature maps C*H*W , where C represents the number of channels and H*W (height*width) represents the size of the target feature image. The gate model passes the edge feature image through a Sigmoid function and then multiplies it element-wise with the drone feature image.
[0067] The gated convolution module specifically includes:
[0068] Using the formula Output1 = Gate (x1, Edge) and Y Gate =Output1⊙σ(edge) determines the target feature image;
[0069] Among them, Output1 represents the image after the drone feature image and the edge feature image are superimposed, Gate represents the gated convolution operation, x1 represents the drone feature image, and Y Gate Represents the target feature image, ⊙ represents the element-by-element multiplication operation, and σ represents the Sigmoid function.
[0070] like Figure 4 As shown in Figure 2, in order to make full use of the semantic information of images at different depths and obtain better detection results, in the upsampling stage, the fused feature image generated during the upsampling process is fully utilized.
[0071] The specific upsampling process is as follows: the target feature map output by the last two-branch feature extraction network and the target feature image output by the penultimate two-branch feature extraction network are each fed into bilinear interpolation, dimensionally adjusted, and then deconvolved. The two resulting target feature images are then element-wise added together. The target feature image from the previous stage is convolved, and an attention map is generated using the sigmoid algorithm. The attention map is element-wise multiplied with the upsampled target feature image and finally added to the target feature image from the previous stage. After a preset number of upsampling operations, a fused feature image with the same size as the original image is obtained.
[0072] The upsampling module specifically includes:
[0073] Use the formula High=Dimcg((Bintp(High input )))+TC(High input ) and Output2 = Conv(Low input)+High*Sigmoid(Cont(Low input ))Determine the fused feature image.
[0074] Among them, High represents the result of the target feature image output by the dual-branch feature extraction network of the last layer after being processed by the upsampling module, Dimcg represents dimension adjustment, Bintp represents bilinear interpolation, TC represents deconvolution function, High input Represents the target feature image output by the dual-branch feature extraction network of the last layer, Output2 represents the fused feature image, Conv represents the convolution operation function, Sigmoid represents the activation function, Low input Target feature image representing the output of the penultimate layer’s two-branch feature extraction network.
[0075] S3: Based on the drone image to be detected and the corresponding edge image, the trained drone detection model is used to obtain the drone detection result.
[0076] In an exemplary embodiment, the obtained drone image and the corresponding edge image are respectively compared with the target feature image and the edge feature image according to the extracted multi-level target feature image and edge feature image and the feature fusion method to design a loss function suitable for the overall model, and the loss calculation and detection quality evaluation are performed. When the loss value is less than the preset threshold, a trained drone detection model is obtained to obtain the optimal detection effect.
[0077] Specifically, using the formula L=L edge (Edge, GT edge )+L dice (OUTPUT, GT) determines the loss function of the trained drone detection model.
[0078] Among them, L represents the loss function of the trained drone detection model, GT edge represents the edge image corresponding to the drone image, L edge Represents the loss function of the edge feature image, L edge =L Dice (Edge, GT edge )++λL BCE (Edge, GT edge ), L BCE Represents the BCE loss calculation function, L dice Represents the dice loss calculation function, Edge represents the edge feature image, GT represents the drone image, OUTPUT represents the target feature image, and λ represents an adjustable hyperparameter.
[0079] In an exemplary embodiment, a drone detection system is provided, comprising: a data set construction module, a drone detection model acquisition module, and a drone detection module.
[0080] The dataset construction module is used to construct a drone dataset; the drone dataset includes: drone images and corresponding edge images;
[0081] The drone detection model acquisition module is used to obtain a drone detection model based on a drone data set using a deep learning method; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the dual-branch feature extraction module of the next layer The first frequency domain feature extraction module in the network is connected; the first frequency domain feature extraction module is used to perform feature extraction based on the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to perform feature extraction based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second-to-last layer; the threshold segmentation module is used to obtain a drone detection result by performing threshold segmentation on the fused feature image;
[0082] The drone detection module is used to obtain drone detection results based on the drone image to be detected and the corresponding edge image using a trained drone detection model.
[0083] Eye visual perception is a hierarchical processing process, and the cerebral cortex processes the visual signals input by the human eye in a hierarchical manner from local low-level information to global semantic information. In this application, if only a single dual-branch feature extraction network is used to extract hierarchical information, both the low-level local information and the high-level global information will lack clear physical meaning, which will seriously affect the dual-branch feature extraction network's extraction and retention of drone edge information. By adopting the dual-branch feature extraction network and the frequency domain feature extraction module mode in this embodiment, not only can multi-level features such as texture, edge, and global semantics be obtained, but different feature matrices (feature maps) can also have clear physical meanings.
[0084] In the face of the extracted multi-level features, if a simple connection operation is taken, the ability of the multi-dimensional hierarchical features to express the drone features will be weakened, thereby affecting the ability to extract drone features. This embodiment adopts a feature fusion method based on the attention mechanism, which not only reasonably utilizes the multi-level features, but also improves the expression ability of the multi-level features and multi-image content.
[0085] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used for a drone detection method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a drone detection method is implemented.
[0086] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.
[0087] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0088] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0089] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0090] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.
[0091] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0092] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A drone detection method, characterized in that: The drone detection method comprises: Constructing a drone dataset; the drone dataset includes: drone images and corresponding edge images; Based on the drone data set, a drone detection model is obtained by using a deep learning method; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the first frequency domain feature extraction module in the dual-branch feature extraction network of the next layer The first frequency domain feature extraction module is connected to the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to extract features based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second to last layer; the threshold segmentation module is used to obtain a drone detection result by performing threshold segmentation on the fused feature image; Based on the drone image to be detected and the corresponding edge image, the trained drone detection model is used to obtain the drone detection result.
2. The drone detection method according to claim 1, characterized in that: The construction of the drone dataset specifically includes: Acquire drone imagery; Preprocessing the drone image; Based on the pre-processed UAV image, the edge image is extracted using the Canny operator to obtain the edge image corresponding to the UAV image; A drone dataset is constructed based on multiple drone images and corresponding edge images.
3. The drone detection method according to claim 1, characterized in that: The loss function of the trained drone detection model specifically includes: Using the formula L = L edge (Edge, GT edge )+L dice (OUTPUT, GT) determines the loss function of the trained drone detection model; Among them, L represents the loss function of the trained drone detection model, GT edge represents the edge image corresponding to the drone image, L edge Represents the loss function of the edge feature image, L dice Represents the dice loss calculation function, Edge represents the edge feature image, GT represents the drone image, and OUTPUT represents the target feature image.
4. The drone detection method according to claim 1, wherein: The first frequency domain feature extraction module and the second frequency domain feature extraction module both include: a fast Fourier transform unit, a first frequency domain convolution unit, a first frequency domain batch normalization unit, a first frequency domain activation function unit, a second frequency domain convolution unit, a second frequency domain batch normalization unit, a second frequency domain activation function unit and an inverse Fourier transform unit.
5. The drone detection method according to claim 4, characterized in that: The first frequency domain feature extraction module and the second frequency domain feature extraction module specifically include: Use the formula x = FFT (Inmut) to determine the frequency domain image and edge frequency domain image of the drone; Using the formula x inter =Cbn(Cconv(Crelu(Cbn(Cconv(x)))))) determines the frequency domain feature image and edge frequency domain feature image of the drone; Using the formula Output = IFFT (Crelu (x inte ))Determine the drone feature image and edge feature image; Where x represents the frequency domain image and edge frequency domain image of the drone, FFT represents the fast Fourier transform function, Input represents the drone image and the corresponding edge image; x inter represents the frequency domain feature image and edge frequency domain feature image of the drone, Cbn represents the frequency domain batch normalization operation, Cconv represents the complex domain convolution, Crelu represents the complex domain activation function Relu; Output represents the drone feature image and edge feature image, and IFFT represents the inverse Fourier transform.
6. The drone detection method according to claim 3, characterized in that: The gated convolution module specifically includes: Using the formula Output1 = Gate (x1, Edge) and Y Gate =Output1⊙σ(edge) determines the target feature image; Among them, Output1 represents the image after the drone feature image and the edge feature image are superimposed, Gate represents the gated convolution operation, x1 represents the drone feature image, and Y Gate Represents the target feature image, ⊙ represents the element-by-element multiplication operation, and σ represents the Sigmoid function.
7. The drone detection method according to claim 1, characterized in that: The upsampling module specifically includes: Use the formula High=Dimcg((Bintp(High input )))+TC(High input ) and Output2 = Conv(Low input )+High*Sigmoid(Conv(Low input ))Determine the fusion feature image; Among them, High represents the result of the target feature image output by the dual-branch feature extraction network of the last layer after being processed by the upsampling module, Dimcg represents dimension adjustment, Bintp represents bilinear interpolation, TC represents deconvolution function, High input Represents the target feature image output by the dual-branch feature extraction network of the last layer, Output2 represents the fused feature image, Conv represents the convolution operation function, Sigmoid represents the activation function, Low input Target feature image representing the output of the penultimate layer’s two-branch feature extraction network.
8. A drone detection system, applied to the drone detection method according to any one of claims 1 to 7, characterized in that: The drone detection system includes: A data set construction module is used to construct a drone data set; the drone data set includes: drone images and corresponding edge images; The drone detection model acquisition module is used to obtain a drone detection model based on a drone data set using a deep learning method; the drone detection model includes: a multi-layer dual-branch feature extraction network, an upsampling module, and a threshold segmentation module; the dual-branch feature extraction network includes: a first frequency domain feature extraction module, a second frequency domain feature extraction module, and a gated convolution module; the first frequency domain feature extraction module and the second frequency domain feature extraction module are connected to the gated convolution module; the gated convolution module in the dual-branch feature extraction network of the current layer is connected to the second frequency domain feature extraction module of the dual-branch feature extraction network of the next layer; the first frequency domain feature extraction module in the dual-branch feature extraction network of the current layer is connected to the dual-branch feature extraction module of the next layer The first frequency domain feature extraction module in the network is connected; the first frequency domain feature extraction module is used to perform feature extraction based on the edge image corresponding to the drone image to obtain an edge feature image; the second frequency domain feature extraction module is used to perform feature extraction based on the drone image to obtain a drone feature image; the gated convolution module is used to fuse the edge feature image and the drone feature image to obtain a target feature image; the upsampling module is used to obtain a fused feature image based on the target feature image output by the double-branch feature extraction network of the last layer and the target feature image output by the double-branch feature extraction network of the second-to-last layer; the threshold segmentation module is used to obtain a drone detection result by performing threshold segmentation on the fused feature image; The drone detection module is used to obtain drone detection results based on the drone image to be detected and the corresponding edge image using the trained drone detection model.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the drone detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the drone detection method according to any one of claims 1 to 7 is implemented.