A method and system for rapid detection and identification of UAV signals based on improved YOLO v5m

By improving the YOLO v5m model and the high-speed drone signal acquisition system, the problem of insufficient accuracy and speed in drone signal recognition in complex environments has been solved, achieving efficient and accurate drone type recognition.

CN118505968BActive Publication Date: 2026-11-17NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410604996.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2026-11-17
Estimated Expiration
2044-05-15

AI Technical Summary

Technical Problem

Existing drone signal recognition technology is susceptible to interference in complex environments, resulting in insufficient detection accuracy and speed, making it difficult to effectively identify drone types.

Method used

An improved YOLO v5m model is adopted, combined with short-time fast Fourier transform and image preprocessing. The detection performance is improved by self-attention mechanism, decoupling head and EIOU loss function, and ghost convolution is used to optimize the model structure, so as to build a high-speed acquisition and real-time recognition system for UAV signals.

Benefits of technology

It improves the detection accuracy and recall rate of UAV signals and reduces the false negative rate under poor channel conditions and co-frequency interference, thus meeting the requirements of real-time identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505968B_ABST
    Figure CN118505968B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for rapid detection and recognition of drone signals based on an improved YOLO v5m. First, drone signals are acquired and subjected to a short-time fast Fourier transform to create a multi-drone signal time-frequency graph dataset. Then, image preprocessing and dataset creation are performed. Next, an improved YOLO v5m model is built and trained to obtain a drone signal detection and recognition model, which is then tested. This invention improves the detection accuracy of drone signals in poor channel conditions and when overwhelmed by interference in the same frequency band, reduces the false negative rate, and improves both accuracy and recall compared to existing detection technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of unmanned aerial vehicle (UAV) technology, specifically relating to a method and system for rapid detection and identification of UAV signals based on an improved YOLO v5m. Background Technology

[0002] With the explosive growth of drone applications, various forms of unauthorized drone flights have also emerged. Drones are widely used for various purposes, including aerial photography, agriculture, monitoring, wireless coverage, mobile edge computing, and emergency rescue, improving people's quality of life and bringing significant economic benefits. However, with the increase in the number of drones, some potential security threats have also arisen. Therefore, monitoring and managing illegally accessed drones has become crucial, and accurately and quickly identifying the type of drone is a prerequisite for countering drone attacks.

[0003] Currently, technologies used for drone detection and classification are mainly based on radar, sound, image, and radio frequency signals. Traditional radar for low-altitude drone monitoring has high radiation and power consumption, making it unsuitable for 24-hour operation, especially in urban environments where large-scale deployment causes significant electromagnetic pollution. Optical recognition drones are susceptible to interference from light intensity, clouds, fog, and obstructions, and their monitoring performance is poor at night. Voiceprint recognition drones have too short a detection range and are unsuitable for noisy urban environments. Identifying and locating drones based on their signal characteristics can effectively detect drones and is a valuable supplement to traditional anti-drone detection methods.

[0004] In recent years, with the rapid development of deep learning, the ability to recognize radio frequency signals of drones has been greatly improved. A series of methods based on target detection have emerged, including YOLO, R-CNN, Faster R-CNN, RetinaNet, and SSD. The YOLO series of networks has received more attention due to its ability to strike a good balance between accuracy and speed.

[0005] Existing methods only study clean UAV radio frequency signals. Due to the complexity of the real-world UAV flight environment, the presence of interference signals in the same frequency band severely impacts the detection and identification results. Therefore, there is an urgent need to develop a UAV signal identification method that can effectively cope with interference and has high detection accuracy. For the security issue of unauthorized UAV flights, the timeliness of identification is of paramount importance. Therefore, there is an urgent need for a UAV signal identification system solution with high detection speed. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, this invention provides a method and system for rapid detection and recognition of drone signals based on an improved YOLO v5m. First, drone signals are acquired and subjected to a short-time fast Fourier transform to create a multi-drone signal time-frequency graph dataset. Then, image preprocessing and dataset creation are performed. Next, an improved YOLO v5m model is built and trained to obtain a drone signal detection and recognition model, which is then tested. This invention improves the detection accuracy of drone signals under poor channel conditions and when overwhelmed by interference in the same frequency band, reduces the false negative rate, and improves both accuracy and recall compared to existing detection technologies.

