A signal detection method based on improved YOLOv5

By improving the YOLOv5 algorithm, the problems of accuracy and speed in narrowband signal detection under complex electromagnetic environments have been solved, achieving efficient and accurate signal detection, which is suitable for non-cooperative communication environments.

CN116738225BActive Publication Date: 2025-11-11ZHENGZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310611620.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-11-11
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

In complex electromagnetic environments, existing technologies struggle to efficiently detect narrowband signals in broadband channels, especially in non-cooperative communication, where the accuracy and speed of signal detection need improvement.

Method used

The YOLOv5 algorithm is improved by preprocessing, data augmentation, feature extraction, and loss function optimization using a time-frequency graph dataset for signal detection. This includes using improved Mosaic data augmentation, the CBAM module, the WBF algorithm, and the Focal-EIoU loss function to enhance the accuracy of signal detection.

Benefits of technology

It enables efficient detection of narrowband signals in complex electromagnetic environments, improves the accuracy and speed of signal detection, and can accurately mark parameters such as signal position, bandwidth and center frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116738225B_ABST
    Figure CN116738225B_ABST
Patent Text Reader

Abstract

This invention discloses a signal detection method based on an improved YOLOv5. The method includes: 1. Performing a short-time Fourier transform on the received signal to obtain its time-frequency map, and then converting the time-frequency map to grayscale to construct a signal detection time-frequency map dataset; 2. Introducing the CBAM module into the classic YOLOv5 to improve the feature extraction capability of the deep learning network; 3. Replacing the NMS algorithm in YOLOv5 with the WBF algorithm to improve the accuracy of the final predicted bounding box; 4. Using an improved Focal-EIoU loss function to enhance the influence of high-quality prediction results during the training process; 5. Training the improved YOLOv5 network model using the Adam optimizer and the signal time-frequency map dataset; 6. Inputting the time-frequency map of the signal to be detected into the trained network model to obtain the signal detection result. This invention is the first to propose using an improved YOLOv5 network model to detect target signals present in received broadband data. This method is simple and practical, achieving high signal detection performance with low complexity, and has pioneering significance for the application of deep learning networks in signal target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communication technology, specifically relating to a signal detection method based on an improved YOLOv5. Background Technology

[0002] With the ever-increasing demands for communication in modern society, the communication environment has become extremely congested, the electromagnetic environment is complex and variable, and signals of various forms can arrive simultaneously. Therefore, the primary task in non-cooperative communication is to detect narrowband signals in broadband channels, measure their relevant parameters, and extract the signals.

[0003] Signal detection involves using specific techniques to determine the existence of a target signal from received broadband data. Early signal detection primarily relied on coarse localization of the signal by the human eye on video images. Deep learning's neural network algorithms possess powerful feature extraction capabilities and have achieved significant success in fields such as image processing. The YOLO series is currently a popular target detection algorithm, offering advantages in both speed and accuracy compared to similar algorithms. Therefore, this paper considers using the improved YOLOv5 algorithm to detect signals in their time-frequency maps. Summary of the Invention

[0004] This invention, based on the success of the YOLOv5 neural network algorithm in object detection, investigates why the YOLOv5 algorithm can be used for signal detection. It establishes a time-frequency graph dataset for signal detection, improves the classic YOLOv5 algorithm based on this dataset, trains the improved algorithm using the dataset, and achieves signal localization in the time-frequency graph, ultimately achieving the goal of signal detection. This includes:

[0005] 1. A signal detection method based on an improved YOLOv5, characterized in that the method comprises:

[0006] S1: Perform a short-time Fourier transform on the received signal to obtain its time-frequency map. Use various preprocessing methods to construct a signal detection time-frequency map dataset. The preprocessing includes: truncating the signal to be detected, with a minimum duration of 50ms and a maximum duration of 4s for each signal, a Gaussian noise floor, and an SNR range of -5 to 10dB. Perform a short-time Fourier transform on the preprocessed signal to obtain its time-frequency map and convert it to grayscale. Each time-frequency map sample contains 5 to 10 target signals, and the center frequency and duration of each signal are randomly determined.

[0007] S2: Improvements are made to the Input, Backbone, and Loss Function of the classic YOLOv5 algorithm. These improvements include:

[0008] Step 2.1: Using the improved Mosaic data augmentation method, during the training process, a time-frequency image is divided into four regions from top to bottom. Four images are randomly selected, and a portion of each of the four images is cropped from one region. Then, these four portions are stitched together according to the corresponding regions to form a new image, thereby increasing the number of data samples.

