Marine mammal call data enhancement method based on improved Inception block and SACGAN

Through the improved Inception block, SACGAN generator and WaveGlow vocoder, the problem of imbalanced distribution between classes in the marine mammal call data set is solved, high-quality call data is generated, and the accuracy and computational efficiency of the classification model are improved. , promoting the protection of marine biodiversity.

CN118506792BActive Publication Date: 2024-10-18QINGDAO UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410961448.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-18
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

The imbalanced distribution between classes in the marine mammal call data set results in low prediction performance of the classification model, and existing data augmentation methods are time-consuming and computationally complex to generate samples.

Method used

Using the improved Inception block with the SACGAN generator and WaveGlow vocoder, a marine mammal call data set is formed through denoising preprocessing, MFCC feature extraction, mel spectrogram generation and audio signal reconstruction to improve the balance of the data set. and generative diversity.

Benefits of technology

It has significantly improved the accuracy of the marine mammal call classification model, promoted the protection of marine biodiversity, and improved the quality of generated samples and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118506792B_ABST
    Figure CN118506792B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for enhancing marine mammal call data based on an improved Inception block and SACGAN, and belongs to the technical field of audio processing and generation. The method performs wavelet denoising on marine mammal call data to improve audio quality; converts the denoised call into a mel spectrogram for representation to form a data set; designs a call generation network, introduces label variables representing the species of marine mammals into the network, guides the generator to generate data of a specified type, and uses convolution kernels of different sizes in the same level to extract features under different receptive fields in the improved Inception block. Design a loss function; use WaveGlow as a vocoder to reconstruct the generated mel spectrogram back into a high-quality audio signal; and design a classification experiment to evaluate the effectiveness of the method in this article. The present invention realizes the enhancement of marine mammal call data and effectively improves the prediction accuracy of the classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio processing and generation, and in particular to a method for enhancing marine mammal call data based on an improved Inception block and SACGAN. Background Art

[0002] In recent years, marine mammal call recognition and classification technology has played an important role in protecting marine biodiversity. This technology can help biologists understand the presence of specific species at specific times and places, and monitor their population size and distribution. If the calls of marine mammals are found to be significantly reduced or disappeared in some areas with frequent human activities, it may mean that these activities have had an impact on them, and timely measures need to be taken to protect them. However, the collection of marine mammal calls is difficult and costly, and the public data sets are limited and skewed. This small amount of data and unbalanced distribution between classes greatly reduce the predictive performance of the classification model. Therefore, a marine mammal data enhancement method is needed to expand the data set.

[0003] At present, data enhancement methods have performed well in the field of computer vision, attracting researchers to start paying attention to its application in the audio field. Dhariwal et al. used multi-scale VQ-VAE to compress the original audio into discrete codes, and used an autoregressive model to model it to directly infer the audio signal, generating pleasant and realistic audio. However, this method can only generate one sample at a time, which takes a long time. Moreover, traditional convolutional neural networks are composed of multiple layers of convolutional layers, which are not only prone to overfitting problems and difficult to update network gradients, but also have many network parameters and are difficult to calculate. Summary of the invention

[0004] In view of the shortcomings and deficiencies in the prior art, the present invention provides a method for enhancing marine mammal call data based on improved Inception blocks and SACGAN, which generates call mel-spectrograms through a powerful image generation technology of a generative adversarial network, reconstructs the generated mel-spectrograms back into audio using a vocoder, and realizes the generation of marine mammal calls. After adding the generated calls, the inter-class distribution of the marine mammal call data set is more balanced, greatly improves the classification accuracy, and promotes the protection of marine biodiversity.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: The present invention provides a method for enhancing marine mammal call data based on an improved Inception block and SACGAN (Self-Attention Conditional Generative Adversarial Network), the method comprising the following steps in sequence:

[0006] S1: De-noising preprocessing of marine mammal call data to improve audio quality;

[0007] S2: MFCC is used for feature extraction to convert the noise-reduced calls into original Mel spectrograms for representation, and the Mel spectrograms of the audio signals are obtained as feature representation to form a data set, including a training set and a test set;

[0008] S3: Build a call generation network based on the improved Inception block and SACGAN, design a loss function, introduce label variables representing the species of marine mammals into the call generation network, train the call generation network using the training set in step S2, and guide the generator to generate new mel-spectrograms of the specified species;

[0009] S4: Use WaveGlow to reconstruct the Mel spectrogram generated in step S3 into a high-quality audio signal;

[0010] S5: Put the generated calls obtained in step S4 into the original call data set to obtain a mixed data set; perform a classification comparison experiment together with the original call data set to verify that the method proposed in the present invention can improve the classification accuracy.