[0007] The technical solution adopted by this invention to solve its technical problem is as follows:

[0008] Step 1: Collect UAV signals and perform short-time fast Fourier transform to create a multi-UAV signal time-frequency graph dataset;

[0009] Step 2: Image preprocessing operations;

[0010] The contrast of weak signals in the time-frequency graph dataset obtained in step 1 is enhanced by contrast enhancement to obtain the enhanced dataset.

[0011] Step 3: Dataset creation;

[0012] The time-frequency images in the dataset obtained in step 2 are divided into training and validation sets in a 5:1 ratio. Then, the LabelImg annotation tool is used to label the images to obtain seven drone time-frequency image labels, including Parrot, FIMI, Phantom 20, Mavic Air, Mavic Mini, Phantom 10, and Mavic 3 Pro.

[0013] Step 4: Build the improved YOLO v5m model;

[0014] The YOLO v5m model includes an input module, a backbone module, a neck module, and a prediction head module.

[0015] The improvement method is as follows: add a self-attention mechanism to the backbone module of the YOLO v5m model, replace the original detection head with a decoupled head in the prediction head module, replace the original bounding box loss function CIOU with EIOU, and replace the original ordinary convolution with ghost convolution.

[0016] Step 5: Training the improved YOLO v5m model;

[0017] The training set and validation set are respectively input into the improved YOLO v5m model for training and validation, to obtain the UAV signal detection and recognition model;

[0018] Step 6: Testing the UAV signal detection and recognition model;

[0019] Input a portion of the time-frequency graph from the validation set into the UAV signal detection and recognition model to obtain the recognition results of the UAV signal type in the time-frequency graph.

[0020] Furthermore, the contrast enhancement employs a histogram equalization method, the specific steps of which are as follows:

[0021] Step 2-1: Count the number of pixels at each gray level in the time-frequency image to obtain the histogram statistics of the gray levels;

[0022] Step 2-2: Obtain the cumulative histogram for each gray level using the histogram;

[0023] Steps 2-3: Implement global histogram equalization according to the following mapping method:

[0024]

[0025] Where p represents the gray level of a pixel in the original image, q represents the gray level of a pixel after global histogram equalization, and histogram equalization... I (k) represents the histogram count of pixels with gray level k in the original image, and H and W represent the number of pixels in the horizontal and vertical directions of the image, respectively.

[0026] Furthermore, the input module is used to perform Mosaic data augmentation, anchor box calculation, and image scaling on the input image;

[0027] The structure of the backbone module is as follows:

[0028] Focus—GhostConv_1—C3_1—GhostConv_2—C3_2—GhostConv_3—C3_3—GhostConv_4—C3_4—CBAM—SPPF;

[0029] The structure of the neck module is as follows:

[0030] GhostConv_5—Upsample_1—Concat_1—C3_5—GhostConv_6—Upsample_2—Concat_2—C3_6—GhostConv_7—Concat_3—C3_7—GhostConv_8—Concat_4—C3_8, where the output of C3_3 is connected to the input of Concat_1, the output of C3_2 is connected to the input of Concat_2, the output of GhostConv_6 is connected to the input of Concat_3, and the output of GhostConv_5 is connected to the input of Concat_4;

[0031] The output module includes three decoupling heads of different scales: Large_Head, Middle_Head, and Small_Head.

[0032] The image generated by the input module serves as the input to Focus in the backbone module. The output of SPPF in the backbone module is connected to the input of GhostConv_5 in the neck module. The outputs of C3_6, C3_7, and C3_8 in the neck module are connected to the inputs of Small_Head, Middle_Head, and Large_Head in the output module, respectively.

