+

CN116738225A - Signal detection method based on improved YOLOv5 - Google Patents

Signal detection method based on improved YOLOv5 Download PDF

Info

Publication number
CN116738225A
CN116738225A CN202310611620.8A CN202310611620A CN116738225A CN 116738225 A CN116738225 A CN 116738225A CN 202310611620 A CN202310611620 A CN 202310611620A CN 116738225 A CN116738225 A CN 116738225A
Authority
CN
China
Prior art keywords
time
improved
algorithm
signal detection
yolov5
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310611620.8A
Other languages
Chinese (zh)
Inventor
朱政宇
陈鹏飞
赵航冉
薛帮国
王梓晅
李鑫泽
林宇
梁静
王忠勇
巩克现
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou University
Original Assignee
Zhengzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou University filed Critical Zhengzhou University
Priority to CN202310611620.8A priority Critical patent/CN116738225A/en
Publication of CN116738225A publication Critical patent/CN116738225A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • G06F17/156Correlation function computation including computation of convolution operations using a domain transform, e.g. Fourier transform, polynomial transform, number theoretic transform
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Algebra (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Operations Research (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a signal detection method based on improved YOLOv5, which comprises the following steps: 1. performing short-time Fourier transform on the received signals to obtain a time-frequency diagram thereof, graying the time-frequency diagram, and constructing a signal detection time-frequency diagram data set; 2. in order to improve the feature extraction capability of the deep learning network, a CBAM module is introduced into classical YOLOv5; 3. to improve the accuracy of the final prediction frame of the algorithm, replacing the NMS algorithm in YOLOv5 with the WBF algorithm; 4. enhancing the impact of high quality predictions on training using improved Focal-EIoU loss functions; 5. training an improved YOLOv5 network model using an Adam optimizer and a signal time-frequency graph dataset; 6. and inputting the time-frequency diagram of the signal to be detected into a trained network model to obtain a signal detection result. The embodiment of the invention provides a method for detecting the target signal existing in the received broadband data by using the improved YOLOv5 network model for the first time, which is simple and practical, realizes higher signal detection performance with lower complexity, and has development significance for the application of the deep learning network in signal target detection.

Description

一种基于改进YOLOv5的信号检测方法A signal detection method based on improved YOLOv5

技术领域Technical field

本发明属于通信技术领域,具体涉及一种基于改进YOLOv5的信号检测方法。The invention belongs to the field of communication technology, and specifically relates to a signal detection method based on improved YOLOv5.

背景技术Background technique

随着现代社会发展对通信需求的不断提高,通信环境变得异常拥挤,电磁环境复杂多变,信号形式多种多样,并且能够同时到达。因此,非协作通信中首要任务是检测宽带信道中的窄带信号,测量其相关参数并进行信号提取。With the continuous improvement of communication requirements due to the development of modern society, the communication environment has become extremely crowded, the electromagnetic environment is complex and changeable, and signals are in various forms and can arrive at the same time. Therefore, the primary task in non-cooperative communication is to detect narrowband signals in broadband channels, measure their related parameters and perform signal extraction.

信号检测是对接收到的宽带数据,利用一定的技术手段对感兴趣的目标信号进行存在性判断,最早期的信号检测主要是通过人眼在视频图上对信号进行粗定位完成的。深度学习中的神经网络算法具有强大的特征提取能力,在图像处理领域等领域取得了巨大的成功。其中的YOLO系列是目前较为流行的目标检测算法,其检测速度和精度在同类别的算法中均有一定优势。基于此,考虑使用改进的YOLOv5算法,对信号的时频图进行检测。Signal detection is to use certain technical means to judge the existence of the target signal of interest based on the received broadband data. The earliest signal detection was mainly completed by rough positioning of the signal on the video image by the human eye. The neural network algorithm in deep learning has powerful feature extraction capabilities and has achieved great success in image processing and other fields. Among them, the YOLO series is currently a popular target detection algorithm, and its detection speed and accuracy have certain advantages among algorithms of the same category. Based on this, consider using the improved YOLOv5 algorithm to detect the time-frequency diagram of the signal.

发明内容Contents of the invention

本发明基于YOLOv5神经网络算法在目标检测领域的成功,研究了YOLOv5算法可以用于信号检测的原因。并通过建立信号检测时频图数据集,针对数据集对经典的YOLOv5算法进行改进,使用数据集对改进后的算法进行训练,实现对时频图中信号的定位,最终达到信号检测的目的。Based on the success of the YOLOv5 neural network algorithm in the field of target detection, the present invention studies the reasons why the YOLOv5 algorithm can be used for signal detection. By establishing a signal detection time-frequency diagram data set, the classic YOLOv5 algorithm is improved based on the data set, and the improved algorithm is trained using the data set to locate the signal in the time-frequency diagram, and ultimately achieve the purpose of signal detection.

第一方面,一种基于改进YOLOv5的信号检测方法,包括:The first aspect is a signal detection method based on improved YOLOv5, including:

S1:对接收信号进行短时傅里叶变换得到其时频图,使用多种预处理方法,构建信号检测时频图数据集;S1: Perform short-time Fourier transform on the received signal to obtain its time-frequency diagram, and use a variety of preprocessing methods to construct a signal detection time-frequency diagram data set;

S2:经典的YOLOv5算法包含Input、Backbone、neck,head以及损失函数,针对信号检测时频图数据集特点,本方法对经典YOLOv5的Input、Backbone以及损失函数做出改进;S2: The classic YOLOv5 algorithm includes Input, Backbone, neck, head and loss function. Based on the characteristics of the signal detection time-frequency graph data set, this method improves the Input, Backbone and loss function of the classic YOLOv5;

S3:训练集中的时频图作为输入,训练集标签向量作为输出标签,使用信号检测时频图数据集对改进后的YOLOv5算法进行训练至收敛,得到最终的信号检测模型;S3: The time-frequency graph in the training set is used as input, and the training set label vector is used as the output label. Use the signal detection time-frequency graph data set to train the improved YOLOv5 algorithm until convergence, and obtain the final signal detection model;

S4:将待检测信号的时频图输入至最终的YOLOv5模型中得到检测结果;S4: Input the time-frequency diagram of the signal to be detected into the final YOLOv5 model to obtain the detection result;

优选地,所述步骤S1具体包括:Preferably, the step S1 specifically includes:

对待检测信号进行截取,每种信号的最小持续时长为50ms,最大持续时长为4s,噪声基底为高斯噪声,SNR范围为-5~10dB,对预处理后的信号进行短时傅里叶变换得到其时频图并进行灰度化。每个时频图样本中包含5~10个目标信号,且每个信号的中心频率和持续时间均随机确定。The signal to be detected is intercepted. The minimum duration of each signal is 50ms, the maximum duration is 4s, the noise base is Gaussian noise, and the SNR range is -5~10dB. The short-time Fourier transform is performed on the preprocessed signal to obtain The time-frequency diagram is converted into grayscale. Each time-frequency diagram sample contains 5 to 10 target signals, and the center frequency and duration of each signal are randomly determined.

优选地,所述步骤S2具体包括:Preferably, the step S2 specifically includes:

步骤2.1:使用改进的Mosaic数据增强方法,在训练过程中把四张图片,各自随机裁下一部分,按一定比例缩小接着随机排布拼接得到新的图像,从而增加数据的样本数量;Step 2.1: Use the improved Mosaic data enhancement method. During the training process, randomly cut off a part of each of the four images, reduce them to a certain proportion, and then randomly arrange and splice them to obtain new images, thereby increasing the number of data samples;

步骤2.2:结合时频图空间上的平均池化和通道上的平均池化,引入CBAM(Convolutional Block Attention Module)模块,使用注意力机制提高算法的特征提取能力;Step 2.2: Combine the average pooling on the time-frequency graph space and the average pooling on the channel, introduce the CBAM (Convolutional Block Attention Module) module, and use the attention mechanism to improve the feature extraction capability of the algorithm;

步骤2.3:将经典YOLOv5中的NMS算法替换为WBF算法,利用所有预测框的信息进行加权求和,提升算法最终预测框的准确性;Step 2.3: Replace the NMS algorithm in the classic YOLOv5 with the WBF algorithm, use the information of all prediction boxes to perform a weighted sum, and improve the accuracy of the final prediction box of the algorithm;

步骤2.4:使用改进的Focal-EIoU损失函数加强高质量预测结果在训练过程中的影响;Step 2.4: Use the improved Focal-EIoU loss function to enhance the impact of high-quality prediction results in the training process;

步骤2.5:Head部分使用三个卷积层作为最终的检测器,不同的卷积层负责检测尺度大小不同的信号;Step 2.5: The Head part uses three convolutional layers as the final detector. Different convolutional layers are responsible for detecting signals with different scales;

优选地,所述的步骤2.1具体包括:Preferably, the step 2.1 specifically includes:

时频图中的内容代表了信号频域能量随时间变化的信息,这种随机裁剪、随机拼接的方法并不适用于对时频图进行处理,本方法将一幅时频图从上至下平均划分为四个区域,在训练过程中随机选择四张图像,四幅图像各对应一个区域裁剪出一部分,随后将这个四个部分按照对应的区域拼接为新的图像。即改进的Mosaic数据增强法对时频图在频域方向进行裁剪与拼接,从而完整地保留信号的时频信息。The content in the time-frequency diagram represents the information about the signal frequency domain energy changing with time. This method of random cropping and random splicing is not suitable for processing time-frequency diagrams. This method converts a time-frequency diagram from top to bottom. Divide the image into four areas evenly. During the training process, four images are randomly selected. Each of the four images corresponds to a region and a part is cropped. The four parts are then spliced into a new image according to the corresponding area. That is, the improved Mosaic data enhancement method clips and splices the time-frequency diagram in the frequency domain direction, thereby completely retaining the time-frequency information of the signal.

优选地,所述的步骤2.2具体包括:Preferably, the step 2.2 specifically includes:

CBAM一种深度卷积神经网络注意力模块,它结合了空间上的平均池化和通道上的平均池化,使用注意力机制来提高模型的性能本方法将CBAM模块引入YOLOv5的CSP结构中,增加模型对时频图的特征提取能力,提升算法对信号的检测能力;CBAM由两个子模块组成:空间注意力子模块和通道注意力子模块;CBAM模块的计算过程为:首先,对于输入特征在通道注意力子模块中,将特征图通过两个并行的最大池化和平均池化,计算出一组通道不变、尺度为1×1的特征图;其次,使用一组全连接层继续压缩特征图的通道数;最后,使用并行的最大池化和平均池化扩张到原通道数,两个并行的结果相加并经过Sigmoid激活即得到一组通道注意力/>将通道注意力乘以原始输入,生成一个新的特征图/>在空间注意力子模块中,通道注意力模块处理后的特征图F'依次通过最大池化和平均池化得到尺度大小不变、通道数为1的特征图,用于表征特定区域的特征;然后,使用一个卷积层和激活层对这些特征图生成一组空间注意力特征权重最后,将这些特征权重乘以特征图F',生成最终的输出特征图/> CBAM is a deep convolutional neural network attention module that combines spatial average pooling and channel average pooling, and uses the attention mechanism to improve the performance of the model. This method introduces the CBAM module into the CSP structure of YOLOv5. Increase the model's ability to extract features from time-frequency diagrams and improve the algorithm's ability to detect signals; CBAM consists of two sub-modules: spatial attention sub-module and channel attention sub-module; the calculation process of the CBAM module is: first, for the input features In the channel attention sub-module, the feature map is passed through two parallel maximum pooling and average pooling to calculate a set of feature maps with unchanged channels and a scale of 1×1; secondly, a set of fully connected layers are used to continue Compress the number of channels of the feature map; finally, use parallel maximum pooling and average pooling to expand to the original number of channels. The two parallel results are added and activated by Sigmoid 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 sub-module, the feature map F' processed by the channel attention module is sequentially processed through maximum pooling and average pooling to obtain a feature map with a constant scale and a channel number of 1, which is used to characterize the characteristics of a specific area; Then, a convolutional layer and activation layer are used to generate a set of spatial attention feature weights on these feature maps. Finally, these feature weights are multiplied by the feature map F' to generate the final output feature map/>

优选地,所述的步骤2.3具体包括:Preferably, the step 2.3 specifically includes:

WBF算法为每个预测的边界框设置不同的权重,通过加权融合计算出一个结果作为最终融合的结果,所得结果的精确度更高,本方法将其取代YOLOv5中的NMS算法作为预测框融合算法,做法为,首先,建立两个列表B和C,分别存放当前所有预测框和对应的置信度;其次,建立两个空列表L和F,L用来存放适合的边界框,F中只含有一个融合后的边界框;最后,设置一个阈值T,遍历列表B,找到所有与F的IoU大于T的预测框,若没有找到边界框,则将该边界框加入B和F的尾部,若找到了边界框,则将该边界框加入B的尾部,且按下列公式更新F中的边界框The WBF algorithm sets different weights for each predicted bounding box, and calculates a result through weighted fusion as the final fusion result. The result is more accurate. This method replaces the NMS algorithm in YOLOv5 as the prediction box fusion algorithm. , the method is as follows: first, create two lists B and C to store all current prediction boxes and corresponding confidences respectively; secondly, create two empty lists L and F. L is used to store suitable bounding boxes, and F only contains A fused bounding box; finally, set a threshold T, traverse list B, and find all prediction boxes whose IoU with F is greater than T. If no bounding box is found, add the bounding box to the tail of B and F. If found, If the bounding box is missing, add the bounding box to the tail of B, and update the bounding box in F according to the following formula

其中,C为预测框的置信度,X、Y分别为预测框中心点的X、Y坐标。Among them, C is the confidence of the prediction box, and X and Y are the X and Y coordinates of the center point of the prediction box respectively.

优选地,所述的步骤2.4具体包括:Preferably, the step 2.4 specifically includes:

考虑到预测框的回归中存在训练样本不平衡的问题,即在一张图像中回归误差小的高质量预测框的数量远少于误差大的低质量样本,质量较差的样本会产生过大的梯度影响训练过程;因此参考FocalLoss的做法,给高质量的预测框更大的权重,使其对训练过程的影响更大,改进后的Focal-EIoU表达式为Considering that there is an imbalance of training samples in the regression of prediction frames, that is, the number of high-quality prediction frames with small regression errors in an image is much less than the low-quality samples with large errors. Poor-quality samples will generate excessive The gradient of affects the training process; therefore, refer to the practice of FocalLoss to give greater weight to high-quality prediction boxes so that they have a greater impact on the training process. The improved Focal-EIoU expression is

其中,γ为控制异常值抑制程度的参数,IoU为预测框与真实框的交并比,表示预测框中心和真实框中心的欧氏距离,/>和/>分别代表预测框和真实框最小外接矩形的宽和高,α为取值小于1的权重因子,其取值是根据Kmeans聚类统计数据集中所有目标的高宽比得到。Among them, γ is a parameter that controls the degree of outlier suppression, IoU is the intersection ratio of the predicted box and the real box, Represents the Euclidean distance between the center of the predicted box and the center of the true box,/> and/> Represents the width and height of the minimum circumscribed rectangle of the prediction box and the true box respectively. α is a weight factor with a value less than 1. Its value is obtained based on the height-to-width ratio of all targets in the Kmeans clustering statistical data set.

优选地,所述步骤S3具体包括:Preferably, the step S3 specifically includes:

设置最大迭代次数为100,通过最小化损失函数,根据神经网络反向传播算法更新算法参数,直至损失函数收敛或达到迭代次数。Set the maximum number of iterations to 100, and update the algorithm parameters according to the neural network backpropagation algorithm by minimizing the loss function until the loss function converges or the number of iterations is reached.

优选地,所述步骤S4具体包括:Preferably, the step S4 specifically includes:

将存在多种信号的时频图作为输入送入改进的YOLOv5算法中,算法以生成预测框的形式标注出信号在图中的位置,并注明信号类别、带宽、中心频率以及起止时刻等参数,达到信号检测的目的。The time-frequency diagram with multiple signals is fed into the improved YOLOv5 algorithm as input. The algorithm marks the position of the signal in the diagram in the form of a generated prediction box, and indicates parameters such as signal category, bandwidth, center frequency, and start and end time. , to achieve the purpose of signal detection.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art are briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.

图1是本发明实施例提供的一种基于改进YOLOv5的信号检测方法流程示意图;Figure 1 is a schematic flow chart of a signal detection method based on improved YOLOv5 provided by an embodiment of the present invention;

图2是本发明改进YOLOv5算法架构图;Figure 2 is an architecture diagram of the improved YOLOv5 algorithm of the present invention;

图3是本发明中CBAM模块结构图;Figure 3 is a structural diagram of the CBAM module in the present invention;

图4是本发明中通道注意力模块结构图;Figure 4 is a structural diagram of the channel attention module of the present invention;

图5是本发明中空间注意力模块结构图;Figure 5 is a structural diagram of the spatial attention module in the present invention;

图6是本发明对信号时频图检测效果图;Figure 6 is a diagram of the detection effect of the signal time-frequency diagram according to the present invention;

图7是本发明与其它三种神经网络算法性能对比曲线图;Figure 7 is a graph comparing the performance of the present invention and three other neural network algorithms;

图8是本发明中四种改进方法有效性对比曲线图;Figure 8 is a comparison graph of the effectiveness of four improvement methods in the present invention;

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

S1:建立信号检测时频图数据集。S1: Establish signal detection time-frequency graph data set.

S2:使用所述信号检测时频图数据集,对改进的YOLOv5算法进行训练至收敛。S2: Use the signal detection time-frequency diagram data set to train the improved YOLOv5 algorithm until convergence.

S3:使用训练完成的改进YOLOv5算法对测试集的信号进行识别。S3: Use the improved YOLOv5 algorithm that has been trained to identify the signals in the test set.

具体地,步骤S1包括:Specifically, step S1 includes:

A.建立训练集A. Create a training set

对待检测信号进行截取,每种信号的最小持续时长为50ms,最大持续时长为4s,噪声基底为高斯噪声,SNR范围为-5~10dB,对预处理后的信号进行短时傅里叶变换得到其时频图并进行灰度化。每个时频图样本中包含5~10个目标信号,且每个信号的中心频率和持续时间均随机确定。The signal to be detected is intercepted. The minimum duration of each signal is 50ms, the maximum duration is 4s, the noise base is Gaussian noise, and the SNR range is -5~10dB. The short-time Fourier transform is performed on the preprocessed signal to obtain The time-frequency diagram is converted into grayscale. Each time-frequency diagram sample contains 5 to 10 target signals, and the center frequency and duration of each signal are randomly determined.

短时傅里叶变换定义为:The short-time Fourier transform is defined as:

其中w(t)为滑动窗函数。可以看出STFT是一个局部谱,当w(t)=1时,定义式为:where w(t) is the sliding window function. It can be seen that STFT is a local spectrum. When w(t)=1, the definition formula is:

此时的STFT是傅里叶变换的定义式,当s(t)的STFT等于傅里叶变换时,只存在频率信息。The STFT at this time is the definition of Fourier transform. When the STFT of s(t) is equal to the Fourier transform, only frequency information exists.

STFT的逆变换为:The inverse transform of STFT is:

当窗函数h(t)与w(t)满足下式关系时,信号s(t)可以通过上式由STFT(τ,ω)重构:When the window functions h(t) and w(t) satisfy the following relationship, the signal s(t) can be reconstructed from STFT(τ,ω) through the above formula:

序列的离散STFT定义为:The discrete STFT of a sequence is defined as:

其中N为序列s[n]的长度,窗函数w[n]的宽度是可控的。对于信号的时频分析,通常分析的是其幅度,可以定义其频谱为: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 signals, what is usually analyzed is its amplitude, and its spectrum can be defined as:

对应的幅度图即为时频图。The corresponding amplitude diagram is the time-frequency diagram.

B.建立测试集B. Create a test set

测试集分为高斯信道下的测试集合瑞丽衰落信道下的测试集,分别在高斯白噪声环境下和瑞丽信道下仿真得到,其中信噪比SNR取值为-5dB、-4dB、…、5dB,每种信号在每个信噪比下使用短时傅里叶变换产生300个时频图样本,共计3300个样本组成两种测试集。The test set is divided into a test set under Gaussian channel and a test set under Rayli fading channel, which are simulated in Gaussian white noise environment and Rayleigh channel respectively. The signal-to-noise ratio SNR values are -5dB, -4dB, ..., 5dB, Each signal uses short-time Fourier transform to generate 300 time-frequency diagram samples at each signal-to-noise ratio, and a total of 3300 samples form two test sets.

进一步地,步骤S2包括:Further, step S2 includes:

本发明中改进的YOLOv5主要由Input、Backbone、Neck和Head四部分组成。其中,Input阶段主要对输入图像进行数据增强,Backbone是YOLOv5的主干部分,主要由CBS模块和CSP模块堆叠而成,负责对输入进行特征学习,在Neck阶段先使用SPPF结构将输入特征图通过最大池化操作后的各特征图进行特征融合,Head部分使用三个卷积层作为最终的检测器。The improved YOLOv5 in the present invention mainly consists of four parts: Input, Backbone, Neck and Head. Among them, the Input stage mainly performs data enhancement on the input image. Backbone is the backbone of YOLOv5, which is mainly stacked by the CBS module and the CSP module. It is responsible for feature learning of the input. In the Neck stage, the SPPF structure is first used to pass the input feature map through the maximum Each feature map after the pooling operation is feature fused, and the Head part uses three convolutional layers as the final detector.

训练过程的学习率设为0.001,batch size设置为32,epoch最大设为100,采用Adam优化器,实验环境的硬件与软件配置信息如下表所示:The learning rate of the training process is set to 0.001, the batch size is set to 32, the maximum epoch is set to 100, and the Adam optimizer is used. The hardware and software configuration information of the experimental environment is as shown in the following table:

表1实验环境配置信息Table 1 Experimental environment configuration information

进一步地,所述步骤S3具体包括:Further, the step S3 specifically includes:

设置最大迭代次数为100,通过最小化损失函数,根据神经网络反向传播算法更新算法参数,直至损失函数收敛或达到迭代次数。Set the maximum number of iterations to 100, and update the algorithm parameters according to the neural network backpropagation algorithm by minimizing the loss function until the loss function converges or the number of iterations is reached.

进一步地,所述步骤S4具体包括:Further, the step S4 specifically includes:

将存在多种信号的时频图作为输入送入改进的YOLOv5算法中,算法以生成预测框的形式标注出信号在图中的位置,并注明信号类别、带宽、中心频率以及起止时刻等参数,达到信号检测的目的。The time-frequency diagram with multiple signals is fed into the improved YOLOv5 algorithm as input. The algorithm marks the position of the signal in the diagram in the form of a generated prediction box, and indicates parameters such as signal category, bandwidth, center frequency, and start and end time. , to achieve the purpose of signal detection.

Claims (9)

1. A method for improved YOLOv 5-based signal detection, the method comprising:
s1: performing short-time Fourier transform on the received signals to obtain time-frequency diagrams of the received signals, and constructing a signal detection time-frequency diagram data set by using a plurality of preprocessing methods;
s2: the classical YOLOv5 algorithm comprises Input, backbone, neck, head and loss functions, and the method improves Input, backbone and loss functions of the classical YOLOv5 according to the characteristics of a signal detection time-frequency chart data set;
s3: training the improved YOLOv5 algorithm to be converged by using a signal detection time-frequency diagram data set to obtain a final signal detection model;
s4: and inputting the time-frequency diagram of the signal to be detected into a final YOLOv5 model to obtain a detection result.
2. The improved YOLOv 5-based signal detection method of claim 1, wherein step S1 specifically comprises:
intercepting signals to be detected, wherein the minimum duration of each signal is 50ms, the maximum duration is 4s, the noise substrate is Gaussian noise, the SNR range is-5-10 dB, performing short-time Fourier transform on the preprocessed signals to obtain a time-frequency diagram and gray scale, each time-frequency diagram sample contains 5-10 target signals, and the center frequency and the duration of each signal are randomly determined.
3. The improved YOLOv 5-based signal detection method of claim 1, wherein step S2 specifically comprises:
step 2.1: the improved Mosaic data enhancement method is used, four pictures are randomly cut off in a part respectively in the training process, and new images are obtained by shrinking according to a certain proportion and then randomly arranging and splicing, so that the number of samples of the data is increased;
step 2.2: combining the average pooling in the time-frequency diagram space and the average pooling in the channel, introducing a CBAM (Convolutional Block Attention Module) module, and improving the feature extraction capability of the algorithm by using an attention mechanism;
step 2.3: the NMS algorithm in the classical YOLOv5 is replaced by the WBF algorithm, the information of all the prediction frames is used for weighted summation, and the accuracy of the final prediction frame of the algorithm is improved;
step 2.4: enhancing the impact of high quality predictions on training using improved Focal-EIoU loss functions;
step 2.5: the Head section uses three convolution layers as the final detector, with different convolution layers being responsible for detecting signals of different scale sizes.
4. The method for improved YOLOv 5-based signal detection of claim 3, wherein said step 2.1 comprises:
the method comprises the steps that a time-frequency diagram is divided into four areas from top to bottom, four images are randomly selected in the training process, a part of each of the four images is cut out corresponding to one area, and then the four parts are spliced into a new image according to the corresponding area; the improved Mosaic data enhancement method cuts and splices the time-frequency diagram in the frequency domain direction, so that the time-frequency information of the signals is completely reserved.
5. The method for detecting a signal based on improved YOLOv5 of claim 3, wherein said step 2.2 comprises:
the method introduces the CBAM module into a CSP structure of YOLOv5, increases the feature extraction capacity of the model on a time-frequency chart, and improves the detection capacity of an algorithm on signals; CBAM consists of two sub-modules: a spatial attention sub-module and a channel attention sub-module; the calculating process of the CBAM module is as follows: first, for input featuresIn the channel attention submodule, the feature map is subjected to two parallel maximum pooling and average pooling, and a group of feature maps with unchanged channels and the scale of 1 multiplied by 1 are calculated; secondly, continuously compressing the channel number of the feature map by using a group of full connection layers; finally, using parallel maximum pooling and average pooling to expand to the original channel number, adding two parallel results and activating by Sigmoid to obtain a group of channel attention +.>Multiplying the channel attention by the original input to generate a new profile +.>In the space attention sub-module, the feature map F 'processed by the channel attention module sequentially passes through maximum pooling and average pooling to obtain a feature map with the unchanged scale and the number of channels of 1, and the feature map F' is used for representing the features of a specific area; then, a set of spatial attention feature weights are generated for the feature maps using a convolution layer and an activation layerFinally, these feature weights are multiplied by the feature map F' to generate the final output feature map +.>
6. The method for improved YOLOv 5-based signal detection of claim 3, wherein said step 2.3 comprises:
the WBF algorithm sets different weights for each predicted boundary box, calculates a result through weighted fusion as a final fusion result, and the obtained result has higher accuracy. Firstly, establishing two lists B and C, and respectively storing all current prediction frames and corresponding confidence coefficients; secondly, two empty lists L and F are established, wherein L is used for storing proper bounding boxes, and F only contains one fused bounding box; finally, a threshold T is set, a list B is traversed, all predicted frames which are larger than T with IoU of F are found, if no boundary frame is found, the boundary frames are added to the tail parts of B and F, if the boundary frame is found, the boundary frame is added to the tail part of B, and the boundary frame in F is updated according to the following formula
Where C is the confidence level of the predicted frame and X, Y is the X, Y coordinates of the center point of the predicted frame.
7. The method for improved YOLOv 5-based signal detection of claim 3, wherein said step 2.4 comprises:
considering the problem that training samples are unbalanced in regression of prediction frames, namely the number of high-quality prediction frames with small regression errors in one image is far less than that of low-quality samples with large errors, and the samples with poor quality can generate overlarge gradients to influence the training process; therefore, referring to Focal Loss, the high-quality prediction frame is given a larger weight, so that the influence on the training process is larger, and the improved Focal-EIoU expression is as follows
Wherein, gamma is a parameter for controlling the suppression degree of abnormal values, ioU is the intersection ratio of a prediction frame and a real frame,euclidean distance representing the prediction frame center and the true frame center,>and->The values of the alpha are weight factors with the values smaller than 1, and the values are obtained according to the aspect ratio of all targets in the Kmeans cluster statistical data set.
8. The improved YOLOv 5-based signal detection method of claim 1, wherein step S3 specifically comprises:
setting the maximum iteration number as 100, and updating algorithm parameters according to a neural network back propagation algorithm by minimizing the loss function until the loss function converges or the iteration number is reached.
9. The improved YOLOv 5-based signal detection method of claim 1, wherein step S4 specifically comprises:
the time-frequency diagram with various signals is used as input to be sent into an improved YOLOv5 algorithm, the algorithm marks the position of the signals in the diagram in the form of generating a prediction frame, and the parameters such as signal category, bandwidth, center frequency, start-stop time and the like are marked, so that the purpose of signal detection is achieved.
CN202310611620.8A 2023-05-24 2023-05-24 Signal detection method based on improved YOLOv5 Pending CN116738225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310611620.8A CN116738225A (en) 2023-05-24 2023-05-24 Signal detection method based on improved YOLOv5

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310611620.8A CN116738225A (en) 2023-05-24 2023-05-24 Signal detection method based on improved YOLOv5

Publications (1)

Publication Number Publication Date
CN116738225A true CN116738225A (en) 2023-09-12

Family

ID=87912452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310611620.8A Pending CN116738225A (en) 2023-05-24 2023-05-24 Signal detection method based on improved YOLOv5

Country Status (1)

Country Link
CN (1) CN116738225A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036365A (en) * 2023-10-10 2023-11-10 南京邮电大学 Third molar tooth root number identification method based on deep attention network
CN118764872A (en) * 2024-06-14 2024-10-11 北京航空航天大学 A method for constructing a ZigBee radio frequency signal dataset based on YOLOv8
CN119051798A (en) * 2024-04-26 2024-11-29 东南大学 Communication signal detection and identification method based on improvement YOLOv5

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612872A (en) * 2021-12-17 2022-06-10 广州亚信技术有限公司 Target detection method, apparatus, electronic device, and computer-readable storage medium
CN115331141A (en) * 2022-08-03 2022-11-11 天津大学 High-altitude smoke and fire detection method based on improved YOLO v5
CN115346177A (en) * 2022-08-15 2022-11-15 西京学院 Novel system and method for detecting target under road side view angle
CN115630276A (en) * 2022-09-27 2023-01-20 北京遥测技术研究所 YOLOv 5-based rapid identification method for radar intra-pulse modulation type
CN115630275A (en) * 2022-09-27 2023-01-20 北京遥测技术研究所 YOLOv 5-based frequency hopping signal rapid identification method under multiple signals

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612872A (en) * 2021-12-17 2022-06-10 广州亚信技术有限公司 Target detection method, apparatus, electronic device, and computer-readable storage medium
CN115331141A (en) * 2022-08-03 2022-11-11 天津大学 High-altitude smoke and fire detection method based on improved YOLO v5
CN115346177A (en) * 2022-08-15 2022-11-15 西京学院 Novel system and method for detecting target under road side view angle
CN115630276A (en) * 2022-09-27 2023-01-20 北京遥测技术研究所 YOLOv 5-based rapid identification method for radar intra-pulse modulation type
CN115630275A (en) * 2022-09-27 2023-01-20 北京遥测技术研究所 YOLOv 5-based frequency hopping signal rapid identification method under multiple signals

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036365A (en) * 2023-10-10 2023-11-10 南京邮电大学 Third molar tooth root number identification method based on deep attention network
CN119051798A (en) * 2024-04-26 2024-11-29 东南大学 Communication signal detection and identification method based on improvement YOLOv5
CN119051798B (en) * 2024-04-26 2025-09-16 东南大学 A communication signal detection and recognition method based on improved YOLOv5
CN118764872A (en) * 2024-06-14 2024-10-11 北京航空航天大学 A method for constructing a ZigBee radio frequency signal dataset based on YOLOv8

Similar Documents

Publication Publication Date Title
CN116738225A (en) Signal detection method based on improved YOLOv5
CN111126472A (en) Improved target detection method based on SSD
CN109902715B (en) Infrared dim target detection method based on context aggregation network
CN108229550B (en) Cloud picture classification method based on multi-granularity cascade forest network
CN114758288A (en) A kind of distribution network engineering safety management and control detection method and device
CN108922513B (en) Voice distinguishing method and device, computer equipment and storage medium
CN111178260A (en) Modulation signal time-frequency diagram classification system based on generation countermeasure network and operation method thereof
CN110147745A (en) A kind of key frame of video detection method and device
CN111126278B (en) A Method of Optimizing and Accelerating Object Detection Models for Few-Category Scenes
CN107392919B (en) Adaptive genetic algorithm-based gray threshold acquisition method and image segmentation method
CN112686304A (en) Target detection method and device based on attention mechanism and multi-scale feature fusion and storage medium
CN117456167A (en) Target detection algorithm based on improved YOLOv8s
CN111627458A (en) Sound source separation method and equipment
CN112528904A (en) Image segmentation method for sand particle size detection system
CN114359167A (en) A lightweight YOLOv4-based insulator defect detection method in complex scenarios
CN111860265B (en) Multi-detection-frame loss balanced road scene understanding algorithm based on sample loss
CN109977774A (en) A kind of fast target detection method based on adaptive convolution
CN112560614A (en) Remote sensing image target detection method and system based on candidate frame feature correction
CN114764886A (en) CFAR (computational fluid dynamics) -guidance-based double-current SSD SAR (solid State disk) image target detection method
WO2024032010A1 (en) Transfer learning strategy-based real-time few-shot object detection method
CN117152746A (en) A method for obtaining cervical cell classification parameters based on YOLOV5 network
CN110706208A (en) Infrared dim target detection method based on tensor mean square minimum error
CN110889864A (en) A target tracking method based on double-layer depth feature perception
CN111652288B (en) Improved SSD small target detection method based on dense feature pyramid
CN113901924A (en) Document table detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载