[0011] Preferably, S1 comprises the following specific steps: in order to improve the data quality, the marine mammal calls are pre-processed for denoising, the downloaded marine mammal calls are cut into segments with a duration of 1 s, the sampling rate is resampled to 48 KHz, and wavelet denoising is performed to improve the accuracy and efficiency of subsequent analysis;

[0012] Regarding wavelet denoising, after wavelet decomposition and reconstruction operations, the wavelet decomposition formula is expressed as:

[0013] (1)

[0014] (2)

[0015] In the formula, C A is the approximate coefficient, C D is the detail coefficient, n is the sampling position index, k is the position index of the wavelet function in scale and translation, x[k] is the sample value of the original signal, which is used as input in the summation, h[n] is the low-pass filter, g[n] is the high-pass filter, and n-2k is the offset, which reflects the position relationship of the filter when it slides on the signal, indicating that the filter moves relative to the original signal at twice the sampling rate. The signal is processed by low-pass and high-pass filters to separate the different frequency components of the signal and analyze them at different scales. It is suitable for denoising non-stationary signals such as the calls of marine mammals.

[0016] Preferably, S2 is specifically as follows: the Mel frequency scale can perform frequency transformation according to the auditory perception of the human ear and retain important characteristics of the signal;

[0017] MFCC is used for feature extraction to obtain the Mel spectrogram of the audio signal as a feature representation; the continuous audio signal is divided into multiple short time frames, and the Hamming window is used as the frame window function. STFT is applied to each time frame to convert the time domain signal into the frequency domain signal. The mathematical expression of short-time Fourier transform is:

[0018] (3)

[0019] Where t is time, ω is frequency, x(t) is the continuous time signal to be analyzed, ω(t) is the window function used to limit the time range of the analysis, T is the time offset parameter, which indicates the time position of the window function relative to the signal, and e -jωt It is a complex exponential function, which is the basic kernel function in Fourier transform. It is used to convert the intercepted signal part into the frequency domain. By changing the T value and moving the time window, the frequency distribution of the signal at different time positions can be obtained.

[0020] The frequency domain information is weighted using the Mel filter, and the spectrum processed by the Mel filter bank is logarithmically transformed to obtain a logarithmic Mel spectrogram:

[0021] (4)

[0022] Where L(m,t) is the logarithmic Mel-spectrogram and E(m,t) is the energy at time t and Mel-frequency m.

[0023] Preferably, S3 is as follows:

[0024] S3-1: Design the generator network: The generator input is a random noise and a label variable representing the species of marine mammals, generating a mel-spectrogram of the specified species to improve the application flexibility of the model;

[0025] The specific network consists of an Embedding layer, a fully connected layer, a deconvolution layer, an improved Inception block, a self-attention module, and a convolution layer;

[0026] The discrete label variables are converted into continuous vectors after dimension upgrading in the Embedding layer, and then concatenated with random noise to help the model better understand the input data.

[0027] The improved Inception block consists of four branches, which decomposes a 3x3 convolution into a 1x3 convolution and a 3x1 convolution. Specifically, the first branch consists of a layer of 1×1 convolution and two layers of 3×3 convolution, the second branch consists of a layer of 1×1 convolution, a layer of 1×3 convolution and a layer of 3×1 convolution, the third branch consists of a pooling layer and a layer of 1×1 convolution, and the fourth branch consists of a layer of 1×1 convolution.

[0028] Preferably, in the third branch of the improved Inception block, an average pooling layer is used, which divides the input image into several rectangular areas and outputs the average value of all values ​​for each sub-area, which is expressed as:

[0029] (5)

[0030] In the formula, Indicates The rectangular area related to the feature map Average pooling output value, Represents a rectangular area The value at position (p,q), Represents a rectangular area The number of elements in

[0031] At the same time, a self-attention module is added between the two Inception blocks to help the model learn the intrinsic structure and pattern of the input data, enhance the feature representation ability of the model, and improve the quality of generated samples.

[0032] Preferably, the method further comprises step S3-2: designing a discriminator network: the discriminator input is a real sample and a conditional variable or a generated sample and a conditional variable;

[0033] The specific network consists of four layers of Inception blocks, one layer of Residual blocks, one layer of pooling layer, one self-attention module and one layer of fully connected layer;

[0034] The residual block consists of two convolutional layers, two batch normalization layers, and one activation layer. It propagates gradient information through skip connections to better maintain the information flow in the network, reduce the gradient vanishing problem, and improve training stability.

[0035] Adding a batch normalization layer after the convolution operation in the residual block can normalize the increasingly biased data distribution to a reasonable interval, so that most activation values ​​can be distributed in each interval. This can effectively avoid the gradient vanishing problem that occurs as the number of layers of the neural network increases, and speed up the learning convergence. The normalization formula is:

[0036] (6)

[0037] (7)

[0038] (8)

[0039] (9)

[0040] In the formula, μ represents the mean of the batch data, N bat represents the batch value, x n represents the data tensor, σ 2 is the variance of the batch data, represents the standardized data, x represents the original data, ε represents a constant to prevent division by zero in the formula, and y n is the data after batch normalization, γ is the scaling factor, and β is the offset factor;

[0041] At the same time, the self-attention module is introduced after the pooling operation, so that the model can adaptively select the most critical feature channels, enhance the feature representation ability, and enable the model to have both low-dimensional main feature information and rich detail information.

[0042] Preferably, step S3-3 is also included: designing a loss function: using Wasserstein distance as the loss function to effectively prevent the mode collapse problem that is prone to occur during training, and adding a gradient penalty term to the discriminator loss function to ensure that the discriminator function satisfies the Lipschitz continuity constraint, effectively avoiding the gradient explosion or disappearance problem during training, and improving training stability and model convergence speed; the generator loss function is:

[0043] (10)

[0044] Where P z Represents the data distribution of samples generated by the generator, z is P z The randomly sampled noise vector in , y is the conditional variable, G(z|y) is the fake sample generated by the generator G under the given condition y, D(G(z|y)) is the evaluation of the fake sample by the discriminator D, and E is the expected value. This formula hopes that the maximum generated sample will be judged as the expected value of the real sample by the discriminator;

[0045] The discriminator loss function is:

[0046] (11)

[0047] (12)

[0048] Where P r Represents the data distribution of the real sample, x is Pr The samples in, λ is the weight of the gradient penalty term, GP is the gradient penalty term, is a random interpolation between the real sample x and the generated sample z, represents the sampling distribution of the gradient penalty term, Represents the gradient norm under the discriminator, the purpose is to ensure that the gradient norm of the discriminator function is close to 1 and satisfies the Lipschitz constraint; the goal of the discriminator D is to maximize the evaluation of real samples.

[0049] Preferably, the call generation network is trained, and the Adam optimizer is selected as the generator and discriminator network optimizer. Since the generator is difficult to train, it is set to train the generator five times for each discriminator training. The generator learning rate is 1e-5, the discriminator learning rate is 4e-5, and the epoch is 3000.

[0050] Preferably, S4 is specifically as follows: reconstructing the generated mel-spectrogram samples into high-quality audio using a WaveGlow model, the WaveGlow model can accurately learn the probability distribution of audio data and obtain long-distance information, has a better tolerance for the prediction error of the mel-spectrogram, and therefore has better generation quality and generalization ability;

[0051] In large-scale audio processing tasks, WaveGlow allows GPU parallel computing, which can significantly increase the speed of audio synthesis;

[0052] The training goal of WaveGlow is to maximize the likelihood of the training data, that is, to minimize the negative log-likelihood loss:

[0053] (13)

[0054] In the formula, represents the estimated optimal parameter value, is the likelihood function, which measures the probability of Set up observation The probability of Represents data points At the given parameters The probability of The natural logarithm of

[0055] This expression expects to find a set of parameters , so that all data points x 1 , x 1 ,..., x N About Model Parameters The sum of negative log-likelihoods is minimized.

[0056] Preferably, S5 is specifically as follows: adding the generated call obtained in step 4 to the original call data set to obtain a mixed data set, and performing a classification comparison experiment with the original call data set;

[0057] Calculate the model's precision, recall, and F1 score to evaluate the model's classification ability:

[0058] (14)

[0059] (15)

[0060] (16)

[0061] Where precision is the ratio of correctly predicted positive samples to all samples predicted as positive by the model; True Positives are correctly predicted positive samples, False Positives are incorrectly predicted positive samples, so True Positives+False Positives are all samples predicted as positive by the model;

[0062] Recall is the ratio of correctly predicted positive samples to all samples correctly predicted as positive by the model; among them, True Positives are correctly predicted as positive samples, and False Negatives are incorrectly predicted as negative samples; therefore, True Positives+False Negatives are all samples correctly predicted as positive by the model;

[0063] The F1 score is the harmonic mean of precision and recall, which takes both precision and recall into consideration.

[0064] The present invention provides a method for enhancing marine mammal call data based on improved Inception blocks and SACGAN. It has the following beneficial effects:

[0065] The marine mammal call data enhancement method based on the improved Inception block and SACGAN of the present invention proposes a new call generation framework method. First, the call audio waveform is extracted by MFCC feature to obtain the Mel spectrogram for feature representation. The Mel frequency scale can perform frequency transformation according to the auditory perception of the human ear and retain the important characteristics of the signal. In the speech recognition task, its accuracy and computational efficiency are better than other representations. Then a call generation network based on the improved Inception block and SACGAN is proposed, which can generate Mel spectrograms of specified types with high quality, improving the application flexibility of the generation diversity model.

[0066] Finally, WaveGlow is used as a vocoder to reconstruct the generated mel-spectrogram back into a high-quality audio signal to obtain the generated marine mammal calls.

[0067] Experimental results show that the method of the present invention can effectively improve the performance of the classification model and realize the generation of marine mammal calls. After adding the generated calls, the inter-class distribution of the marine mammal call dataset is more balanced, which greatly improves the classification accuracy and promotes the protection of marine biodiversity. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 This is an overall flow chart of a method for enhancing marine mammal call data based on an improved Inception block and SACGAN according to an embodiment of the present invention;

[0069] Figure 2 The corresponding relationship diagram of the original audio waveform and the spectrogram is obtained by randomly selecting audio samples of the calls of four marine mammals and performing STFT processing in the embodiment of the present invention; wherein KW represents killer whale, HW represents humpback whale, PW represents pilot whale, and BND represents bottlenose dolphin; Figure 2 (a) Original audio waveform, Figure 2 (b) call spectrogram, Figure 2 (c) Mel-spectrogram;

[0070] Figure 3 A diagram of a network structure for generating a call according to an embodiment of the present invention;

[0071] Figure 4 Generate a Mel-spectrogram sample graph for an embodiment of the present invention;

[0072] Figure 5 This is a confusion matrix diagram of an embodiment of the present invention, where: Figure 5 (a) Confusion matrix diagram of the classification model trained on a dataset consisting of raw calls. Figure 5 (b) is a confusion matrix diagram of a classification model trained with a mixed data set consisting of original calls and call data obtained using the method of the present invention. DETAILED DESCRIPTION

[0073] In order to make the technical means, creative features and effects achieved by the present invention easy to understand, the technical solutions in the embodiments of the present invention will be further clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0074] Example 1

[0075] The overall flow chart of the marine mammal call data enhancement method based on the improved Inception block and SACGAN provided by the present invention is as follows: Figure 1 As shown, the following steps are included:

[0076] S1: Preprocess the marine mammal calls to improve data quality. The downloaded marine mammal calls are cut into segments of 1 second in length, the sampling rate is resampled to 48KHz, and wavelet denoising preprocessing is performed to improve the accuracy and efficiency of subsequent analysis. Wavelet denoising preprocessing, after wavelet decomposition and reconstruction operations, the wavelet decomposition formula is expressed as:

[0077] (1)

[0078] (2)

[0079] In the formula, C A is the approximate coefficient, C D is the detail coefficient, n is the sampling position index, k is the position index of the wavelet function in scale and translation, x[k] is the sample value of the original signal, which is used as input in the summation, h[n] is the low-pass filter, g[n] is the high-pass filter, and n-2k is the offset, which reflects the position relationship of the filter when it slides on the signal, indicating that the filter moves relative to the original signal at twice the sampling rate. The signal is processed by low-pass and high-pass filters to separate the different frequency components of the signal and analyze them at different scales. It is suitable for denoising non-stationary signals such as the calls of marine mammals.

[0080] S2: Convert the calls into mel spectrograms to form a data set, and divide the data set into a training set and a test set at a ratio of 8:2. Figure 2 , audio samples of four marine mammal calls were randomly selected for STFT (Short Time Fourier Transform) processing, where KW represents killer whales, HW represents humpback whales, PW represents pilot whales, and BND represents bottlenose dolphins, and the correspondence between the original audio waveform and the spectrogram was obtained. The four different call audios are similar in the time domain, but significantly different in the frequency domain. Therefore, the features selected by the present invention mainly come from the frequency domain. Among them, the Mel frequency scale can perform frequency conversion according to the auditory perception of the human ear and retain the important characteristics of the signal. In the speech recognition task, its accuracy and computational efficiency are better than other representations. Therefore, the present invention chooses to use the Mel spectrogram as the feature representation.

[0081] Therefore, the present invention selects to use Mel Frequency Cepstral Coefficients (MFCC) for feature extraction and obtains the Mel spectrogram of the audio signal as a feature representation. The continuous audio signal is divided into multiple short time frames, and the Hamming window is used as the frame window function. The short-time Fourier transform (STFT) is applied to each time frame to convert the time domain signal into the frequency domain signal. The mathematical expression of the short-time Fourier transform is:

[0082] (3)