[0033] A rapid detection and recognition system for drone signals based on an improved YOLO v5m includes a host computer and a high-speed drone signal acquisition system; the host computer is equipped with an image preprocessing system and a real-time recognition system.

[0034] The high-speed signal acquisition system for unmanned aerial vehicles (UAVs) uses the ADRV9026 RF chip and the ZU15 chip to acquire signals in four channels and transmits them to the host computer through four SFP optical ports and 10G optical fiber.

[0035] The image preprocessing system performs short-time fast Fourier transform, calculates the power spectrum, and performs contrast enhancement operations on the acquired signal to obtain a time-frequency diagram;

[0036] The real-time recognition system uses GPU-accelerated models to perform inference operations on time-frequency maps and displays the recognition results in real time as a video stream.

[0037] Furthermore, the high-speed UAV signal acquisition system uses an ADRV9026 RF chip equipped with a ZYNQ ZU15 FPGA chip, for four-channel signal acquisition, each with a 200MHz bandwidth, 16-bit sampling, a sampling rate of 245.76MSPS, and a center frequency of 2437MHz, covering the 2400-2476MHz frequency band of civilian UAVs; the sampled spatial signal data is transmitted to the host computer via four SFP optical ports, supporting a maximum transmission rate of 40Gib / s.

[0038] Furthermore, the image preprocessing system utilizes the CUDA programming framework to perform Fourier transform, power spectrum calculation, and image contrast enhancement on the signal data received by the host computer, thereby accelerating the data processing process.

[0039] Furthermore, the drone signal detection and recognition model can be deployed to the MNN inference engine, using GPU to accelerate the model's inference operations, and displaying the inference results in real time as a video stream.

[0040] The beneficial effects of this invention are as follows:

[0041] 1. This invention adopts a global histogram equalization contrast enhancement method, which improves the detection accuracy of UAV signals when the channel conditions are poor and the signals are overwhelmed by interference in the same frequency band, and reduces the false detection rate.

[0042] 2. This invention employs an improved YOLO v5m object detection model. It utilizes the CBAM attention mechanism to enhance the model's focus on important features and uses a decoupled head that separates classification and localization as the detection head, thereby improving detection performance. The EIOU loss function is used to enhance the model's focus on the predicted bounding box width and height, thus improving the quality of the predicted bounding boxes. GhostConv is used to replace the original convolutional layers to lightweight the model. Compared with existing detection techniques, this invention improves both accuracy and recall.

[0043] 3. This invention establishes a system for rapid detection and identification of UAV signals, which has a high identification speed and meets real-time requirements. Attached Figure Description

[0044] Figure 1 This is a structural diagram of the improved YOLO v5m model of this invention;

[0045] Figure 2 This is a structural diagram of the CBAM attention mechanism in this invention;

[0046] Figure 3 This is a diagram of the ghost convolution structure in this invention;

[0047] Figure 4 This is a framework diagram of the real-time signal recognition system for unmanned aerial vehicles (UAVs) of the present invention.

[0048] Figure 5 This is a flowchart illustrating the data and image preprocessing of the acquired signals according to the present invention;

[0049] Figure 6 This is a schematic diagram of CUDA programming for the present invention;

[0050] Figure 7 This is a sample diagram of the time-frequency graph of the UAV signal in this invention;

[0051] Figure 8 This is a comparison image before and after image enhancement according to the present invention, wherein the first column is the original input image and the second column is the image after contrast enhancement;

[0052] Figure 9 The images shown are the detection results before and after image enhancement according to the present invention. The first column is the recognition result before image enhancement, the second column is the true bounding box and label of the UAV signal in the image, and the third column is the recognition result after image enhancement.

[0053] Figure 10 This is a schematic diagram of the model validation confusion matrix in this invention. Detailed Implementation