[0009] Step 2.2: Combining average pooling in the time-frequency graph space and average pooling in the channel, the CBAM (Convolutional Block Attention Module) is introduced to improve the feature extraction capability of the algorithm using an attention mechanism;

[0010] Step 2.3: Replace the NMS algorithm in the classic YOLOv5 with the WBF algorithm, and use the information of all predicted boxes to perform a weighted summation to improve the accuracy of the final predicted boxes;

[0011] Step 2.4: Enhance the impact of high-quality prediction results during the training process using an improved Focal-EIoU loss function;

[0012] Step 2.5: The Head section uses three convolutional layers as the final detectors, with different convolutional layers responsible for detecting signals of different scales;

[0013] S3: Using the time-frequency graph in the training set as input and the label vector in the training set as output label, the improved YOLOv5 algorithm is trained on the signal detection time-frequency graph dataset until convergence, resulting in the final signal detection model; the maximum number of iterations is set to 100, and the algorithm parameters are updated according to the backpropagation algorithm of the neural network by minimizing the loss function until the loss function converges or the number of iterations is reached;

[0014] S4: The time-frequency graph containing multiple signals is fed into the improved YOLOv5 algorithm as input. The algorithm generates prediction boxes to mark the position of the signal in the graph and indicates the signal type, bandwidth, center frequency, and start and end times, thus achieving the purpose of signal detection.

[0015] 2. The method according to claim 1, wherein step 2.1 specifically includes:

[0016] The content of the time-frequency graph represents the information of the signal's frequency domain energy changing over time. The random cropping and splicing method is not suitable for processing time-frequency graphs. This method divides a time-frequency graph into four regions from top to bottom. During the training process, four images are randomly selected, and a portion of each of the four images is cropped from one region. Then, these four parts are spliced ​​together according to their corresponding regions to form a new image. That is, the improved Mosaic data augmentation method crops and splices the time-frequency graph in the frequency domain, thereby completely preserving the time-frequency information of the signal.

[0017] 3. The method according to claim 1, wherein the calculation process of the CBAM module in step 2.2 is as follows:

[0018] First, for input features In the channel attention submodule, the feature map is processed through two parallel max pooling and average pooling operations to compute a set of feature maps with unchanged channels and a scale of 1×1. Next, a set of fully connected layers is used to further compress the number of channels in the feature map. Finally, parallel max pooling and average pooling operations are used to expand the feature map to the original number of channels. The two parallel results are summed and then activated by a sigmoid function to obtain a set of channel attention signals. Multiply the channel attention by the original input to generate a new feature map. In the spatial attention submodule, the feature map F′ processed by the channel attention module is sequentially subjected to max pooling and average pooling to obtain a feature map with the same scale and 1 channel, which is used to represent the features of a specific region. Then, a set of spatial attention feature weights is generated from these feature maps using a convolutional layer and an activation layer. Finally, these feature weights are multiplied by the feature map F′ to generate the final output feature map.

[0019] 4. The method according to claim 1, characterized in that the specific steps of the WBF algorithm in step 2.3 include:

[0020] First, create two lists, B and C, to store all current predicted bounding boxes and their corresponding confidence scores, respectively. Second, create two empty lists, L and F. L stores suitable bounding boxes, and F contains only one fused bounding box. Finally, set a threshold T, iterate through list B, and find all predicted bounding boxes whose IoU with F is greater than T. If no bounding box is found, add it to the end of both B and F. If a bounding box is found, add it to the end of B, and update the bounding boxes in F according to the following formula.

[0021]

[0022] Where C is the confidence score of the predicted bounding box, and X and Y are the X and Y coordinates of the center point of the predicted bounding box, respectively.

[0023] 5. The method according to claim 1, wherein the expression for the Focal-EIoU loss function in step 2.4 is:

[0024]

[0025] Where γ is a parameter controlling the degree of outlier suppression, and IoU is the intersection-over-union ratio of the predicted bounding box and the ground truth bounding box. This represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. and These represent the width and height of the minimum bounding rectangles of the predicted and ground truth boxes, respectively. α is a weighting factor with a value less than 1, and its value is obtained based on the aspect ratio of all targets in the K-means clustering data. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic flowchart of a signal detection method based on an improved YOLOv5 provided in an embodiment of the present invention;

[0028] Figure 2 This is a diagram of the improved YOLOv5 algorithm architecture of this invention;

[0029] Figure 3 This is a structural diagram of the CBAM module in this invention;

[0030] Figure 4 This is a structural diagram of the channel attention module in this invention;

[0031] Figure 5 This is a structural diagram of the spatial attention module in this invention;