[0083] Where t is time, ω is frequency, x(t) is the continuous time signal to be analyzed, ω(t) is the window function used to limit the time range of the analysis, T is the time offset parameter, which indicates the time position of the window function relative to the signal, and e -jωt is a complex exponential function, which is the basic kernel function in Fourier transform. It is used to convert the intercepted signal part into the frequency domain. By changing the T value and moving the time window, the frequency distribution of the signal at different time positions is obtained. Then, the frequency domain information is weighted using the Mel filter, and the spectrum processed by the Mel filter bank is logarithmically transformed to obtain the logarithmic Mel spectrum:

[0084] (4)

[0085] Where L(m,t) is the logarithmic Mel-spectrogram and E(m,t) is the energy at time t and Mel-frequency m.

[0086] Example 2

[0087] S3: Build a call generation network based on the improved Inception block and SACGAN, design the loss function, and build a call generation network such as Figure 3 As shown, the details are as follows:

[0088] S3-1: The generator input is a random noise and a label variable representing the species of marine mammals, where KW represents killer whales, HW represents humpback whales, PW represents pilot whales, and BND represents bottlenose dolphins. The specific network consists of an Embedding layer, a fully connected layer, a deconvolution layer, three layers of Inception blocks, a self-attention module, and a convolution layer.

[0089] The discrete label variables are converted into continuous vectors after dimension upgrading through the Embedding layer, and then concatenated with random noise to help the model better understand the input data. Traditional convolutional neural networks are composed of multiple layers of convolutional layers stacked together, which are not only prone to overfitting problems and difficult to update network gradients, but also have many network parameters and are difficult to calculate. The call generation network proposed in the present invention is mainly composed of an improved Inception block. The Inception block consists of four branches. The first branch consists of a layer of 1×1 convolution and two layers of 3×3 convolution. The second branch consists of a layer of 1×1 convolution, a layer of 1×3 convolution and a layer of 3×1 convolution. The third branch consists of a layer of pooling layer and a layer of 1×1 convolution, and the fourth branch consists of a layer of 1×1 convolution. The Inception block in the present invention decomposes a 3x3 convolution into a 1x3 convolution and a 3x1 convolution, further reducing the number of parameters and computational complexity. The third branch of the Inception block uses an average pooling layer, which divides the input image into several rectangular regions and outputs the average value of all values ​​for each sub-region. It is expressed as:

[0090] (5)

[0091] In the formula, Indicates The rectangular area related to the feature map Average pooling output value, Represents a rectangular area The value at position (p,q), Represents a rectangular area The number of elements in .

[0092] At the same time, the present invention adds a self-attention module between the two Inception blocks to help the model learn the intrinsic structure and pattern of the input data, enhance the feature representation ability of the model, and improve the quality of generated samples.

[0093] S3-2: Design a discriminator network, where the input of the discriminator is a real sample and a conditional variable or a generated sample and a conditional variable. The specific network consists of four Inception blocks, one Residual block, one pooling layer, a self-attention module, and one fully connected layer. The Residual block consists of two convolutional layers, two batch normalization layers, and an activation layer. It propagates gradient information through jump connections to better maintain the information flow in the network, reduce the gradient vanishing problem, and improve training stability. Adding a batch normalization layer after the convolution operation in the Residual block can standardize the increasingly biased data distribution to a reasonable interval, so that most of the activation values ​​can be distributed in each interval, which can effectively avoid the gradient vanishing problem that occurs as the number of layers of the neural network increases, and speed up the learning convergence. The standardization formula is:

[0094] (6)

[0095] (7)

[0096] (8)

[0097] (9)

[0098] In the formula, μ represents the mean of the batch data, N bat represents the batch value, x n represents the data tensor, σ 2 is the variance of the batch data, represents the standardized data, x represents the original data, ε represents a constant to prevent division by zero in the formula, and y n is the data after batch normalization, γ is the scaling factor, and β is the offset factor.

[0099] At the same time, the present invention introduces a self-attention module after the pooling operation, so that the model can adaptively select the most critical feature channels, enhance the feature representation capability, and enable the model to have both low-dimensional main feature information and rich detail information.

[0100] S3-3: Design loss function: Use Wasserstein distance instead of traditional JS divergence as the loss function to effectively prevent the mode collapse problem that is prone to occur during training, and add a gradient penalty term to the discriminator loss function to ensure that the discriminator function satisfies the Lipschitz continuity constraint, effectively avoiding the gradient explosion or disappearance problem during training, and improving training stability and model convergence speed. The generator loss function is:

[0101] (10)