[0054] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0055] This invention proposes a method and system for rapid detection and identification of UAV signals based on an improved YOLO v5m, the technical solution of which includes:

[0056] Step 1: Collect UAV signals, perform short-time fast Fourier transform, and create a multi-UAV signal time-frequency graph dataset;

[0057] Step 2: Image preprocessing;

[0058] The contrast of weak signals in the time-frequency graph dataset obtained in step one is enhanced by contrast enhancement to obtain the enhanced dataset.

[0059] Step 3: Dataset Creation;

[0060] The images obtained in step two are divided into training and validation sets in a 5:1 ratio. Then, the LabelImg annotation tool is used to label the images to obtain seven drone time-frequency map labels, including Parrot, FIMI, Phantom 20, Mavic Air, Mavic Mini, Phantom 10, and Mavic 3 Pro.

[0061] Step 4: Build the improved YOLO v5m model structure; the YOLO v5m model includes an input module, a backbone module, a neck module, and a prediction head module. Add a self-attention mechanism to the YOLO v5m model backbone module. In the prediction head module, replace the original detection head with a decoupled head, replace the original bounding box loss function CIOU with EIOU, and replace the original ordinary convolution with ghost convolution.

[0062] Step 5: Training the improved YOLO v5m model structure; Input the enhanced training set and validation set from Step 3 into the improved YOLO v5m model structure for training and validation, respectively, to obtain the UAV signal detection and recognition model;

[0063] Step Six: Testing the improved YOLO v5m model structure; input the time-frequency graphs from the validation set in Step Three into the model obtained in Step Five to obtain the identification results of the UAV signal type in the time-frequency graphs.

[0064] The steps for enhancing the contrast of a time-frequency image using histogram equalization are as follows:

[0065] S1. Count the number of pixels at each gray level of the time-frequency image to obtain the gray level histogram statistics;

[0066] S2. Obtain the cumulative histogram for each gray level using the histogram;

[0067] S3. Implement global histogram equalization using the following mapping method:

[0068]

[0069] Where p represents the gray level of a pixel in the original image, q represents the gray level of a pixel after global histogram equalization, and histogram equalization... I (k) represents the histogram count of pixels with gray level k in the original image, and H and W represent the number of pixels in the horizontal and vertical directions of the image, respectively.

[0070] The input module performs Mosaic data augmentation, anchor box calculation, and image scaling on the input image.

[0071] The structure of the main module is as follows:

[0072] Focus—GhostConv_1—C3_1—GhostConv_2—C3_2—GhostConv_3—C3_3—GhostConv_4—C3_4—CBAM—SPPF;

[0073] The structure of the neck module is as follows:

[0074] GhostConv_5—Upsample_1—Concat_1—C3_5—GhostConv_6—Upsample_2—Concat_2—C3_6—GhostConv_7—Concat_3—C3_7—GhostConv_8—Concat_4—C3_8, where the output of C3_3 is connected to the input of Concat_1, the output of C3_2 is connected to the input of Concat_2, the output of GhostConv_6 is connected to the input of Concat_3, and the output of GhostConv_5 is connected to the input of Concat_4;

[0075] The output module includes three decoupling headers of different scales: Large_Head, Middle_Head, and Small_Head.

[0076] The image generated by the input module serves as the input to Focus in the trunk module. The output of SPPF in the trunk module is connected to the input of GhostConv_5 in the neck module. The outputs of C3_6, C3_7, and C3_8 in the neck module are connected to the inputs of Small_Head, Middle_Head, and Large_Head in the output module, respectively.

[0077] The present invention also provides a rapid detection and recognition system for drone signals based on an improved YOLO v5m, including a host computer and a high-speed drone signal acquisition system; the host computer is equipped with an image preprocessing system and a real-time recognition system;

[0078] The high-speed signal acquisition system for unmanned aerial vehicles (UAVs) uses the ADRV9026 RF chip and the ZU15 chip to acquire signals in four channels and transmits them to the host computer through four SFP optical ports and 10G optical fiber.