[0032] Figure 6 This is a diagram illustrating the signal time-frequency diagram detection effect of the present invention;

[0033] Figure 7 This is a performance comparison curve between the present invention and three other neural network algorithms;

[0034] Figure 8 This is a curve comparing the effectiveness of the four improved methods in this invention; Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] S1: Establish a time-frequency graph dataset for signal detection.

[0037] S2: Using the signal detection time-frequency graph dataset, train the improved YOLOv5 algorithm until convergence.

[0038] S3: Use the trained and improved YOLOv5 algorithm to identify signals on the test set.

[0039] Specifically, step S1 includes:

[0040] A. Establish a training set

[0041] The signals to be detected are truncated, with a minimum duration of 50ms and a maximum duration of 4s for each signal. The noise floor is Gaussian noise, and the SNR range is -5 to 10dB. The preprocessed signals are then subjected to a short-time Fourier transform to obtain their time-frequency maps, which are then converted to grayscale. Each time-frequency map sample contains 5 to 10 target signals, and the center frequency and duration of each signal are randomly determined.

[0042] The short-time Fourier transform is defined as:

[0043]

[0044] Where w(t) is the sliding window function. It can be seen that the STFT is a local spectrum; when w(t) = 1, the definition is:

[0045]

[0046] At this point, the STFT is the definition of the Fourier transform. When the STFT of s(t) is equal to the Fourier transform, only frequency information exists.

[0047] The inverse transform of STFT is:

[0048]

[0049] When the window functions h(t) and w(t) satisfy the following relationship, the signal s(t) can be reconstructed from STFT(τ,ω) using the above equation:

[0050]

[0051] The discrete STFT of a sequence is defined as:

[0052]

[0053] Where N is the length of the sequence s[n], and the width of the window function w[n] is controllable. For time-frequency analysis of a signal, the amplitude is usually analyzed, and its spectrum can be defined as:

[0054]

[0055] The corresponding amplitude diagram is the time-frequency diagram.

[0056] B. Create a test set

[0057] The test set is divided into a test set under Gaussian channel and a test set under Rayli fading channel. The test sets are obtained by simulation under Gaussian white noise environment and Rayli channel respectively. The signal-to-noise ratio (SNR) is -5dB, -4dB, ..., 5dB. For each signal, 300 time-frequency graph samples are generated by short-time Fourier transform at each SNR, for a total of 3300 samples to form the two test sets.

[0058] Further, step S2 includes:

[0059] The improved YOLOv5 in this invention mainly consists of four parts: Input, Backbone, Neck, and Head. The Input stage primarily performs data augmentation on the input image. The Backbone, the core of YOLOv5, is mainly composed of stacked CBS and CSP modules and is responsible for feature learning from the input. In the Neck stage, an SPPF structure is first used to fuse the input feature maps after max pooling. The Head section uses three convolutional layers as the final detector.

[0060] The learning rate was set to 0.001, the batch size to 32, and the maximum epoch to 100 during training. The Adam optimizer was used. The hardware and software configuration information of the experimental environment is shown in the table below:

[0061] Table 1 Experimental Environment Configuration Information

[0062]

[0063] Furthermore, step S3 specifically includes:

[0064] The maximum number of iterations is set to 100. The algorithm parameters are updated according to the backpropagation algorithm of the neural network by minimizing the loss function until the loss function converges or the number of iterations is reached.

[0065] Further, step S4 specifically includes:

[0066] The improved YOLOv5 algorithm takes a time-frequency graph containing multiple signals as input and marks the position of the signal in the graph by generating a prediction box, and indicates parameters such as signal type, bandwidth, center frequency and start and end time, so as to achieve the purpose of signal detection.

Claims