[0102] Where Pz Represents the data distribution of samples generated by the generator, z is P z The noise vector randomly sampled in , y is the conditional variable, G(z|y) is the fake sample generated by the generator G under the given condition y, D(G(z|y)) is the evaluation of the fake sample by the discriminator D, and E is the expected value. This formula hopes that the maximum generated sample will be judged as the expected value of the real sample by the discriminator.

[0103] The discriminator loss function is:

[0104] (11)

[0105] (12)

[0106] Where P r Represents the data distribution of the real sample, x is P r The samples in, λ is the weight of the gradient penalty term, GP is the gradient penalty term, is a random interpolation between the real sample x and the generated sample z, represents the sampling distribution of the gradient penalty term, represents the gradient norm under the discriminator, the purpose is to ensure that the gradient norm of the discriminator function is close to 1 and satisfies the Lipschitz constraint. The goal of the discriminator D is to maximize the evaluation of the real sample.

[0107] Train the call generation network and select Adam optimizer as the optimizer for the generator and discriminator networks. Since the generator is more difficult to train, set the generator to be trained five times for every discriminator training. The learning rate of the generator is 1e-5, the learning rate of the discriminator is 4e-5, and the epoch is 3000.

[0108] Example 3

[0109] S4: Random examples of generated mel-spectrogram samples Figure 4 As shown in the figure, the generated Mel-spectrogram samples are reconstructed into high-quality audio using the WaveGlow model. The WaveGlow model can accurately learn the probability distribution of audio data and obtain long-distance information. It has better tolerance for the prediction error of the Mel-spectrogram and therefore has better generation quality and generalization ability. In addition, in large-scale audio processing tasks, computing speed is also a very important evaluation indicator. WaveGlow allows GPU parallel computing, which can significantly improve the speed of audio synthesis. The training goal of WaveGlow is to maximize the likelihood of the training data, that is, to minimize the negative log-likelihood loss:

[0110] (13)

[0111] In the formula, represents the estimated optimal parameter value, is the likelihood function, which measures the probability of Set up observation The probability of Represents data points At the given parameters The probability of The natural logarithm of . This expression hopes to find a set of parameters , so that all data points x 1 , x 1 ,..., x N About Model Parameters The sum of negative log-likelihoods is minimized.

[0112] like Figure 4 As shown, a random example of a mel-spectrogram generated using the method of the present invention, the method of the present invention has the feature of generating mel-spectrograms similar to the features of the original training data, and can generate high-quality mel-spectrograms. In the experiment of the present invention, a total of 1755 mel-spectrogram samples of marine mammal calls were generated using the method of the present invention.

[0113] Example 4

[0114] S5: Add the generated calls obtained in step 4 to the original call data set to obtain a mixed data set, and perform a classification comparison experiment with the original call data set.

[0115] Calculate the model's precision, recall, and F1 score to evaluate the model's classification ability:

[0116] (14)

[0117] (15)

[0118] (16)

[0119] Where, precision is the ratio of correctly predicted positive samples to all samples predicted as positive by the model; True Positives are correctly predicted positive samples, False Positives are incorrectly predicted positive samples, so True Positives+False Positives are all samples predicted as positive by the model;

[0120] Recall is the ratio of correctly predicted positive samples to all samples correctly predicted as positive by the model; among them, True Positives are correctly predicted as positive samples, and False Negatives are incorrectly predicted as negative samples; therefore, True Positives+False Negatives are all samples correctly predicted as positive by the model;

[0121] The F1 score is the harmonic mean of precision and recall, which takes both precision and recall into consideration.

[0122] Figure 5 (a) Confusion matrix of the classification model trained on a dataset consisting of raw calls, Figure 5 (b) is the confusion matrix of the classification model trained with the mixed data set consisting of the original calls and the call data obtained using the method of the present invention. In the matrix, the diagonal elements represent the correct classification rate of each category. It can be clearly seen from the figure that the model trained with the mixed data set shows higher accuracy in identifying the calls of marine mammals. The confusion matrix is ​​plotted for visualization. The prediction accuracy of the classification model trained by the method of the present invention for the calls of the four marine mammals has been generally improved, proving the superiority of the method of the present invention.

[0123] In summary, the marine mammal call data enhancement method based on the improved Inception block and SACGAN of the present invention realizes the enhancement of marine mammal call data, effectively improves the prediction accuracy of the classification model, and also provides a reference method for other types of sound generation.