[0079] The image preprocessing system performs short-time fast Fourier transform, calculates the power spectrum, and performs contrast enhancement operations on the acquired signal to obtain a time-frequency diagram;

[0080] The real-time recognition system uses GPU-accelerated models to perform inference operations on time-frequency maps and displays the recognition results in real time as a video stream.

[0081] The high-speed UAV signal acquisition system uses the ADRV9026 RF chip with a ZYNQ ZU15 FPGA chip, enabling four-channel signal acquisition, each with a 200MHz bandwidth, 16-bit sampling, and a sampling rate of 245.76MSPS. The center frequency is set to 2437MHz, covering the 2400-2476MHz frequency band for civilian UAVs. The sampled spatial signal data is transmitted to the host computer via four SFP optical ports, supporting a maximum transmission rate of 40Gib / s.

[0082] By utilizing the CUDA programming framework, operations such as Fourier transform, power spectrum calculation, and image contrast enhancement are performed on the signal data received by the host computer to accelerate the data processing.

[0083] The recognition model is deployed to the MNN inference engine, leveraging GPUs to accelerate the model's inference operations. Finally, the inference results are displayed in real-time as a video stream.

[0084] Example 1

[0085] This embodiment provides a method for detecting and recognizing drone signals based on an improved YOLO v5m.

[0086] Figure 1 This is an improved detection network framework based on the widely used and high-performance YOLO v5 benchmark network, including an input module, backbone module, neck module, and output module. Improvements to the YOLO v5 benchmark network include:

[0087] In the main module, the following were added: Figure 2 The CBAM attention mechanism shown uses a feature map F∈R with C channels, W width, and H height. C*H*WThe input is fed into the network, where one-dimensional channel attention weights M are first inferred based on the input features. c (F)∈R C *1*1 The input feature map and weights are multiplied element-wise to obtain a new feature map F'∈R. C*H*W Inferring the spatial attention weights M of the new feature map s (F')∈R 1*H*W The network output F”∈R is obtained by performing element-wise multiplication with the new feature map. C*H*W The equation for the attention process is as follows:

[0088]

[0089]

[0090] Calculate the channel attention weights M c When (F), first perform average pooling and max pooling on the input features to generate AvgPool(F)∈R. C*1*1 and MaxPool(F)∈R C*1*1 The pooling results are passed through a multilayer perceptron network (MLP), and the results from each network are summed. Finally, the channel attention weights are obtained using the sigmoid function σ. The calculation method is as follows:

[0091] M c (F')=σ(f 7*7 ([AvgPool(F');MaxPool(F')])) (3)

[0092] The output of the channel attention network serves as the input to the spatial attention network. First, global average pooling and global max pooling are performed on the input, followed by concatenation of the results. Then, a convolution with a kernel of 7 and padding of 3 is performed. 7*7 Finally, the output of the convolution is passed through the sigmoid function to obtain the spatial attention weights. The calculation method is as follows:

[0093] M c (F')=σ(f 7*7 ([AvgPool(F');MaxPool(F')])) (4)

[0094] In YOLOv5, multiple layers contain a large amount of channel information, and many similar feature maps exist across different channels. Using ordinary convolution for feature mapping is computationally expensive. For example... Figure 3 As shown, introducing GhostConv can reduce the computational cost of feature mapping, improve training and inference speed, and maintain similar recognition performance.

[0095] By replacing the three detection heads at different scales with decoupling heads, the classification and regression tasks can be performed separately to resolve feature conflict issues.

[0096] The YOLOv5 model uses CIOU as the loss function for predicted bounding boxes, taking into account the shape of the predicted boxes. However, this only reflects the aspect ratio loss and does not consider the loss between the width and height of the predicted box and the width and height of the ground truth bounding box, respectively. In this invention, the time-frequency maps of UAV image transmission signals are all rectangular, and the target boundary and the height of the ground truth bounding box coincide. Reducing the length and width difference between the predicted box and the ground truth bounding box can improve the completeness of the target information obtained by the predicted box and improve the recognition performance. At the same time, reducing the background in the prediction result improves the quality of the predicted box. Therefore, this paper introduces EIOU to replace CIOU in the original model. The EIOU formula is as follows:

[0097]

[0098] Where b and b gt This represents the center point of the predicted bounding box and the ground truth bounding box. This represents the distance from the center point. w and h represent the width and height of the predicted bounding box, respectively. gt and h gt This represents the width and height of the actual bounding box.

[0099] Figure 4 This is a block diagram of a real-time UAV signal identification system. The High-speed signal acquisition and transmission board module is the signal acquisition system of this invention. The board consists of an ADRV9026 RF chip and a ZYNQZU15 FPGA chip, equipped with four signal acquisition channels, each with a bandwidth of 200MHz. The board has a 16-bit sampling accuracy and a sampling rate of 245.76MSPS. Its RF operating range covers the UAV signal frequency band from 75MHz to 6GHz. The FPGA performs signal filtering preprocessing operations, and then uses the User Datagram Protocol (UDP) mode to transmit the processed data to the host.

[0100] After receiving the signal, the host first performs data and image preprocessing operations to generate an enhanced time-frequency map. The specific steps are as follows:

[0101] S1. Perform a short-time fast Fourier transform on the acquired signal to generate a time-frequency matrix with frequency on the horizontal axis and time on the vertical axis;

[0102] S2. Calculate the power spectrum, and the power spectrum matrix generated at time;

[0103] S3. Normalize the time-power spectrum matrix and perform 256 levels of grayscale to generate the original time-frequency diagram;

[0104] S4. Perform global histogram equalization on the original time-frequency plot to generate an enhanced time-frequency plot.

[0105] The specific steps of global histogram equalization are as follows:

[0106] S1. Count the number of pixels at each gray level of the time-frequency image to obtain the gray level histogram statistics;

[0107] S2. Obtain the cumulative histogram for each gray level using the histogram;

[0108] S3. Implement global histogram equalization using the following mapping method:

[0109]

[0110] Where p represents the gray level of a pixel in the original image, q represents the gray level of a pixel after global histogram equalization, and histogram equalization... I (k) represents the histogram count of pixels with gray level k in the original image, and H and W represent the number of pixels in the horizontal and vertical directions of the image, respectively.

[0111] Data and image preprocessing operations are performed using CUDA programming, as illustrated in the diagram below. Figure 6 As shown;

[0112] Figure 7 Examples of time-frequency maps of different types of drone signals generated in indoor or outdoor environments through data and image preprocessing operations are shown.

[0113] Figure 8 The image preprocessing diagrams show a comparison before and after image preprocessing. The first row shows the time-frequency graph of weak UAV signals with poor channel conditions, and the second row shows the time-frequency graph of UAV signals overwhelmed by interference signals in the same frequency band. After global histogram equalization, the UAV signals are much clearer.

[0114] A time-frequency image atlas of 3860 images representing 7 types of drones was generated through data and image preprocessing. These images were then divided into training and validation sets at a 5:1 ratio. Both sets were fed into an improved YOLO v5m dataset for training, resulting in a model for drone recognition. The specific steps are as follows:

[0115] S1. Use the LabelImage annotation tool to annotate the UAV signals in the time-frequency image set, and generate a YOLO format annotation file. Each image corresponds to a txt format annotation file.

[0116] Contents of the txt file in Table 1:

[0117]

[0118] S2. Divide the dataset containing labeled files into a training set and a validation set in a 5:1 ratio, where the time-frequency plots and labeled files correspond one-to-one.

[0119] S3. Input the dataset into... Figure 1 In the network, the training parameters are configured. The specific parameters are related to the hardware devices. After training for 130 rounds, the optimal weight file is obtained.

[0120] Figure 9 This paper demonstrates the recognition performance of the optimal weight file on drones in the time-frequency graph before and after image processing. The first column shows the recognition performance before image processing, the second column shows the ground truth bounding box positions of the drone signals in the time-frequency graph, and the third column shows the recognition performance after image processing. Image enhancement processing can effectively address the problem of the model missing weak drone signals and drone signals that are overwhelmed by interference, thus reducing the false negative rate.

[0121] Figure 10 The confusion matrix for validating the optimal weight file is shown. Due to the short duration of Mavic Air and Mavic Mini signals, they appear as very small rectangles in the time-frequency plot, making them easily mistaken by the model as background interference signals, resulting in a low recognition rate. Other types of drone signals all exhibit high recognition rates.

[0122] Table 2 Detection index results of different detection models

[0123]

[0124] Example 2

[0125] This embodiment provides a rapid detection and identification system for drone signals based on an improved YOLO v5m. The system implementation process is as follows: Figure 4 As shown, the specific steps are as follows:

[0126] S1. The signal acquisition board acquires signals in the space, and ADRV9026 converts the radio frequency signals into digital signals;

[0127] The S2.FPGA implements the preprocessing operation of filtering and transmits it to the host computer in User Datagram Protocol (UDP) mode through an SFP optical module with a maximum data transmission rate of 40Gb / s.

[0128] S3. After receiving the signal, the host computer first performs data and image preprocessing operations to generate an enhanced time-frequency diagram;

[0129] S4. Generate the optimal weight file through Example 1, and deploy the optimal weight file to the MNN inference engine framework of the host computer. The time-frequency map generated in S3 will be used as the input of the framework. The inference operation is accelerated by GPU to generate the recognition result, and the result is displayed in real time as a video stream. The video stream can reach 250fps.

[0130] The specific implementation steps of the MNN inference engine are as follows:

[0131] S1. Convert the time-frequency graph in GPU memory into NCHW format (1*3*640*640, where 1 represents one image, 3 represents RGB three channels, and 640 represents the width and height of the image as 640), and use it as the input tensor of MNN;

[0132] S2. Create an MNN session and initialize GPU memory, threads, network model (optimal weight file), input and output resources, etc.

[0133] S3. Run the inference session and calculate the model output vector (including the coordinates of the output box, confidence score, and category information);

[0134] S4. Filter the output boxes by confidence threshold and discard the output boxes that are below the threshold;

[0135] S5. Remove overlapping boxes using the non-maximum suppression method to obtain the final result containing the target box information.

Claims

1. A method for rapid detection and identification of drone signals based on an improved YOLO v5m, characterized in that, Includes the following steps: Step 1: Collect UAV signals and perform short-time fast Fourier transform to create a multi-UAV signal time-frequency graph dataset; Step 2: Image preprocessing operations; The contrast of weak signals in the time-frequency graph dataset obtained in step 1 is enhanced by contrast enhancement to obtain the enhanced dataset; the contrast enhancement adopts the histogram equalization method. Step 3: Dataset creation; The time-frequency images in the dataset obtained in step 2 are divided into training and validation sets in a 5:1 ratio. Then, the LabelImg annotation tool is used to label the images to obtain seven drone time-frequency image labels, including Parrot, FIMI, Phantom 20, Mavic Air, Mavic Mini, Phantom 10, and Mavic 3 Pro. Step 4: Build the improved YOLO v5m model; The YOLO v5m model includes an input module, a backbone module, a neck module, and a prediction head module. The improvement method is as follows: add a self-attention mechanism to the backbone module of the YOLO v5m model, replace the original detection head with a decoupled head in the prediction head module, replace the original bounding box loss function CIOU with EIOU, and replace the original ordinary convolution with ghost convolution. Step 5: Training the improved YOLO v5m model; The training set and validation set are respectively input into the improved YOLO v5m model for training and validation, to obtain the UAV signal detection and recognition model; Step 6: Testing the UAV signal detection and recognition model; Input a portion of the time-frequency graph from the validation set into the UAV signal detection and recognition model to obtain the recognition results of the UAV signal type in the time-frequency graph.

2. The method for rapid detection and identification of UAV signals based on improved YOLO v5m according to claim 1, characterized in that, The specific steps of the histogram equalization method are as follows: Step 2-1: Count the number of pixels at each gray level in the time-frequency image to obtain the histogram statistics of the gray levels; Step 2-2: Obtain the cumulative histogram for each gray level using the histogram; Steps 2-3: Implement global histogram equalization according to the following mapping method: in Represents the gray level of a pixel in the original image. This represents the gray level of a pixel after global histogram equalization. This indicates that the original image has gray levels of 1. The number of pixels in the histogram. and These represent the number of pixels in the horizontal and vertical directions of the image, respectively.

3. The method for rapid detection and identification of UAV signals based on the improved YOLO v5m according to claim 2, characterized in that, The input module is used to perform Mosaic data augmentation, anchor box calculation, and image scaling on the input image; The structure of the backbone module is as follows: Focus—GhostConv_1—C3_1—GhostConv_2—C3_2—GhostConv_3—C3_3—GhostConv_4—C3_4—CBAM—SPPF; The structure of the neck module is as follows: GhostConv_5—Upsample_1—Concat_1—C3_5—GhostConv_6—Upsample_2—Concat_2—C3_6—GhostConv_7—Concat_3—C3_7—GhostConv_8—Concat_4—C3_8, where the output of C3_3 is connected to the input of Concat_1, the output of C3_2 is connected to the input of Concat_2, the output of GhostConv_6 is connected to the input of Concat_3, and the output of GhostConv_5 is connected to the input of Concat_4; The prediction head module includes three decoupling heads of different scales: Large_Head, Middle_Head, and Small_Head. The image generated by the input module serves as the input to Focus in the backbone module. The output of SPPF in the backbone module is connected to the input of GhostConv_5 in the neck module. The outputs of C3_6, C3_7, and C3_8 in the neck module are connected to the inputs of Small_Head, Middle_Head, and Large_Head in the output module, respectively.

4. A detection and identification system employing the method described in claim 1, characterized in that, This includes a host computer and a high-speed signal acquisition system for unmanned aerial vehicles (UAVs); the host computer is equipped with an image preprocessing system and a real-time recognition system. The high-speed signal acquisition system for unmanned aerial vehicles (UAVs) uses the ADRV9026 RF chip and the ZU15 chip to acquire signals in four channels and transmits them to the host computer through four SFP optical ports and 10G optical fiber. The image preprocessing system performs short-time fast Fourier transform, calculates the power spectrum, and performs contrast enhancement operations on the acquired signal to obtain a time-frequency diagram; The real-time recognition system uses GPU-accelerated models to perform inference operations on time-frequency maps and displays the recognition results in real time as a video stream.

5. The detection and identification system according to claim 4, characterized in that, The high-speed UAV signal acquisition system uses an ADRV9026 RF chip with a ZYNQ ZU15 FPGA chip for four-channel signal acquisition, each with a 200MHz bandwidth, 16-bit sampling, and a sampling rate of 245.76MSPS. The center frequency is set to 2437MHz, covering the 2400-2476MHz frequency band for civilian UAVs. The sampled spatial signal data is transmitted to the host computer via four SFP optical ports, supporting a maximum transmission rate of 40Gib / s.

6. The detection and identification system according to claim 4, characterized in that, The image preprocessing system utilizes the CUDA programming framework to perform Fourier transform, power spectrum calculation, and image contrast enhancement operations on the signal data received by the host computer, thereby accelerating the data processing process.

7. The detection and identification system according to claim 4, characterized in that, The drone signal detection and recognition model can be deployed to the MNN inference engine, using GPU to accelerate the model's inference operations, and displaying the inference results in real time as a video stream.