Method and device for identifying noise sources along highway using convolutional neural network
Through convolutional neural network and feature extraction technology, combined with knowledge distillation, the problem of low noise source identification accuracy and difficult positioning along the highway is solved, and efficient noise source identification and positioning is achieved, which is suitable for mobile device deployment.
Patent Information
- Application Number
- CN202410981951.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In the existing technology, the accuracy of identifying noise sources along highways is low and it is impossible to locate the noise sources through mobile noise sensors.
A convolutional neural network is used to identify noise sources along the highway. Noise signals are obtained through mobile noise sensors. Mel cepstrum coefficient feature maps and generalized cross-correlation feature maps are used for feature extraction. A noise source identification model is constructed, and a light source is obtained through knowledge distillation. Quantitative model to realize noise category identification and location.
It improves the accuracy and efficiency of noise source identification, reduces the amount and size of model parameters, is suitable for deployment in mobile devices, and improves inference efficiency and resource utilization.
Smart Images

Figure CN118522309B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for identifying noise sources along a highway by using a convolutional neural network. Background Art
[0002] The Chinese patent application with the publication number CN 108922560 A discloses a method for identifying urban noise based on a hybrid deep neural network model, including: collecting urban noise and establishing a sound sample library; converting the sound signal in the sound sample library into a spectrogram; cropping the obtained spectrogram, and then using multiple pre-trained deep neural network models to extract features respectively; splicing the features extracted by multiple models; using the fusion features obtained after splicing as the input of the final classifier to train the prediction model; for unknown sounds, first converting them into spectrograms, using the above-mentioned multiple pre-trained deep neural network models for feature extraction, splicing the extracted features, and then using the trained prediction model for prediction to obtain the final sound type. This method effectively improves the accuracy of noise category recognition, but does not consider the time series characteristics of the noise signal, nor does it consider locating the urban noise source.
[0003] To this end, the present invention proposes a method for identifying noise sources along a highway using a convolutional neural network. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method for identifying noise sources along a highway using a convolutional neural network, which can solve the problem of low accuracy in identifying noise sources along the highway and the inability to locate the noise sources by moving noise sensors.
[0005] In view of the technical problems existing in the prior art, the present invention provides a method for identifying noise sources along a highway using a convolutional neural network, and the specific steps are as follows:
[0006] S1. Using a mobile noise sensor to obtain noise signals from known noise sources along the highway;
[0007] S2. Based on the noise signal, a noise signal feature map extraction model is used to obtain a noise signal feature map, and a noise signal feature map data set is constructed; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module, and a feature map splicing processing module;
[0008] S3, constructing a noise source identification model; the noise source identification model is obtained by training a noise source identification network through the noise signal feature map data set; the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module;
[0009] S4, performing knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification;
[0010] S5. Use a mobile noise sensor to obtain the noise signal of the noise source to be identified along the highway. Based on the noise signal feature map extraction model and the noise source identification lightweight model, obtain the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor to complete the noise source identification along the highway.
[0011] Particularly, the noise signal format of the known noise sources along the highway acquired by the mobile noise sensor is in MIC format; the mobile noise sensor comprises a microphone array; and the microphone array consists of n microphones.
[0012] In particular, the step of obtaining the noise signal feature map based on the noise signal by using the noise signal feature map extraction model is:
[0013] Step S11: using a noise signal preprocessing module to perform a preprocessing operation on the noise signal to obtain a standardized noise signal; the preprocessing operation adopts zero mean normalization;
[0014] Step S12: extracting a Mel-cepstral coefficient feature map of a standard noise signal using a Mel-cepstral coefficient feature map extraction module;
[0015] Step S13: extracting a generalized cross-correlation feature map of the standard noise signal using a generalized cross-correlation feature map extraction module;
[0016] Step S14: using a feature map splicing processing module to perform splicing processing on the Mel-frequency cepstral coefficient feature map and the generalized cross-correlation feature map to obtain a noise signal feature map.
[0017] The Mel-cepstral coefficient feature map is a 2D tensor, including a time frame dimension and a Mel-cepstral coefficient dimension;
[0018] The generalized cross-correlation feature map is a 3D tensor, including a time frame dimension, a frequency band dimension, and a channel dimension;
[0019] The step of using the feature map splicing processing module to splice the Mel cepstral coefficient feature map and the generalized cross-correlation feature map is as follows:
[0020] Step S21: performing a flattening operation on the generalized cross-correlation feature map; the flattening operation is to merge the frequency band dimension and the channel dimension in the generalized cross-correlation feature map into one dimension;
[0021] Step S22: Fill the generalized cross-correlation feature map after the flattening operation with zero values along the time frame dimension until the number of time frames is consistent with that of the Mel-frequency cepstrum feature map;
[0022] Step S23: splicing the filled generalized cross-correlation feature map to the back of the Mel-frequency cepstrum feature map to complete the splicing process.
[0023] In particular, the step of extracting the Mel-frequency cepstral coefficient feature map of the standard noise signal is:
[0024] Step S31: performing a pre-emphasis, frame division and windowing process on the standard noise signal and then performing a fast Fourier transform to obtain a short-time energy spectrum of each time frame;
[0025] Step S32: passing the short-time energy spectrum through a triangular Mel filter bank to obtain a Mel-frequency energy spectrum of each time frame;
[0026] Step S33: performing a logarithmic operation on the Mel frequency spectrum to obtain logarithmic frequency spectrum coefficients;
[0027] Step S34: performing discrete cosine transform on the logarithmic frequency spectrum coefficients to obtain Mel-frequency cepstrum coefficients;
[0028] Step S35: Combine the Mel-cepstral coefficients of all time frames along the time axis to form a two-dimensional feature map, thereby obtaining a Mel-cepstral coefficient feature map.
[0029] In particular, the step of extracting the generalized cross-correlation feature map of the canonical noise signal is:
[0030] Step S41: Obtaining noise information of n channels of the standard noise signal;
[0031] Step S42: Calculate the generalized cross-correlation function between two channels in the n channel noise information;
[0032] Step S43: sharpening the peak value of the generalized cross-correlation function by using a phase-variable PHAT weighting method;
[0033] Step S44: The sharpened generalized cross-correlation values are combined into a 3D tensor as a generalized cross-correlation feature map of the normalized noise signal, wherein the 3D tensor includes a time frame dimension, a frequency band dimension, and an n×n channel dimension.
[0034] In particular, the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module, wherein:
[0035] The noise feature extraction module is composed of two branches, a convolutional neural network and a recurrent neural network, connected in parallel; the convolutional neural network is composed of an input layer, a convolutional layer and a pooling layer; the recurrent neural network is composed of a BiGRU network;
[0036] The noise feature fusion module receives the feature maps output by the two branches of the noise feature extraction module and performs feature fusion to obtain a fused feature map; the noise feature fusion module is composed of a Concat layer, a Flatten layer, a convolution layer and a pooling layer; the Flatten layer flattens the fused feature map into a one-dimensional vector;
[0037] The noise identification module is composed of two branches, a noise classification network and a noise source localization network, connected in parallel;
[0038] The noise classification network consists of two fully connected layers and a sigmoid activation function, wherein the number of nodes in the second fully connected layer is the number of noise source categories;
[0039] The noise source localization network consists of three fully connected layers and a tanh activation function, wherein the number of nodes in the third fully connected layer is three times the number of noise source categories.
[0040] In particular, the steps of performing knowledge distillation on the noise source identification model to obtain a lightweight noise source identification model are:
[0041] Step S51: using the noise source recognition model as a teacher model, pre-training the teacher network, and obtaining the training weights of the teacher network;
[0042] Step S52: reducing the number of convolution channels in the noise feature extraction module and the noise feature fusion module in the noise source identification model to 1 / 2 of the original number of convolution channels, and constructing a student model;
[0043] Step S53: Use attention distillation to perform feature distillation on the student model;
[0044] Step S54: using KL divergence to perform response classification distillation on the student model;
[0045] Step S55: Based on step S53 and step S54, a noise source identification teacher-student structure model is constructed;
[0046] Step S56: using an offline distillation method, fixing the training weights of the teacher network, training the noise source identification teacher-student structure model, and obtaining a noise source identification lightweight model;
[0047] The step of using attention distillation to perform feature distillation on the student model is: using L2 loss to calculate the spatial attention loss and channel attention loss of the teacher model and the student model, and summing the results to construct an attention-based distillation loss function;
[0048] The calculation formulas for spatial attention and channel attention are as follows:
[0049]
[0050] Among them, E represents the input feature, H represents the height, and W represents the width;
[0051] The attention-based distillation loss function L at The calculation formula is as follows:
[0052] L at =L2(A s (E S ),A s (E T ))+L2(A c (E S ),A c (E T ))
[0053] Among them, E S represents the characteristics of the student network, E T Represents the characteristics of the teacher network;
[0054] The steps of using KL divergence to perform response classification distillation on the student model are as follows: when training the noise source identification teacher-student structure model, a temperature parameter T is introduced in the output layer of the noise classification network; KL divergence is used to calculate the response classification distillation of the noise source identification teacher-student structure model, and a response-based classification distillation loss is constructed;
[0055] The response-based classification distillation loss L cls The calculation process is as follows:
[0056]
[0057] L cls =T 2 ×KLdiv(C s , C t )
[0058] Among them, Z t , Z s Represent the classification outputs of the teacher network and the student network, respectively, and C t , C s Represent the softened labels of the teacher network and the student network respectively;
[0059] The noise source identification teacher-student structure model total loss L total By the attention-based distillation loss function L at , response-based classification distillation loss L cls and the training loss L of the student network itself stu composition;
[0060] L total =aL at +bL cls+cL stu
[0061] Among them, a, b, and c are weight ratios;
[0062] When training the noise source identification teacher-student structure model, a 1×1 adaptive convolution layer is added to align the channel scales of the teacher model and the student model.
[0063] Another aspect of the present application provides a system for identifying noise sources along a highway using a convolutional neural network, the system comprising:
[0064] Noise signal acquisition module: used to acquire noise signals of known noise sources along the highway using mobile noise sensors;
[0065] Feature map extraction module: used to obtain the noise signal feature map based on the noise signal and use the noise signal feature map extraction model to construct a noise signal feature map data set; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module and a feature map splicing processing module;
[0066] Identification model training module: used to construct a noise source identification model; the noise source identification model is obtained by training the noise source identification network through the noise signal feature map data set; the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module;
[0067] Model lightweight module: used to perform knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification;
[0068] Noise source identification module: used to use mobile noise sensors to obtain noise signals of noise sources to be identified along the highway. Based on the noise signal feature map extraction model and the noise source identification lightweight model, the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor are obtained to complete the noise source identification along the highway.
[0069] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the above-mentioned method for identifying noise sources along a highway using a convolutional neural network are implemented.
[0070] Another aspect of the present application provides a readable storage medium storing a computer program, wherein the computer program is suitable for loading by a processor to implement the steps in the above-mentioned method of identifying noise sources along a highway using a convolutional neural network.
[0071] Beneficial technical effects of the present invention:
[0072] The present invention uses mobile noise sensors to obtain noise signals of known noise sources along the highway, laying a data foundation for subsequent feature extraction and model training; a feature extraction method that combines Mel-frequency cepstral coefficient feature maps and generalized cross-correlation feature maps can fully capture the time-frequency characteristics of noise signals; and through feature map splicing processing, a rich noise signal feature expression is obtained, laying a data information foundation for the noise source identification task.
[0073] The present invention constructs a noise source identification model consisting of a noise feature extraction module, a feature fusion module and a noise source identification module, and adopts an end-to-end deep learning method, which can simultaneously complete noise category identification and noise source positioning, thereby improving the accuracy and efficiency of noise source identification; a recurrent neural network branch is used in the noise feature extraction module to extract features, so that the model fully pays attention to the time series features in the noise signal, thereby achieving the effect of improving the accuracy of noise category identification; through the method of knowledge distillation, a lightweight model of the noise source identification model is obtained, so that the model has a smaller number of parameters and a smaller size while basically achieving the accuracy of the original model, which is conducive to the deployment of the noise source identification model in a mobile device, while improving the reasoning efficiency and resource utilization of the mobile device. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a flowchart of a method for identifying noise sources along a highway using a convolutional neural network according to Example 1 of the present invention.
[0075] Figure 2 This is a step of obtaining a noise signal feature graph by using a noise signal feature graph extraction model in embodiment 1 of the present invention.
[0076] Figure 3 It is a network structure diagram of a noise source identification network model according to Example 1 of the present invention.
[0077] Figure 4 This is a network structure diagram of a noise source identification teacher-student structure model according to Example 1 of the present invention.
[0078] Figure 5 A system for identifying noise sources along a highway using a convolutional neural network is provided in Example 2 of the present invention.
[0079] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Example 3 of the present invention.
[0080] Figure 7 It is a schematic diagram of the structure of a computer-readable storage medium provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0081] In order to better understand the present application, a more detailed description will be made of various aspects of the present application with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0082] In the accompanying drawings, the size, dimensions and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustration only and are not strictly drawn to scale. As used herein, the terms "substantially", "approximately" and similar terms are used as terms of approximation, not as terms of degree, and are intended to illustrate the inherent deviations in measurements or calculations that will be recognized by those of ordinary skill in the art. In addition, in this application, the order in which the steps are described does not necessarily represent the order in which these processes occur in actual operation, unless otherwise specified or can be derived from the context.
[0083] It should also be understood that expressions such as "include", "including", "have", "contain" and / or "comprising" are open rather than closed expressions in this specification, which indicate the presence of the stated features, elements and / or components, but do not exclude the presence of one or more other features, elements, components and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application". And, the term "exemplary" is intended to refer to an example or illustration.
[0084] Unless otherwise specified, all words (including engineering terms and scientific and technological terms) used in this article have the same meaning as those commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that, unless clearly stated in this application, words defined in common dictionaries should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0085] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0086] Example 1
[0087] like Figure 1 to Figure 4 As shown, this embodiment provides a method for identifying noise sources along a highway using a convolutional neural network;
[0088] like Figure 1 As shown, the method for identifying noise sources along a highway using a convolutional neural network includes the following steps:
[0089] S1. Using a mobile noise sensor to obtain noise signals from known noise sources along the highway;
[0090] Particularly, the noise signal format of the known noise sources along the highway acquired by the mobile noise sensor is in MIC format; the mobile noise sensor comprises a microphone array; and the microphone array consists of n microphones.
[0091] S2. Based on the noise signal, a noise signal feature map extraction model is used to obtain a noise signal feature map, and a noise signal feature map data set is constructed; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module, and a feature map splicing processing module;
[0092] In particular, see Figure 2 The step of obtaining the noise signal feature map based on the noise signal by using the noise signal feature map extraction model is as follows:
[0093] Step S11: using a noise signal preprocessing module to perform a preprocessing operation on the noise signal to obtain a standardized noise signal; the preprocessing operation adopts zero mean normalization;
[0094] Step S12: extracting a Mel-cepstral coefficient feature map of a standard noise signal using a Mel-cepstral coefficient feature map extraction module;
[0095] Step S13: extracting a generalized cross-correlation feature map of the standard noise signal using a generalized cross-correlation feature map extraction module;
[0096] Step S14: using a feature map splicing processing module to perform splicing processing on the Mel-frequency cepstral coefficient feature map and the generalized cross-correlation feature map to obtain a noise signal feature map.
[0097] The Mel-cepstral coefficient feature map is a 2D tensor, including a time frame dimension and a Mel-cepstral coefficient dimension;
[0098] The generalized cross-correlation feature map is a 3D tensor, including a time frame dimension, a frequency band dimension, and a channel dimension.
[0099] Furthermore, the step of using the feature map splicing processing module to splice the Mel cepstral coefficient feature map and the generalized cross-correlation feature map is:
[0100] Step S21: performing a flattening operation on the generalized cross-correlation feature map; the flattening operation is to merge the frequency band dimension and the channel dimension in the generalized cross-correlation feature map into one dimension;
[0101] Step S22: Fill the generalized cross-correlation feature map after the flattening operation with zero values along the time frame dimension until the number of time frames is consistent with that of the Mel-frequency cepstrum feature map;
[0102] Step S23: splicing the filled generalized cross-correlation feature map to the back of the Mel-frequency cepstrum feature map to complete the splicing process.
[0103] Furthermore, the step of extracting the Mel-frequency cepstral coefficient feature map of the standard noise signal is:
[0104] Step S31: performing a pre-emphasis, frame division and windowing process on the standard noise signal and then performing a fast Fourier transform to obtain a short-time energy spectrum of each time frame;
[0105] Step S32: passing the short-time energy spectrum through a triangular Mel filter bank to obtain a Mel-frequency energy spectrum of each time frame;
[0106] Step S33: performing a logarithmic operation on the Mel frequency spectrum to obtain logarithmic frequency spectrum coefficients;
[0107] Step S34: performing discrete cosine transform on the logarithmic frequency spectrum coefficients to obtain Mel-frequency cepstrum coefficients;
[0108] Step S35: Combine the Mel-cepstral coefficients of all time frames along the time axis to form a two-dimensional feature map, thereby obtaining a Mel-cepstral coefficient feature map.
[0109] Furthermore, the step of extracting the generalized cross-correlation feature map of the canonical noise signal is:
[0110] Step S41: Obtaining noise information of n channels of the standard noise signal;
[0111] Step S42: Calculate the generalized cross-correlation function between two channels in the n channel noise information;
[0112] Step S43: sharpening the peak value of the generalized cross-correlation function by using a phase-variable PHAT weighting method;
[0113] Step S44: The sharpened generalized cross-correlation values are combined into a 3D tensor as a generalized cross-correlation feature map of the normalized noise signal, wherein the 3D tensor includes a time frame dimension, a frequency band dimension, and an n×n channel dimension.
[0114] S3, constructing a noise source identification model; the noise source identification model is obtained by training a noise source identification network through the noise signal feature map data set; the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module;
[0115] In particular, see Figure 3The noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module, wherein:
[0116] The noise feature extraction module is composed of two branches, a convolutional neural network and a recurrent neural network, connected in parallel; the convolutional neural network is composed of an input layer, a convolutional layer and a pooling layer; the recurrent neural network is composed of a BiGRU network;
[0117] The noise feature fusion module receives the feature maps output by the two branches of the noise feature extraction module and performs feature fusion to obtain a fused feature map; the noise feature fusion module is composed of a Concat layer, a Flatten layer, a convolution layer and a pooling layer; the Flatten layer flattens the fused feature map into a one-dimensional vector;
[0118] The noise identification module is composed of two branches, a noise classification network and a noise source localization network, connected in parallel;
[0119] The noise classification network consists of two fully connected layers and a sigmoid activation function, wherein the number of nodes in the second fully connected layer is the number of noise source categories;
[0120] The noise source localization network consists of three fully connected layers and a tanh activation function, wherein the number of nodes in the third fully connected layer is three times the number of noise source categories.
[0121] In some preferred embodiments, the convolutional neural network performs convolution feature extraction on the noise signal, and can extract local features of translation invariance from the noise signal data, but cannot capture the time dependency in the noise signal; the recurrent neural network performs feature extraction on the time series signal in the noise, and can effectively extract the time series features of the noise signal. If the convolutional neural network and the recurrent neural network are connected in series, the detailed features of the sound signal can be extracted, and it has a strong fitting ability, but the convolution operation of the front layer makes the recurrent neural network unable to fully play the role of extracting the time series features of the original data. Therefore, the method in the present application connects the convolutional neural network and the recurrent neural network in parallel.
[0122] This application uses two different network structures, convolutional neural network and recurrent neural network, in parallel, which can better capture the time domain and frequency domain characteristics of noise signals. This method can fully utilize the advantages of different network structures and obtain richer and more effective feature expressions; this application fuses the feature maps from two branches, fully combines the advantages of different features, and converts the fused features into a unified feature representation through operations such as Concat and Flatten, providing an input data format for subsequent noise source identification tasks; this application sets noise classification and noise source localization in parallel as two sub-networks, which can simultaneously realize noise category recognition and spatial positioning, wherein the noise classification network uses the sigmoid activation function to output the noise source category probability, and the noise source localization network uses the tanh activation function to output the coordinate information relative to the mobile noise sensor.
[0123] This application adopts an end-to-end deep learning method, which can simultaneously complete noise category identification and noise source location, improving the accuracy and efficiency of noise source identification; a recurrent neural network branch is used in the noise feature extraction module to extract features, so that the model pays full attention to the time series characteristics in the noise signal, thereby achieving the effect of improving the accuracy of noise category identification.
[0124] S4, performing knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification;
[0125] In particular, see Figure 4 The steps of performing knowledge distillation on the noise source identification model to obtain a lightweight noise source identification model are as follows:
[0126] Step S51: using the noise source recognition model as a teacher model, pre-training the teacher network, and obtaining the training weights of the teacher network;
[0127] Step S52: reducing the number of convolution channels in the noise feature extraction module and the noise feature fusion module in the noise source identification model to 1 / 2 of the original number of convolution channels, and constructing a student model;
[0128] Step S53: Use attention distillation to perform feature distillation on the student model;
[0129] Step S54: using KL divergence to perform response classification distillation on the student model;
[0130] Step S55: Based on step S53 and step S54, a noise source identification teacher-student structure model is constructed;
[0131] Step S56: using an offline distillation method, fixing the training weights of the teacher network, training the noise source identification teacher-student structure model, and obtaining a noise source identification lightweight model.
[0132] Furthermore, the step of performing feature distillation on the student model using attention distillation is: using L2 loss to calculate the spatial attention loss and channel attention loss of the teacher model and the student model, and summing the results to construct an attention-based distillation loss function;
[0133] The calculation formulas for spatial attention and channel attention are as follows:
[0134]
[0135] Among them, E represents the input feature, H represents the height, and W represents the width;
[0136] The attention-based distillation loss function L at The calculation formula is as follows:
[0137] L at =L2(A s (E S ),A s (E T ))+L2(A c (E S ),A c (E T ))
[0138] Among them, E S represents the characteristics of the student network, E T Represents the characteristics of the teacher network.
[0139] In some preferred embodiments, the feature distillation layer selects the feature map output by the convolution layer and the pooling layer in the noise feature fusion module as the feature distillation layer of the noise source identification teacher-student structure model. The feature map output by the convolution layer and the pooling layer in the noise feature fusion module is at the back end of the entire network model. The feature map focuses on the features that are basically required by the network model tasks, and introduces fewer noise points, which makes the feature distillation effect better, thereby reducing the adverse effects of distillation on the reduction of accuracy.
[0140] Furthermore, the step of using KL divergence to perform response classification distillation on the student model is:
[0141] When training the teacher-student structure model for noise source identification, a temperature parameter T is introduced in the output layer of the noise classification network;
[0142] The KL divergence is used to calculate the response classification distillation of the teacher-student structure model for noise source identification, and the response-based classification distillation loss is constructed;
[0143] The response-based classification distillation loss L cls The calculation process is as follows:
[0144]
[0145] L cls =T 2 ×KLdiv(C s , C t )
[0146] Among them, Z t , Z s Represent the classification outputs of the teacher network and the student network, respectively, and C t , C s Represent the softened labels of the teacher network and the student network respectively.
[0147] Furthermore, the noise source identification teacher-student structure model total loss L total By the attention-based distillation loss function L at , response-based classification distillation loss L cls and the training loss L of the student network itself stu composition;
[0148] L total =aL at +bL cls +cL stu
[0149] Among them, a, b, and c are weight ratios;
[0150] It should be noted that when training the noise source identification teacher-student structure model, in order to make the channel scale of the teacher model the same as the channel scale of the student model, a 1×1 adaptive convolution layer is added to align the channel scales of the teacher model and the student model.
[0151] In some preferred embodiments, the original noise source identification model is used as a teacher model, and its pre-trained weights are used as initialization; in the student model, model compression and lightweighting are achieved by reducing the number of convolution channels, but reducing the number of convolution channels will lead to a decrease in the accuracy of the noise source identification model. Therefore, this embodiment uses knowledge distillation to lightweight the noise source identification model. Through knowledge distillation, a lightweight model of the noise source identification model is obtained, so that the model has a smaller number of parameters and a smaller size while basically achieving the accuracy of the original model, which is conducive to the deployment of the noise source identification model in a mobile device, while improving the reasoning efficiency and resource utilization of the mobile device.
[0152] This application uses attention distillation to transfer the feature expression ability of the teacher model to the student model. Knowledge distillation based on the attention mechanism can effectively capture the importance information of the features and improve the feature expression ability of the student model. By transferring the predicted probability distribution of the teacher model to the student model through the KL divergence method, it can not only improve the classification performance of the student model, but also maintain the prediction output similar to the teacher model.
[0153] This application adopts an offline distillation method, fixes the weight of the teacher model, and only trains the student model. This method can greatly improve the efficiency of knowledge distillation training, and also avoids the interference of adverse changes in the teacher model on the student model during training. The lightweight design based on knowledge distillation can not only well preserve the performance of the original model, but also greatly compress the model size, improve the efficiency of deployment and reasoning, meet the lightweight requirements of practical applications, and promote the performance optimization of the entire system and practical application deployment.
[0154] S5. Use a mobile noise sensor to obtain the noise signal of the noise source to be identified along the highway. Based on the noise signal feature map extraction model and the noise source identification lightweight model, obtain the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor to complete the noise source identification along the highway.
[0155] Example 2
[0156] Figure 5 An embodiment of the present application provides a system for identifying noise sources along a highway using a convolutional neural network. The system as a whole can be divided into:
[0157] Noise signal acquisition module: used to acquire noise signals of known noise sources along the highway using mobile noise sensors;
[0158] Feature map extraction module: used to obtain the noise signal feature map based on the noise signal and use the noise signal feature map extraction model to construct a noise signal feature map data set; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module and a feature map splicing processing module;
[0159] Identification model training module: used to construct a noise source identification model; the noise source identification model is obtained by training the noise source identification network through the noise signal feature map data set; the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module and a noise identification module;
[0160] Model lightweight module: used to perform knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification;
[0161] Noise source identification module: used to use mobile noise sensors to obtain noise signals of noise sources to be identified along the highway. Based on the noise signal feature map extraction model and the noise source identification lightweight model, the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor are obtained to complete the noise source identification along the highway.
[0162] Example 3
[0163] Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 As shown, according to another aspect of the present application, an electronic device 100 is also provided. The electronic device 100 may include one or more processors and one or more memories. The memories store computer readable codes, and when the computer readable codes are executed by one or more processors, the method for identifying noise sources along a highway using a convolutional neural network as described above may be executed.
[0164] The method or device according to the embodiment of the present application can also be used by Figure 6 The electronic device architecture shown in FIG. Figure 6 As shown, the electronic device 100 may include a bus 101, one or more CPUs 102, a read-only memory (ROM) 103, a random access memory (RAM) 104, a communication port 105 connected to a network, an input / output component 106, a hard disk 107, etc. The storage device in the electronic device 100, such as the ROM 103 or the hard disk 107, may store the method for identifying noise sources along a highway using a convolutional neural network provided in the present application. The method for identifying noise sources along a highway using a convolutional neural network may, for example, include the following steps: using a mobile noise sensor to obtain noise signals of known noise sources along the highway; based on the noise signal, using a noise signal feature map extraction model to obtain a noise signal feature map, and constructing a noise signal feature map data set; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel-Cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module, and a feature map splicing processing module; constructing a noise source identification model; the noise source identification model is obtained by training a noise source identification network through the noise signal feature map data set; the noise source identification network model consists of a noise feature extraction module, a noise feature fusion module, and a noise identification module; performing knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification; using a mobile noise sensor to obtain noise signals of noise sources to be identified along the highway, and based on the noise signal feature map extraction model and the noise source identification lightweight model, obtaining the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor, and completing the noise source identification along the highway.
[0165] Furthermore, the electronic device 100 may further include a user interface 108. Figure 6 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 6 One or more components of an electronic device are shown.
[0166] Example 4
[0167] Figure 7 Schematic diagram of a computer-readable storage medium structure provided by an embodiment of the present application. Figure 7 As shown, a computer-readable storage medium 200 according to an embodiment of the present application is shown. Computer-readable instructions are stored on the computer-readable storage medium 200. When the computer-readable instructions are executed by the processor, the method for identifying noise sources along a highway using a convolutional neural network according to an embodiment of the present application described with reference to the above figures can be executed. The computer-readable storage medium 200 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0168] In addition, according to the implementation of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium stores machine-readable instructions, the machine-readable instructions can be run by a processor to execute instructions corresponding to the method steps provided by the present application, and when the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed.
[0169] The methods, apparatuses, and devices of the present application may be implemented in many ways. For example, the methods, apparatuses, and devices of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers recording media storing programs for executing the method according to the present application.
[0170] In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.
[0171] The specific implementation modes as described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation mode of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0172] The above preset parameters or preset thresholds are all set by technicians in this field according to actual conditions or obtained through large-scale data simulation.
[0173] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for identifying noise sources along a highway using a convolutional neural network, characterized in that: The following steps are involved: S1. Using a mobile noise sensor to obtain noise signals from known noise sources along the highway; S2. Based on the noise signal, a noise signal feature map extraction model is used to obtain a noise signal feature map, and a noise signal feature map data set is constructed; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module, and a feature map splicing processing module; S3, constructing a noise source identification model; the noise source identification model is obtained by training a noise source identification network through the noise signal feature map data set; the noise source identification network is composed of a noise feature extraction module, a noise feature fusion module and a noise identification module; S4, performing knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification; S5. Using a mobile noise sensor to obtain a noise signal of a noise source to be identified along the highway, and based on a noise signal feature map extraction model and a noise source identification lightweight model, obtaining a noise category of the noise to be identified and a three-dimensional coordinate relative to the mobile noise sensor, thereby completing the identification of noise sources along the highway; The step of obtaining the noise signal feature map based on the noise signal by using the noise signal feature map extraction model is as follows: Step S11: using a noise signal preprocessing module to perform a preprocessing operation on the noise signal to obtain a standardized noise signal; the preprocessing operation adopts zero mean normalization; Step S12: extracting a Mel-cepstral coefficient feature map of a standard noise signal using a Mel-cepstral coefficient feature map extraction module; Step S13: extracting a generalized cross-correlation feature map of the standard noise signal using a generalized cross-correlation feature map extraction module; Step S14: using a feature map splicing processing module to splice the Mel-frequency cepstral coefficient feature map and the generalized cross-correlation feature map to obtain a noise signal feature map; The Mel-cepstral coefficient feature map is a 2D tensor, including a time frame dimension and a Mel-cepstral coefficient dimension; The generalized cross-correlation feature map is a 3D tensor, including a time frame dimension, a frequency band dimension, and a channel dimension; The step of using the feature map splicing processing module to splice the Mel cepstral coefficient feature map and the generalized cross-correlation feature map is as follows: Step S21: performing a flattening operation on the generalized cross-correlation feature map; the flattening operation is to merge the frequency band dimension and the channel dimension in the generalized cross-correlation feature map into one dimension; Step S22: Fill the generalized cross-correlation feature map after the flattening operation with zero values along the time frame dimension until the number of time frames is consistent with that of the Mel-frequency cepstrum feature map; Step S23: splicing the filled generalized cross-correlation feature map to the back of the Mel-frequency cepstrum feature map to complete the splicing process.
2. The method for identifying noise sources along a highway using a convolutional neural network according to claim 1, characterized in that: The noise signal format of the known noise sources along the highway acquired by the mobile noise sensor is in MIC format; the mobile noise sensor includes a microphone array; the microphone array consists of n microphones.
3. The method for identifying noise sources along a highway using a convolutional neural network according to claim 2, characterized in that: The step of extracting the Mel-frequency cepstral coefficient feature map of the standard noise signal is as follows: Step S31: performing a pre-emphasis, frame division and windowing process on the standard noise signal and then performing a fast Fourier transform to obtain a short-time energy spectrum of each time frame; Step S32: passing the short-time energy spectrum through a triangular Mel filter bank to obtain a Mel-frequency energy spectrum of each time frame; Step S33: performing a logarithmic operation on the Mel frequency spectrum to obtain logarithmic frequency spectrum coefficients; Step S34: performing discrete cosine transform on the logarithmic frequency spectrum coefficients to obtain Mel-frequency cepstrum coefficients; Step S35: Combine the Mel-cepstral coefficients of all time frames along the time axis to form a two-dimensional feature map, thereby obtaining a Mel-cepstral coefficient feature map.
4. The method for identifying noise sources along a highway using a convolutional neural network according to claim 3, characterized in that: The step of extracting the generalized cross-correlation feature map of the canonical noise signal is: Step S41: Obtaining noise information of n channels of the standard noise signal; Step S42: Calculate the generalized cross-correlation function between two channels in the n channel noise information; Step S43: sharpening the peak value of the generalized cross-correlation function by using a phase-variable PHAT weighting method; Step S44: The sharpened generalized cross-correlation values are combined into a 3D tensor as a generalized cross-correlation feature map of the normalized noise signal, wherein the 3D tensor includes a time frame dimension, a frequency band dimension, and an n×n channel dimension.
5. The method for identifying noise sources along a highway using a convolutional neural network according to claim 4, characterized in that: The noise source identification network consists of a noise feature extraction module, a noise feature fusion module and a noise identification module, wherein: The noise feature extraction module is composed of two branches, a convolutional neural network and a recurrent neural network, connected in parallel; the convolutional neural network is composed of an input layer, a convolutional layer and a pooling layer; the recurrent neural network is composed of a BiGRU network; The noise feature fusion module receives the feature maps output by the two branches of the noise feature extraction module and performs feature fusion to obtain a fused feature map; the noise feature fusion module is composed of a Concat layer, a Flatten layer, a convolution layer and a pooling layer; the Flatten layer flattens the fused feature map into a one-dimensional vector; The noise identification module is composed of two branches, a noise classification network and a noise source localization network, connected in parallel; The noise classification network consists of two fully connected layers and a sigmoid activation function, wherein the number of nodes in the second fully connected layer is the number of noise source categories; The noise source localization network consists of three fully connected layers and a tanh activation function, wherein the number of nodes in the third fully connected layer is three times the number of noise source categories.
6. The method for identifying noise sources along a highway using a convolutional neural network according to claim 5, characterized in that: The steps of performing knowledge distillation on the noise source identification model to obtain a lightweight noise source identification model are: Step S51: using the noise source recognition model as a teacher model, pre-training the teacher network, and obtaining the training weights of the teacher network; Step S52: reducing the number of convolution channels in the noise feature extraction module and the noise feature fusion module in the noise source identification model to 1 / 2 of the original number of convolution channels, and constructing a student model; Step S53: Use attention distillation to perform feature distillation on the student model; Step S54: using KL divergence to perform response classification distillation on the student model; Step S55: Based on step S53 and step S54, a noise source identification teacher-student structure model is constructed; Step S56: using an offline distillation method, fixing the training weights of the teacher network, training the noise source identification teacher-student structure model, and obtaining a noise source identification lightweight model; The step of using attention distillation to perform feature distillation on the student model is: using L2 loss to calculate the spatial attention loss and channel attention loss of the teacher model and the student model, and summing the results to construct an attention-based distillation loss function; Spatial AttentionA s and channel attention A c The calculation formula is as follows: Among them, E represents the input feature, H represents the height, and W represents the width; The attention-based distillation loss function L at The calculation formula is as follows: L at =L2(A s (E S ),A s (E T ))+L2(A c (E S ),A c (E T )) Among them, E S represents the characteristics of the student network, E T Represents the characteristics of the teacher network; The steps of using KL divergence to perform response classification distillation on the student model are as follows: when training the noise source identification teacher-student structure model, a temperature parameter T is introduced in the output layer of the noise classification network; KL divergence is used to calculate the response classification distillation of the noise source identification teacher-student structure model, and a response-based classification distillation loss is constructed; The response-based classification distillation loss L cls The calculation process is as follows: L cls =T 2 ×KLdiv(C s ,C t ) Among them, Z t , Z s Represent the classification outputs of the teacher network and the student network, respectively, and C t , C s Represent the softened labels of the teacher network and the student network respectively; The noise source identification teacher-student structure model total loss L total By the attention-based distillation loss function L at , response-based classification distillation loss L cls and the training loss L of the student network itself stu composition; <h2 style=";text-align:left;direction:ltr">L<h2 style=";text-align:left;direction:ltr"> total <h2 style=";text-align:left;direction:ltr"> =aL<h2 style=";text-align:left;direction:ltr"> at <h2 style=";text-align:left;direction:ltr"> +bL<h2 style=";text-align:left;direction:ltr"> cls <h2 style=";text-align:left;direction:ltr"> +cL<h2 style=";text-align:left;direction:ltr"> stu Among them, a, b, and c are weight ratios; When training the noise source identification teacher-student structure model, a 1×1 adaptive convolution layer is added to align the channel scales of the teacher model and the student model.
7. A system for identifying noise sources along a highway using a convolutional neural network, based on the method for identifying noise sources along a highway using a convolutional neural network according to any one of claims 1 to 6, characterized in that: The system comprises: Noise signal acquisition module: used to acquire noise signals of known noise sources along the highway using mobile noise sensors; Feature map extraction module: used to obtain the noise signal feature map based on the noise signal and use the noise signal feature map extraction model to construct a noise signal feature map data set; the noise signal feature map extraction model includes a noise signal preprocessing module, a Mel cepstral coefficient feature map extraction module, a generalized cross-correlation feature map extraction module and a feature map splicing processing module; Identification model training module: used to construct a noise source identification model; the noise source identification model is obtained by training the noise source identification network through the noise signal feature map data set; the noise source identification network is composed of a noise feature extraction module, a noise feature fusion module and a noise identification module; Model lightweight module: used to perform knowledge distillation on the noise source identification model to obtain a lightweight model for noise source identification; Noise source identification module: used to use mobile noise sensors to obtain noise signals of noise sources to be identified along the highway. Based on the noise signal feature map extraction model and the noise source identification lightweight model, the noise category of the noise to be identified and the three-dimensional coordinates relative to the mobile noise sensor are obtained to complete the noise source identification along the highway.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method realizes the steps in the method for identifying noise sources along a highway using a convolutional neural network as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which is suitable for being loaded by a processor to execute the steps in the method for identifying noise sources along a highway using a convolutional neural network as described in any one of claims 1 to 6.