[0124] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for enhancing marine mammal call data based on improved Inception blocks and SACGAN, characterized by: The method comprises the following steps in sequence: S1: De-noising preprocessing of marine mammal call data to improve audio quality; S2: MFCC is used for feature extraction to convert the noise-reduced calls into original Mel spectrograms for representation, and the Mel spectrograms of the audio signals are obtained as feature representation to form a data set, including a training set and a test set; S3: Build a call generation network based on the improved Inception block and SACGAN, design a loss function, introduce label variables representing the species of marine mammals into the call generation network, train the call generation network using the training set in step S2, and guide the generator to generate new mel-spectrograms of the specified species; The construction of the call generation network based on the improved Inception block and SACGAN includes designing a generator network and designing a discriminator network, and adding a self-attention module between the two Inception blocks to help the model learn the intrinsic structure and pattern of the input data, enhance the feature representation ability of the model, and improve the quality of the generated samples; The improved Inception block consists of four branches, decomposing a 3x3 convolution into a 1x3 convolution and a 3x1 convolution, specifically including: the first branch consists of a layer of 1×1 convolution and two layers of 3×3 convolution, the second branch consists of a layer of 1×1 convolution, a layer of 1×3 convolution and a layer of 3×1 convolution, the third branch consists of a layer of pooling layer and a layer of 1×1 convolution, and the fourth branch consists of a layer of 1×1 convolution; S3-1: Design the generator network: The generator input is a random noise and a label variable representing the species of marine mammals, generating a mel-spectrogram of the specified species to improve the application flexibility of the model; The specific network consists of an Embedding layer, a fully connected layer, a deconvolution layer, an improved Inception block, a self-attention module, and a convolution layer; The discrete label variables are converted into continuous vectors after dimension upgrading in the Embedding layer, and then concatenated with random noise to help the model better understand the input data. In the third branch of the improved Inception block, an average pooling layer is used. The average pooling layer divides the input image into several rectangular areas and outputs the average value of all values ​​for each sub-area, which is expressed as: (1) In the formula, Indicates The rectangular area related to the feature map Average pooling output value, Represents a rectangular area The value at position (p,q), Represents a rectangular area The number of elements in S3-2: Design the discriminator network: The discriminator input is a real sample and a conditional variable or a generated sample and a conditional variable; The specific network consists of four layers of Inception blocks, one layer of Residual blocks, one layer of pooling layer, one self-attention module and one layer of fully connected layer; The residual block consists of two convolutional layers, two batch normalization layers, and one activation layer. It propagates gradient information through skip connections to better maintain the information flow in the network, reduce the gradient vanishing problem, and improve training stability. Adding a batch normalization layer after the convolution operation in the residual block can normalize the increasingly biased data distribution to a reasonable interval, so that most activation values ​​can be distributed in each interval. This can effectively avoid the gradient vanishing problem that occurs as the number of layers of the neural network increases, and speed up the learning convergence. The normalization formula is: (2) (3) (4) (5) In the formula, μ represents the mean of the batch data, N bat represents the batch value, x n represents the data tensor, σ 2 is the variance of the batch data, represents the standardized data, x represents the original data, ε represents a constant to prevent division by zero in the formula, and y n is the data after batch normalization, γ is the scaling factor, and β is the offset factor; At the same time, the self-attention module is introduced after the pooling operation, so that the model can adaptively select the most critical feature channels, enhance the feature representation ability, and enable the model to have both low-dimensional main feature information and rich detail information; S3-3: Design loss function: Use Wasserstein distance as the loss function to effectively prevent the mode collapse problem that is prone to occur during training, and add a gradient penalty term to the discriminator loss function to ensure that the discriminator function satisfies the Lipschitz continuity constraint, effectively avoid gradient explosion or disappearance problems during training, and improve training stability and model convergence speed; the generator loss function is: (6) Where P z Represents the data distribution of samples generated by the generator, z is P z The randomly sampled noise vector in , y is the conditional variable, G(z|y) is the fake sample generated by the generator G under the given condition y, D(G(z|y)) is the evaluation of the fake sample by the discriminator D, and E is the expected value. This formula hopes that the maximum generated sample will be judged as the expected value of the real sample by the discriminator; The discriminator loss function is: (7) (8) Where P r Represents the data distribution of the real sample, x is P r The samples in, λ is the weight of the gradient penalty term, GP is the gradient penalty term, is a random interpolation between the real sample x and the generated sample z, represents the sampling distribution of the gradient penalty term, represents the gradient norm under the discriminator, the purpose is to ensure that the gradient norm of the discriminator function is close to 1 and satisfies the Lipschitz constraint; the goal of the discriminator D is to maximize the evaluation of the real sample; S4: Use WaveGlow to reconstruct the mel-spectrogram generated in step S3 into a high-quality audio signal.

