A bird language recognition method and system based on attention residual and feature fusion
By using attention residual and feature fusion methods in bird voiceprint recognition technology, combined with Mel triangle filtering and gamma pass filtering algorithms, and using convolutional neural networks with horizontal and vertical attention modules, the problems of a single feature extraction method are solved. It achieves more efficient bird sound recognition by eliminating the limitations and computational load of large networks.
Patent Information
- Application Number
- CN202210570511.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2024-09-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In bird voiceprint recognition technology based on deep learning, a single feature extraction method cannot fully express all the characteristics of bird sounds, resulting in limited recognition accuracy. In addition, large convolutional neural networks increase the amount of parameter calculations, resulting in difficulties in training and detection. Slow.
A method based on attention residuals and feature fusion is used, and the energy spectrum diagram is obtained by combining the Mel triangle filtering algorithm and the gamma pass filtering algorithm, and a horizontal and vertical attention module is introduced into the convolutional neural network to reduce computational costs and improve Recognition accuracy.
It improves the accuracy and speed of bird sound recognition, reduces the amount of network parameters, improves recognition performance, and reduces computing costs.
Smart Images

Figure CN114863938B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bird voiceprint recognition based on deep learning, and in particular to a method and system for bird language recognition based on attention residual and feature fusion. Background Art
[0002] Birds are an important indicator for assessing the health of an ecosystem. As an important part of an ecosystem, the presence and migration patterns of birds are often warning signs of the health of the environment in any particular area. In recent decades, the protection of bird biodiversity has become increasingly important, and the significance of bird voiceprint recognition technology has become increasingly important. Each bird has certain differences in its vocal structure and organs, which also makes the biological characteristics of these birds non-replicable. These biological characteristics can be used to identify biological species. Bird voiceprint technology uses voiceprint recognition technology to identify the species of bird species based on their unique biological characteristics. At present, bird voiceprint recognition technology can be divided into traditional methods and deep learning-based methods according to the type of model; traditional methods mainly use Gaussian mixture models and maximum likelihood estimation to learn the sound with the highest score; deep learning-based methods mainly use neural network model training and recognition detection. Compared with traditional methods and machine learning methods, deep learning-based methods have better performance in handling bird sound recognition tasks. With the rapid development of artificial intelligence and deep learning, bird voiceprint recognition technology has broad application prospects in the field of environmental protection.
[0003] Reference 1 (Lee CH, Han CC, Chuang CC. Automatic Classification of Bird Species From Their Sounds Using Two-Dimensional Cepstral Coefficients [J]. IEEE Transactions on Audio Speech & Language Processing, 2008, 16 (8): 1541-1550.) uses a single audio feature to extract dynamic and static features and then fuse them to improve feature information expression and recognition accuracy. Reference 2 (Efremova DB, Sankupellay M, Konovalov DA. Data-Efficient Classification of Birdcall Through Convolutional Neural Networks Transfer Learning [C]. In: Digital Image Computing: Techniques and Applications, 2019, 294-301.) uses ResNet50 deep convolutional neural network as a model to improve the speed of bird recognition. Reference 3 (Yang Chunyong, Qi Hongda, Peng Yanqiu, et al. Research on energy spectrogram integrating voiceprint information in bird recognition [J]. Applied Acoustics, 2020, 39(3): 453-463.) By combining LBP and HOG features with the classifier algorithm, the generative adversarial network spectrum information is additionally used for data enhancement to further improve the recognition rate.
[0004] In deep learning-based recognition tasks, most models use large convolutional neural networks. Although the recognition rate has been improved, it has inevitably increased the amount of parameter calculation, leading to problems such as difficulty in training and slow detection speed. In terms of feature extraction, a single feature extraction method is usually used, but in the recognition and detection process, a single feature parameter cannot fully express all the characteristics of bird sounds, and there are certain limitations. Summary of the invention
[0005] In order to solve the problems of limited audio feature information and large number of network parameters, the present invention proposes a bird language recognition method based on attention residual and feature fusion. The method uses two feature extraction methods and performs information fusion to obtain feature information, and converts the feature information into an energy spectrum graph; the energy spectrum graph is input into a bird language recognition and classification convolutional neural network, and the corresponding feature image is generated after sampling. After input into the network, a residual structure network with horizontal and vertical attention modules is used to effectively focus on the channel relationship between feature images, while reducing the computational cost and improving the recognition accuracy.
[0006] A bird language recognition method based on attention residual and feature fusion, characterized by comprising the following steps:
[0007] S1. Collect the sounds of various bird calls in the natural environment to form a sound training set; label the sounds that can identify the bird species, control the time range of each sound to be between 2s and 30s, and contain the calls of a single bird species;
[0008] S2, sampling the sound training set in step S1 using the same sampling frequency, and then unifying the audio duration of the sound training set through preprocessing operations of framing and windowing;
[0009] S3, obtaining feature information through two feature extraction methods, and finally converting the feature information into an energy spectrum diagram;
[0010] S31, sequentially use the Mel triangle filtering algorithm and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score F; sequentially use the gammatone filtering algorithm with noise suppression processing and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score G; fuse the two vector scores to obtain feature information f:
[0011] f=ωF+(1-ω)G
[0012] Where ω represents the mixing weight coefficient;
[0013] S32, converting the characteristic information f obtained in S31 into an energy spectrum diagram;
[0014] S33, performing image enhancement on the obtained energy spectrum graph; wherein the image enhancement operation includes random grayscale transformation of image color and image rotation;
[0015] S4. Construct a convolutional neural network for bird language recognition and classification. The network structure sequentially sets three convolution layers with a convolution kernel of 3*3 and a step size of 2, a maximum pooling layer, an activation function layer, and 48 residual structure layers with horizontal and vertical attention modules; wherein the residual structure layer with horizontal and vertical attention modules includes a convolution layer, an activation function layer, an average pooling layer, and a batch normalization layer; the network structure uses a global average pooling operation in the last layer, and uses an activation function layer after all convolution operations;
[0016] The energy spectrum graph is input into the bird language recognition and classification convolutional neural network, and the feature image Q is obtained by downsampling through three 3*3 convolutional layers with a step size of 2. The process is expressed as follows:
[0017] Q=F 3*3 (F 3*3 (F3*3 (f)))
[0018] The feature image Q is processed by a residual structure layer with a horizontal and vertical attention module, wherein the residual structure layer with a horizontal and vertical attention module includes the following parts: a convolution layer 1*1, a convolution layer 3*3, a convolution layer 1*1, a batch normalization layer, an activation function layer, a horizontal and vertical attention module, and a residual connection; the process can be expressed as:
[0019] F out =F HW (F 1*1 (F 3*3 (F 1*1 (x))))+x
[0020] F HW is a horizontal vertical attention module, which consists of two attention sub-modules along the vertical and horizontal directions respectively, which can be expressed as:
[0021] F HW =F H +F W
[0022] in:
[0023]
[0024] δ indicates the use of sigmoid function, Conv(x) indicates the use of 1*1 convolution kernel, and Avgpool indicates the use of average pooling operation;
[0025] The energy spectrum obtained by S3 is input into the constructed bird language recognition and classification convolutional neural network for training; the classification cross entropy loss function is used as the loss function, and the optimization strategy and hyperparameters are set to construct the bird language recognition and classification network. The loss function is continuously reduced by iteratively training the network until the set number of iterations is completed and the training weight parameters are saved;
[0026] S5. Use the bird language recognition and classification convolutional neural network constructed in step S4 and the obtained network training weight parameters to construct a bird language recognition system based on attention residual and feature fusion, and use the detection system to perform bird language recognition and classification on the energy spectrum graph to be detected. At the same time, use the bird language recognition system to quantitatively mark and classify all input bird sound spectrograms.
[0027] The present invention also proposes a bird language recognition system based on residual attention and feature fusion, which includes the following modules:
[0028] A bird sound acquisition module, configured to acquire a bird sound dataset to be processed;
[0029] A bird sound recognition model acquisition module is configured with the bird sound recognition model and parameter file obtained in the above-mentioned bird sound recognition method based on attention residual and feature fusion to form a bird sound recognizer for bird sound type recognition and classification;
[0030] Bird counting module is used to count the number of bird species.
[0031] Beneficial effects:
[0032] 1. The present invention proposes a bird language recognition method based on attention residual and feature fusion. Because the bird sound data set contains a large number of short-term original bird call signals and the species are diverse, the present invention first uses voiceprint preprocessing to process the audio signal, then converts the audio signal into an energy spectrum through audio feature extraction, and then uses the attention residual network to extract image features to speed up the recognition and classification network training speed and reduce the number of network parameters.
[0033] 2. The present invention uses different feature extraction methods to extract audio signal features, and after obtaining different features, uses cepstral mean and variance normalization and feature distortion processing to reduce channel mismatch and channel effect that may exist in the audio.
[0034] 3. The present invention proposes and designs a bird sound recognition system, which can use the bird language recognition method based on attention residual and feature fusion proposed by the present invention to recognize bird sounds. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is an overall diagram of the model structure of the bird language recognition method used in the embodiment of the present invention;
[0036] Figure 2 The attention structure diagram in the bird language recognition method used in the embodiment of the present invention; wherein sub-image a is the overall structure of the attention residual module; sub-image b is the vertical and horizontal attention sub-structure diagram in the attention module;
[0037] Figure 3 A schematic diagram of the process flow of a bird sound recognition system according to an embodiment of the present invention;
[0038] Figure 4 A diagram showing the composition of a bird sound recognition system according to an embodiment of the present invention;
[0039] Figure 5 It is a comparison diagram of feature extraction using the method of the present invention and not using the method of the present invention, wherein sub-figure a is an energy spectrum diagram using only the Mel triangle filter algorithm feature extraction method, sub-figure b is an energy spectrum diagram using only the gammatone filter algorithm feature extraction method with noise suppression processing, and sub-figure c is an energy spectrum diagram obtained by using the feature fusion method of the present invention.
[0040] Figure 6 3 is a comparison diagram of confusion matrices using the method of the present invention and not using the method of the present invention, wherein sub-figure a is a confusion matrix diagram of the feature extraction method using only the Mel triangle filter algorithm, sub-figure b is a confusion matrix diagram of the feature extraction method using only the gammatone filter algorithm with noise suppression processing, sub-figure c is a confusion matrix diagram using the feature fusion method, and sub-figure d is a confusion matrix diagram of the method of the present invention. DETAILED DESCRIPTION
[0041] In order to have a clearer understanding of the technical features, purposes and beneficial effects of the present invention, an embodiment of the present invention is further described in conjunction with the accompanying drawings. The embodiment is only used to further illustrate the present invention and cannot be understood as limiting the scope of protection of the present invention. Some non-essential improvements and adjustments made by technicians in this field based on the content of the present invention also fall within the scope of protection of the present invention.
[0042] A bird language recognition method based on attention residual and feature fusion, characterized by comprising the following steps:
[0043] S1. Collect the sounds of various bird calls in the natural environment to form a sound training set; label the sounds that can identify the bird species to which they belong, control the time range of each sound segment to be between 2s and 30s, and contain the calls of a single bird species; the number of bird sounds screened here is greater than or equal to 200 for each bird species.
[0044] S2, sampling the sound training set in step S1 using the same sampling frequency, and then unifying the audio duration of the sound training set through preprocessing operations of framing and windowing;
[0045] S3, obtaining feature information through two feature extraction methods, and finally converting the feature information into an energy spectrum diagram;
[0046] S4, constructing a bird language recognition and classification convolutional neural network; inputting the energy spectrum obtained in S3 into the constructed bird language recognition and classification convolutional neural network for training; using the classification cross entropy loss function as the loss function, setting the optimization strategy and hyperparameters for constructing the bird language recognition and classification network, and continuously reducing the loss function by performing cyclic iterative training on the network until the set number of iterations is completed and the training weight parameters are saved; when the number of training iterations is reached, the training is fit, and the loss function value no longer decreases significantly;
[0047] S5. Use the bird language recognition and classification convolutional neural network constructed in step S3 and the obtained network training weight parameters to construct a bird language recognition system based on attention residual and feature fusion, and use the detection system to perform bird language recognition and classification on the energy spectrum graph to be detected. At the same time, use the bird language recognition system to quantitatively mark and classify all input bird sound spectrograms.
[0048] As a specific implementation of the present invention, the steps specifically include the following steps:
[0049] S31, sequentially use the Mel triangle filtering algorithm and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score F; sequentially use the gammatone filtering algorithm with noise suppression processing and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score G; fuse the two vector scores to obtain feature information f:
[0050] f=ωF+(1-ω)G
[0051] Where ω represents the mixing weight coefficient.
[0052] S32. Convert the characteristic information f obtained in S31 into an energy spectrum diagram.
[0053] S33, performing image enhancement on the obtained energy spectrum diagram; wherein the image enhancement operation includes random grayscale transformation of image color and image rotation.
[0054] As a specific implementation of the present invention, the bird language recognition and classification convolutional neural network constructed in step S3 is specifically:
[0055] The network structure sequentially sets three convolution layers with a convolution kernel of 3*3 and a step size of 2, a maximum pooling layer, an activation function layer and 48 residual structure layers with horizontal and vertical attention modules; the residual structure layer with horizontal and vertical attention modules includes a convolution layer, an activation function layer, an average pooling layer, and a batch normalization layer; the network structure uses a global average pooling operation in the last layer, and uses an activation function layer after all convolution operations.
[0056] The energy spectrum graph is input into the bird language recognition and classification convolutional neural network, and the feature image Q is obtained by downsampling through three 3*3 convolutional layers with a step size of 2. The process is expressed as follows:
[0057] Q=F 3*3 (F 3*3 (F 3*3 (f)))
[0058] The feature image Q is processed by a residual structure layer with a horizontal and vertical attention module, wherein the residual structure layer with a horizontal and vertical attention module includes the following parts: a convolution layer 1*1, a convolution layer 3*3, a convolution layer 1*1, a batch normalization layer, an activation function layer, a horizontal and vertical attention module, and a residual connection; the process can be expressed as:
[0059] F out =F HW (F 1*1 (F 3*3(F 1*1 (x))))+x
[0060] F HW is a horizontal vertical attention module, which consists of two attention sub-modules along the vertical and horizontal directions respectively, which can be expressed as:
[0061] F HW =F H +F W
[0062] in:
[0063]
[0064] δ indicates the use of the sigmoid function, Conv(x) indicates the use of a 1*1 convolution kernel, and Avgpool indicates the use of an average pooling operation.
[0065] Simulation experiment
[0066] Depend on Figure 5 It can be seen that the frequency performance in sub-image c of the energy spectrum graph using this method is more obvious than the frequency performance in sub-images a and b, indicating that the feature fusion method in the present invention has a certain enhancement effect on the frequency, which helps to improve the recognition rate.
[0067] The recognition rates of the method of the present invention and the comparative recognition method are shown in Table 1, wherein the feature 1 method is an indicator obtained by using only the Mel triangle filtering algorithm and the residual network, the feature 2 method is an indicator obtained by using only the gammatone filtering algorithm after noise suppression and the residual network, and the feature fusion method is an indicator obtained by using only the feature fusion method and the residual network.
[0068] Table 1 Statistics of bird sound recognition and classification evaluation indicators in simulation experiments
[0069] method Average accuracy (%) Average recall rate (%) Average F1(%) Feature 1 Method 88.96 86.06 88.06 Feature 2 Method 90.17 89.14 89.14 Feature fusion method 93.43 90.91 92.12 Method of the present invention 93.62 90.59 92.17
[0070] From Table 1 and Figure 6 It can be seen that the accuracy and F1 value of the feature fusion and attention residual network method described in the present invention are improved to a certain extent, and the classification effect is better than the single feature extraction method and residual network. The above simulation experiment results show that the method of the present invention improves the expression of bird sound information by feature extraction without adding additional computing cost to the network, and greatly improves the recognition performance.
[0071] The above is a description of the method of the present invention, and those skilled in the art can implement the method of the present invention based on the description of the content. Based on the above content of the present invention, other embodiments obtained by those skilled in the art without creative work should all fall within the scope of protection of the present invention.
Claims
1. A bird language recognition method based on attention residual and feature fusion, characterized in that: The following steps are involved: S1. Collect the sounds of various bird calls in the natural environment to form a sound training set; label the sounds that can identify the bird species, control the time range of each sound to be between 2s and 30s, and contain the calls of a single bird species; S2, sampling the sound training set in step S1 using the same sampling frequency, and then unifying the audio duration of the sound training set through preprocessing operations of framing and windowing; S3, obtaining feature information through two feature extraction methods, and finally converting the feature information into an energy spectrum diagram; S4, constructing a bird language recognition and classification convolutional neural network; inputting the energy spectrum obtained in S3 into the constructed bird language recognition and classification convolutional neural network for training; using the classification cross entropy loss function as the loss function, setting the optimization strategy and hyperparameters for constructing the bird language recognition and classification network, and continuously reducing the loss function by performing cyclic iterative training on the network until the set number of iterations is completed and the training weight parameters are saved; S5. Use the bird language recognition and classification convolutional neural network constructed in step S4 and the obtained network training weight parameters to construct a bird language recognition system based on attention residual and feature fusion, and use the recognition system to recognize and classify bird sounds. At the same time, use the bird language recognition system to quantitatively mark and classify all input bird sounds; The specific operation of step S3 includes the following steps: S31, sequentially use the Mel triangle filtering algorithm and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score F; sequentially use the gammatone filtering algorithm with noise suppression processing and the cepstral mean variance normalization method to process the preprocessed sound training set to obtain a vector score G; fuse the two vector scores to obtain feature information f: f=ωF+(1-ω)G Where ω represents the mixing weight coefficient; S32, converting the characteristic information f obtained in S31 into an energy spectrum diagram; S33, performing image enhancement on the obtained energy spectrum graph; wherein the image enhancement operation includes random grayscale transformation of image color and image rotation; The bird language recognition and classification convolutional neural network constructed in step S4 is specifically: The network structure sequentially sets 3 convolution layers with 3*3 convolution kernels and a step size of 2, a maximum pooling layer, an activation function layer, and 16 residual structure layers with horizontal and vertical attention modules; the residual structure layer with horizontal and vertical attention modules includes a convolution layer, an activation function layer, an average pooling layer, and a batch normalization layer; the network structure uses a global average pooling operation in the last layer, and uses an activation function layer after all convolution operations; The energy spectrum graph is input into the bird language recognition and classification convolutional neural network, and the feature image Q is obtained by downsampling through three 3*3 convolutional layers with a step size of 2. The process is expressed as follows: Q=F 3*3 (F 3*3 (F 3*3 (f))) The feature image Q is processed by a residual structure layer with a horizontal and vertical attention module, wherein the residual structure layer with a horizontal and vertical attention module includes the following parts: a convolution layer 1*1, a convolution layer 3*3, a convolution layer 1*1, a batch normalization layer, an activation function layer, a horizontal and vertical attention module, and a residual connection; the process can be expressed as: F out =F HW (F 1*1 (F 3*3 (F 1*1 (x))))+x F HW is a horizontal vertical attention module, which consists of two attention sub-modules along the vertical and horizontal directions respectively, which can be expressed as: F HW =F H +F W in: δ indicates the use of the sigmoid function, Conv(x) indicates the use of a 1*1 convolution kernel, and Avgpool indicates the use of an average pooling operation.
2. The recognition system of bird language recognition method based on attention residual and feature fusion includes the following modules: A bird sound acquisition module, configured to acquire a bird sound dataset to be processed; The bird sound recognition model acquisition module is configured as a bird sound recognition classification neural network. The network structure sequentially sets three convolution layers with a convolution kernel of 3*3 and a step size of 2, a maximum pooling layer, an activation function layer, and 16 residual structure layers with horizontal and vertical attention modules; wherein the residual structure layer with horizontal and vertical attention modules includes a convolution layer, an activation function layer, an average pooling layer, and a batch normalization layer; the network structure uses a global average pooling operation in the last layer, and uses an activation function layer after all convolution operations; the energy spectrum map is input into the bird sound recognition classification convolutional neural network, and a feature image Q is obtained after a downsampling operation through three 3*3 convolution layers with a step size of 2. The process is expressed as follows: Q=F 3*3 (F 3*3 (F 3*3 (f))) The feature image Q is processed by a residual structure layer with a horizontal and vertical attention module, wherein the residual structure layer with a horizontal and vertical attention module includes the following parts: a convolution layer 1*1, a convolution layer 3*3, a convolution layer 1*1, a batch normalization layer, an activation function layer, a horizontal and vertical attention module, and a residual connection; the process can be expressed as: F out =F HW (F 1*1 (F 3*3 (F 1*1 (x))))+x F HW is a horizontal vertical attention module, which consists of two attention sub-modules along the vertical and horizontal directions respectively, which can be expressed as: F HW =F H +F W in: δ indicates the use of sigmoid function, Conv(x) indicates the use of 1*1 convolution kernel, and Avgpool indicates the use of average pooling operation; Bird counting module is used to count the number of bird species.