1. A signal detection method based on an improved YOLOv5, characterized in that, The method includes: S1: Perform a short-time Fourier transform on the received signal to obtain its time-frequency map. Use various preprocessing methods to construct a signal detection time-frequency map dataset. The preprocessing includes: truncating the signal to be detected, with a minimum duration of 50ms and a maximum duration of 4s for each signal, a Gaussian noise floor, and an SNR range of -5 to 10dB. Perform a short-time Fourier transform on the preprocessed signal to obtain its time-frequency map and convert it to grayscale. Each time-frequency map sample contains 5 to 10 target signals, and the center frequency and duration of each signal are randomly determined. S2: Improvements are made to the Input, Backbone, and Loss Function of the classic YOLOv5 algorithm. These improvements include: Step 2.1: Using the improved Mosaic data augmentation method, during the training process, a time-frequency image is divided into four regions from top to bottom. Four images are randomly selected, and a portion of each of the four images is cropped from one region. Then, these four portions are stitched together according to the corresponding regions to form a new image, thereby increasing the number of data samples. Step 2.2: Combining average pooling in the time-frequency graph space and average pooling in the channel, the CBAM (Convolutional Block Attention Module) is introduced to improve the feature extraction capability of the algorithm using an attention mechanism; Step 2.3: Replace the NMS algorithm in the classic YOLOv5 with the WBF algorithm, and use the information of all predicted boxes to perform a weighted summation to improve the accuracy of the final predicted boxes; Step 2.4: Enhance the impact of high-quality prediction results during the training process using an improved Focal-EIoU loss function; Step 2.5: The Head section uses three convolutional layers as the final detectors, with different convolutional layers responsible for detecting signals of different scales; S3: Using the time-frequency graph in the training set as input and the label vector in the training set as output label, the improved YOLOv5 algorithm is trained on the signal detection time-frequency graph dataset until convergence, resulting in the final signal detection model; the maximum number of iterations is set to 100, and the algorithm parameters are updated according to the backpropagation algorithm of the neural network by minimizing the loss function until the loss function converges or the number of iterations is reached; S4: The time-frequency graph containing multiple signals is fed into the improved YOLOv5 algorithm as input. The algorithm generates prediction boxes to mark the position of the signal in the graph and indicates the signal type, bandwidth, center frequency, and start and end times, thus achieving the purpose of signal detection.

2. The method according to claim 1, characterized in that, Step 2.1 specifically includes: The content of the time-frequency graph represents the information of the signal's frequency domain energy changing over time. The random cropping and splicing method is not suitable for processing time-frequency graphs. This method divides a time-frequency graph into four regions from top to bottom. During the training process, four images are randomly selected, and a portion of each of the four images is cropped from one region. Then, these four parts are spliced ​​together according to their corresponding regions to form a new image. That is, the improved Mosaic data augmentation method crops and splices the time-frequency graph in the frequency domain, thereby completely preserving the time-frequency information of the signal.

3. The method according to claim 1, characterized in that, The calculation process of the CBAM module in step 2.2 is as follows: First, for input features In the channel attention submodule, the feature map is processed by two parallel max pooling and average pooling operations to calculate a set of channel-invariant feature maps with a scale of 1×1. Secondly, a set of fully connected layers is used to further compress the number of channels in the feature map; finally, parallel max pooling and average pooling are used to expand to the original number of channels, and the two parallel results are added together and then activated by a sigmoid function to obtain a set of channel attention. Multiply the channel attention by the original input to generate a new feature map. In the spatial attention submodule, the feature map F after processing by the channel attention module ′ Feature maps with unchanged scale and one channel are obtained by sequentially applying max pooling and average pooling to represent the features of a specific region. Then, a set of spatial attention feature weights is generated from these feature maps using a convolutional layer and an activation layer. Finally, these feature weights are multiplied by the feature map F. ′ Generate the final output feature map.

4. The method according to claim 1, characterized in that, The specific steps of the WBF algorithm in step 2.3 include: First, create two lists, B and C, to store all current predicted bounding boxes and their corresponding confidence scores, respectively. Second, create two empty lists, L and F. L stores suitable bounding boxes, and F contains only one fused bounding box. Finally, set a threshold T, iterate through list B, and find all predicted bounding boxes whose IoU with F is greater than T. If no bounding box is found, add it to the end of both B and F. If a bounding box is found, add it to the end of B, and update the bounding boxes in F according to the following formula. Where C is the confidence score of the predicted bounding box, and X and Y are the X and Y coordinates of the center point of the predicted bounding box, respectively.

5. The method according to claim 1, characterized in that, The expression for the Focal-EIoU loss function in step 2.4 is as follows: Where γ is a parameter controlling the degree of outlier suppression, and IoU is the intersection-over-union ratio of the predicted bounding box and the ground truth bounding box. This represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. and These represent the width and height of the minimum bounding rectangles of the predicted and ground truth boxes, respectively. α is a weighting factor with a value less than 1, and its value is obtained based on the aspect ratio of all targets in the K-means clustering data.

Citation Information

Patent Citations

  • Target detection method and device, electronic equipment and computer readable storage medium

    CN114612872A

  • High-altitude smoke and fire detection method based on improved YOLO v5

    CN115331141A

  • Novel target detection system and method under roadside view angle

    CN115346177A

  • Quick identification method for frequency hopping signals under multiple signals based on YOLOv5

    CN115630275A