2. The method for enhancing marine mammal call data based on improved Inception block and SACGAN according to claim 1, characterized in that: The specific steps of S1 are as follows: in order to improve the data quality, the marine mammal calls are pre-processed for denoising, the downloaded marine mammal calls are cut into segments with a duration of 1 s, the sampling rate is resampled to 48 KHz, and wavelet denoising is performed to improve the accuracy and efficiency of subsequent analysis; Regarding wavelet denoising, after wavelet decomposition and reconstruction operations, the wavelet decomposition formula is expressed as: (9) (10) In the formula, C A is the approximate coefficient, C D is the detail coefficient, n is the sampling position index, k is the position index of the wavelet function in scale and translation, x[k] is the sample value of the original signal, which is used as input in the summation, h[n] is the low-pass filter, g[n] is the high-pass filter, and n-2k is the offset, which reflects the position relationship of the filter when it slides on the signal, indicating that the filter moves relative to the original signal at twice the sampling rate. The signal is processed by low-pass and high-pass filters to separate the different frequency components of the signal and analyze them at different scales. It is suitable for denoising non-stationary signals such as the calls of marine mammals.

3. The method for enhancing marine mammal call data based on improved Inception block and SACGAN according to claim 1, characterized in that: The S2 is specifically as follows: the Mel frequency scale can perform frequency transformation according to the auditory perception of the human ear and retain important characteristics of the signal; MFCC is used for feature extraction to obtain the Mel spectrogram of the audio signal as feature representation; The continuous audio signal is divided into multiple short time frames, and the Hamming window is used as the frame window function. STFT is applied to each time frame to convert the time domain signal into the frequency domain signal. The mathematical expression of short-time Fourier transform is: (11) Where t is time, ω is frequency, x(t) is the continuous time signal to be analyzed, ω(t) is the window function used to limit the time range of the analysis, T is the time offset parameter, which indicates the time position of the window function relative to the signal, and e -jωt It is a complex exponential function, which is the basic kernel function in Fourier transform. It is used to convert the intercepted signal part into the frequency domain. By changing the T value and moving the time window, the frequency distribution of the signal at different time positions can be obtained. The frequency domain information is weighted using the Mel filter, and the spectrum processed by the Mel filter bank is logarithmically transformed to obtain a logarithmic Mel spectrogram: (12) Where L(m,t) is the logarithmic Mel-spectrogram and E(m,t) is the energy at time t and Mel-frequency m.

4. The method for enhancing marine mammal call data based on improved Inception block and SACGAN according to claim 1, characterized in that: Train the call generation network and select Adam optimizer as the optimizer for the generator and discriminator networks. Since the generator is more difficult to train, set the generator to be trained five times for every discriminator training. The learning rate of the generator is 1e-5, the learning rate of the discriminator is 4e-5, and the epoch is 3000.

5. The method for enhancing marine mammal call data based on improved Inception block and SACGAN according to claim 1, characterized in that: The step S4 is specifically as follows: reconstructing the generated mel-spectrogram samples into high-quality audio using the WaveGlow model, which can accurately learn the probability distribution of audio data and obtain long-distance information, and has a better tolerance for the prediction error of the mel-spectrogram, and therefore has better generation quality and generalization ability; In large-scale audio processing tasks, WaveGlow allows GPU parallel computing, which can significantly increase the speed of audio synthesis; The training goal of WaveGlow is to maximize the likelihood of the training data, that is, to minimize the negative log-likelihood loss: (13) In the formula, represents the estimated optimal parameter value, is the likelihood function, which measures the probability of Set up observation The probability of Represents data points At the given parameters The probability of The natural logarithm of This expression expects to find a set of parameters , so that all data points x1, x1,..., x N About Model Parameters The sum of negative log-likelihoods is minimized.

6. The method for enhancing marine mammal call data based on improved Inception block and SACGAN according to claim 1, characterized in that: The method further includes step S5: placing the generated call obtained in step S4 into the original call data set to obtain a mixed data set; and performing a classification comparison experiment with the original call data set to verify that the method can improve the classification accuracy; Calculate the model's precision, recall, and F1 score to evaluate the model's classification ability: (14) (15) (16) Where, precision is the ratio of correctly predicted positive samples to all samples predicted as positive by the model; TruePositives is the correctly predicted positive sample, False Positives is the incorrectly predicted positive sample, so TruePositives+False Positives is all samples predicted as positive by the model; Recall is the ratio of correctly predicted positive samples to all actually positive samples; among them, TruePositives are correctly predicted positive samples, and FalseNegatives are incorrectly predicted negative samples; therefore, TruePositives+FalseNegatives are all actually positive samples; The F1 score is the harmonic mean of precision and recall, which takes both precision and recall into consideration.

Citation Information

Patent Citations

  • Bird sound recognition method based on multi-feature fusion and combination model

    CN113724712A

  • Robust speaker recognition method based on spectrogram denoising and adversarial learning

    CN116469394A