A fish behavior recognition method based on Mel spectrogram and improved SEResNet

By using Mel spectrogram and improved SEResNet model in fish behavior recognition, combined with SE attention mechanism and temporal aggregation pooling layer, the problem of limited ability to extract sound features is solved, and higher recognition accuracy and detail are achieved. Granular information extraction is suitable for fish behavior recognition in complex breeding environments.

CN116994602BActive Publication Date: 2024-10-11DALIAN OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311019925.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-14
Publication Date
2024-10-11
Estimated Expiration
2043-08-14

AI Technical Summary

Technical Problem

Existing fish behavior recognition methods have limited ability to extract sound features and are difficult to process detailed sound features, resulting in low recognition accuracy.

Method used

Using the Mel spectrogram and improved SEResNet model, feature extraction of fish audio signals is carried out through the Mel spectrogram feature extraction method, combined with the SE attention mechanism and the temporal aggregation pooling layer TAP module, integrating the fully connected layer and Softmax The classifier improves the network's ability to extract advanced semantic features of fish sounds and processes detailed sound features.

Benefits of technology

It improves the accuracy of fish behavior recognition, enhances the network's ability to extract fish sound information, reduces the loss of key information, and is suitable for accurate recognition of fish behavior in complex breeding environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116994602B_ABST
    Figure CN116994602B_ABST
Patent Text Reader

Abstract

The present invention proposes a fish behavior recognition method based on Mel spectrogram and improved SEResNet, including collecting fish audio signals in aquaculture waters and preprocessing the fish audio signals; extracting sound features from the preprocessed fish audio signals by a Mel spectrogram feature extraction method to obtain Mel spectrogram feature information of the fish audio; constructing a TAP‑SEResNet model, including a SEResNet module, a SE attention mechanism module, a TAP module, a fully connected layer module and a Softmax classifier module; inputting the Mel spectrogram feature information into the TAP‑SEResNet model to obtain fish sound information features; inputting the fish sound information features into the TAP module to obtain a deep sound feature vector; inputting the deep sound feature vector into the fully connected layer module to obtain sound feature integration information; inputting the sound feature integration information into the Softmax classifier module for classification, and outputting fish behavior recognition results. The present invention can reduce the loss of key information, and can process sound detail features, so as to improve the accuracy of fish behavior recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of intelligent recognition, and specifically discloses a fish behavior recognition method based on Mel spectrogram and improved SEResNet.

[0002] Background

[0003] Precision farming is a new trend in fish farming, and fish behavior recognition provides technical support for precision farming. Currently, fish behavior monitoring mainly uses computer vision technology to quantify and identify various behaviors of fish. However, the sound information of fish behavior is difficult to collect, the frequency fluctuations are large, and the feature differences are small, making it difficult to capture the target feature information. Zhao Meng et al. integrated the SKNet attention mechanism with YOLOv5 to form a feature extraction network that focuses on pixel-level information, which effectively enhances the detection effect; Wei Sixue et al. proposed the channel non-dimensionality reduction dual attention mechanism ECBAM, which optimized the dimensionality reduction operation and further improved the recognition accuracy. However, in more complex aquaculture environments such as large-scale and intensive farming, computer vision methods still have limitations. Considering that sound waves have little attenuation in water, are not affected by water turbidity, and have a wider propagation range, some researchers have begun to introduce deep learning into the field of sound recognition. Kong et al. proposed a pre-trained audio neural network PANNs trained on a large-scale AudioSet dataset, and proved that the neural network can be transferred to other audio-related tasks, but the network's ability to extract sound features is limited; Desplanques et al. proposed using a 1D convolutional neural network to fuse Res2Net and SE modules to aggregate features at different levels of sound and enhance the interdependence of feature channels, but this method is difficult to process sound detail features. Acoustic features can also be used in the field of fish behavior recognition. Meng et al. proposed to convert fish feeding audio into sound feature information and use the convolutional neural network (CNN) model to classify the feeding intensity of fish. However, the convolutional neural network (CNN) has limited ability to extract fine-grained sound information of fish. Xu Jingwen et al. used the ResNet network that can perform fine-grained classification of fish sound features to achieve the fusion of low-dimensional detail features and high-dimensional semantic features, but the sample types are small, and there are a large number of redundant layers in the deep residual network, and the network extracts less key information. In view of the above problems, it is necessary to design a new fish behavior recognition method based on Mel spectrogram and improved SEResNet to overcome the problems existing in the existing fish behavior recognition methods. Summary of the invention

[0004] In order to solve the problems in existing fish behavior recognition methods such as limited ability to extract sound features and difficulty in processing sound detail features, resulting in low recognition accuracy, the present invention proposes a fish behavior recognition method based on Mel spectrogram and improved SEResNet.

[0005] The present invention provides a fish behavior recognition method based on Mel spectrogram and improved SEResNet, comprising the following steps:

[0006] S1. Collecting audio signals of fish in aquaculture waters and preprocessing the audio signals of fish;

[0007] S2. The sound feature extraction method is used to extract the sound feature of the fish audio signal preprocessed in step 1 to obtain the Mel spectrogram feature information of the fish audio;

[0008] S3. Construct a TAP-SEResNet model, wherein the TAP-SEResNet model includes a SEResNet module, a SE attention mechanism module, a TAP module, a fully connected layer module, and a Softmax classifier module;

[0009] S4. Input the Mel spectrogram feature information obtained in step S2 into the TAP-SEResNet model constructed in step S3, obtain the original sound features of the fish through the residual connection of the SEResNet module, perform key feature weighted calculation on the Mel spectrogram feature information through the embedded SE attention mechanism module to obtain the key information of the fish sound, add the obtained key information of the fish sound and the original sound features of the fish to obtain the fish sound information features;

[0010] S5. Input the fish sound information features obtained in step S4 into the TAP module, obtain a feature vector after the fish sound information features are processed by convolution, perform average pooling and maximum pooling on the feature vector at the same time, and splice the output results of average pooling and maximum pooling to obtain a deep sound feature vector;

[0011] S6. Inputting the deep sound feature vector obtained in step S5 into the fully connected layer module for information integration to obtain sound feature integration information;

[0012] S7. Input the sound feature integration information obtained in step S6 into the Softmax classifier module for classification, and output the fish behavior recognition result.

[0013] According to some embodiments of the present application, a fish behavior recognition method based on Mel spectrogram and improved SEResNet is provided. In step S1, fish audio signals in aquaculture waters are collected by hydrophones. The collection time of each fish behavior is 120 seconds. The collected fish audio signals are manually segmented and numbered according to each segment of 2 seconds. Another group of blank noise control groups is set up to synchronously collect environmental noise. The blank noise control group is used to distinguish between valid fish audio signals and noise audio signals. The noise audio signals in the numbered fish audio signals are removed to obtain preprocessed fish audio signals.

[0014] According to some embodiments of the present application, a fish behavior recognition method based on Mel spectrogram and improved SEResNet, in step S2, the Mel spectrogram feature extraction method includes performing Fourier transform on the fish audio signal through a Mel filter, nonlinearly mapping the energy to the frequency domain Mel scale, extracting important frequency features in the fish audio signal after Fourier transform, compressing the fish audio signal on the frequency axis, extracting fine-grained sound information of the fish, and obtaining the Mel spectrogram feature information of the fish audio.

[0015] According to a fish behavior recognition method based on Mel spectrogram and improved SEResNet in some embodiments of the present application, in step S3,

[0016] The SE attention mechanism module includes:

[0017] The pooling layer module is used to obtain the global information in the Mel spectrogram feature information;

[0018] The first fully connected layer module is used to compress the features in the Mel spectrogram feature information along the spatial dimension to reduce the feature dimension;

[0019] ReLU layer module, used for nonlinear operations;

[0020] The second connection layer module is used to restore the feature dimension and fit the correlation between channels to obtain convolution features.

[0021] The activation function module uses the Sigmoid function to multiply the convolutional features by spatial position to obtain the key information of fish sounds;

[0022] The TAP module includes:

[0023] A convolutional layer module, used for obtaining a feature vector by performing convolution processing on the fish sound information feature;

[0024] The average pooling module is used to average the feature vectors and provide the overall trend and background information of the features in the region;

[0025] The maximum pooling module is used to maximize the feature vector pooling, capture the most significant features in the input area, retain important local details and remove redundant information;

[0026] The splicing module is used to splice the output results of average pooling and maximum pooling.

[0027] According to some embodiments of the present application, a fish behavior recognition method based on Mel spectrogram and improved SEResNet, in step S4, the SE attention mechanism module performs global average pooling through the pooling layer module to obtain global information of Mel spectrogram feature information, and compresses the Mel spectrogram feature information along the spatial dimension through the first fully connected layer module to reduce the feature dimension, performs nonlinear operations through the ReLU layer module, restores the feature dimension through the fully connected layer and fits the complex correlation convolution features between channels, and finally uses the Sigmoid function to activate and multiply the convolution features by the spatial position to obtain the key information of the fish sound.

[0028] According to a fish behavior recognition method based on Mel spectrogram and improved SEResNet in some embodiments of the present application, in step S5, the feature vector of the fish sound information feature after convolution processing is set as h T , as shown in formula (1):

[0029] h T =(h1,h2,...,h t ) (1)

[0030] Among them, h i (i=1,2,...,t) is the eigenvector component, t is the total time dimension;

[0031] Along the total time dimension t, the feature vector is simultaneously average pooled μ and max pooled f(x). The average pooled μ is shown in formula (2):

[0032]

[0033] The maximum pooling f(x) is shown in formula (3):

[0034] f(x)=max(0,h i ) (3)

[0035] Among them, max means taking the maximum value of the eigenvector,

[0036] The output results of average pooling and maximum pooling are concatenated to obtain the deep sound feature vector E, as shown in formula (4):

[0037] E=[μ,f(x)] (4)

[0038] Among them, [,] represents the concatenation operation.

[0039] According to a fish behavior recognition method based on Mel spectrogram and improved SEResNet in some embodiments of the present application, in step S7, the output fish behavior recognition results include feeding behavior, swimming behavior and jumping behavior.

[0040] The present invention proposes a fish behavior recognition method based on Mel spectrogram and improved SEResNet, and proposes a fish behavior recognition model TAP-SEResNet based on Mel spectrogram and improved SEResNet. Fish sound information is feature extracted by a Mel spectrogram feature extraction method, and frequency features are nonlinearly mapped by the Mel spectrogram feature extraction method to improve the network's ability to extract high-level semantic features of fish sounds. The local key information and overall background information of fish sounds are retained by fusing a temporal aggregation pooling layer TAP module, so that SEResNet retains the best sound feature information, can also reduce the loss of key information, and can process sound detail features, thereby improving the recognition ability of the SEResNet model and improving the accuracy of fish behavior recognition. This provides technical support for research in the field of fish behavior recognition and is helpful to accurately recognize fish behaviors in the process of fish breeding. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a method for fish behavior recognition based on Mel spectrogram and improved SEResNet of the present invention;

[0042] Figure 2 Schematic diagram of the normalized confusion matrix for fish behavior recognition in Example 2 of the present invention. DETAILED DESCRIPTION

[0043] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0044] Example 1

[0045] A fish behavior recognition method based on Mel spectrogram and improved SEResNet, such as Figure 1 As shown, the following steps are included:

[0046] S1. Collecting audio signals of fish in aquaculture waters and preprocessing the audio signals of fish;

[0047] The audio signals of fish in the aquaculture waters are collected by hydrophones. The collection time of each behavior of fish is 120 seconds. The collected audio signals of fish are manually segmented and numbered according to each segment of 2 seconds. Another group of blank noise control groups is set up to synchronously collect environmental noise. The blank noise control group is used to distinguish between effective fish audio signals and noise audio signals. The noise audio signals in the numbered fish audio signals are removed to obtain preprocessed fish audio signals;

[0048] S2. The sound feature extraction method is used to extract the sound feature of the fish audio signal preprocessed in step 1 to obtain the Mel spectrogram feature information of the fish audio;

[0049] The Mel spectrogram feature extraction method includes performing Fourier transform on the fish audio signal through a Mel filter, nonlinearly mapping the energy to the frequency domain Mel scale, extracting important frequency features in the fish audio signal after the Fourier transform, compressing the fish audio signal on the frequency axis, extracting the fine-grained sound information of the fish, and obtaining the Mel spectrogram feature information of the fish audio;

[0050] S3. Build a TAP-SEResNet model, which includes a SEResNet module, a SE attention mechanism module, a TAP module, a fully connected layer module, and a Softmax classifier module.

[0051] The SE attention mechanism module includes:

[0052] The pooling layer module is used to obtain the global information in the Mel spectrogram feature information;

[0053] The first fully connected layer module is used to compress the features in the Mel spectrogram feature information along the spatial dimension to reduce the feature dimension;

[0054] ReLU layer module, used for nonlinear operations;

[0055] The second connection layer module is used to restore the feature dimension and fit the correlation between channels to obtain convolution features.

[0056] The activation function module uses the Sigmoid function to multiply the convolutional features by spatial position to obtain the key information of fish sounds;

[0057] The TAP module includes:

[0058] The convolution layer module is used to obtain a feature vector by convolution processing on the fish sound information features;

[0059] The average pooling module is used to average the feature vectors and provide the overall trend and background information of the features in the region;

[0060] The maximum pooling module is used to maximize the feature vector pooling, capture the most significant features in the input area, retain important local details and remove redundant information;

[0061] The splicing module is used to splice the output results of average pooling and maximum pooling;

[0062] S4. Input the Mel spectrogram feature information obtained in step S2 into the TAP-SEResNet model constructed in step S3, obtain the original sound features of the fish through the residual connection of the SEResNet module, perform key feature weighted calculation on the Mel spectrogram feature information through the embedded SE attention mechanism module to obtain the key information of the fish sound, add the obtained key information of the fish sound and the original sound features of the fish to obtain the fish sound information features;

[0063] The SE attention mechanism module performs global average pooling through the pooling layer module to obtain the global information of the Mel spectrogram feature information, and compresses the Mel spectrogram feature information along the spatial dimension through the first fully connected layer module to reduce the feature dimension. The nonlinear operation is performed through the ReLU layer module, and the feature dimension is restored through the fully connected layer and the complex correlation convolution features between channels are fitted. Finally, the Sigmoid function is used for activation and multiplication with the convolution feature by spatial position to obtain the key information of fish sounds.

[0064] S5. The fish sound information features obtained in step S4 are input into the TAP module, the fish sound information features are convolutionally processed to obtain a feature vector, the feature vector is simultaneously average pooled and maximum pooled, and the output results of the average pooling and the maximum pooling are spliced ​​to obtain a deep sound feature vector;

[0065] Suppose the feature vector of the fish sound information after convolution processing is h T , as shown in formula (1):

[0066] h T =(h1,h2,...,ht) (1)

[0067] Among them, h i (i=1,2,...,t) is the eigenvector component, t is the total time dimension;

[0068] Along the total time dimension t, the feature vector is simultaneously average pooled μ and max pooled f(x). The average pooled μ is shown in formula (2):

[0069]

[0070] The maximum pooling f(x) is shown in formula (3):

[0071] f(x)=max(0,h i ) (3)

[0072] Among them, max means taking the maximum value of the eigenvector,

[0073] The output results of average pooling and maximum pooling are concatenated to obtain the deep sound feature vector E, as shown in formula (4):

[0074] E=[μ,f(x)] (4)

[0075] Among them, [,] represents the concatenation operation;

[0076] S6. Input the deep sound feature vector obtained in step S5 into the fully connected layer module for information integration to obtain sound feature integration information;

[0077] S7. The sound feature integration information obtained in step S6 is input into the Softmax classifier module for classification, and the fish behavior recognition result is output;

[0078] The output fish behavior recognition results include feeding behavior, swimming behavior and jumping behavior.

[0079] Example 2

[0080] This experiment was conducted in the laboratory. The experimental system had three breeding ponds with a diameter of 60 cm, a height of 60 cm, and a water depth of 40 cm. Rainbow trout were selected as the test object. A total of 30 rainbow trout with a body length of 8 to 10 cm and an average size of 10 g were selected. The water temperature of the breeding water was maintained at 15 to 18 ° C, and the water density was 9.2 kg / m 3, pH value is 6.5~6.9, dissolved oxygen mass concentration is 12±2mg / L, rainbow trout are divided into three breeding ponds according to quantity to maintain the optimal breeding fish density and reduce experimental errors. In order to avoid the inaccurate behavior caused by the stress response of rainbow trout to the new environment, the three breeding ponds have undergone a one-month breeding adaptation period, and are fed twice a day at 10 am and 6 pm respectively. During the feeding period, the behavior of fish is observed through a camera, and the sound signals of fish feeding, swimming and jumping are collected. During the experiment, the room is kept quiet. After observing that rainbow trout no longer have a stress response to the new environment, the audio signals of fish are collected. In order to collect audio signals of different behaviors of fish, an underwater acoustic measurement system is used. The model of the hydrophone used in this embodiment is AQH20k-1062. In order to cover the frequency range of fish behavior sound, the sampling frequency of the audio signal is 20~20000Hz. To prevent the hydrophone from hitting the water tank wall and causing noise, a plumb bob was placed vertically 10 cm below the water surface of the culture pond, and the hydrophone was tied to the plumb bob and fixed in the center of the culture pond. The other end of the hydrophone was connected to a computer to store data, and the fish audio signal was stored in wav format. In order to observe the behavior of fish in real time without interfering with the normal life of fish, a camera was set up next to the culture tank 30 cm above the water surface and connected to a computer.

[0081] The behaviors of rainbow trout are divided into three types: "Feed", "Swim" and "Jump". "Feed" means feeding behavior, "Swim" means swimming behavior, and "Jump" means jumping behavior. The audio signals of fish are collected. In order to ensure that the audio signals of fish contain a complete cycle of behavioral information, the collection time of each behavior is 120s. Due to the short duration of fish behavior sounds, the collected sound signals are manually segmented and numbered according to each 2s segment; another group of blank noise control groups is set up to collect background noise synchronously in order to obtain environmental noise and distinguish effective fish behavior sound segments from noise parts. The experimental data of different time periods are collected and the above collection process is repeated. 300 samples of rainbow trout feeding sound signals, 420 samples of swimming sound signals, and 300 samples of jumping sound signals are collected, totaling 1020 samples. The training set, validation set and test set are divided according to the ratio of 7:2:1.

[0082] The experimental method of Example 1 was used to identify fish behavior. The experimental environment was Intel Core 17-9700CPU 3.00GHz 3.00 processor, RTX3090 graphics card, 32GB memory, Windows 10 operating system, python 3.8 operating environment, and open source deep learning framework pytorch version 1.13.1. The training parameters were set as batch_size 32 and epoch 100.

[0083] The method evaluation of this embodiment uses accuracy and F1 value as performance evaluation indicators, and the classification evaluation uses precision, recall rate and F1 value as classification performance evaluation indicators.

[0084] Accuracy (Ac) reflects the ratio of the number of samples identified as correct fish behaviors to the total number of samples, that is, the probability that the model correctly identifies various fish behaviors. The calculation method is shown in formula (5):

[0085]

[0086] Where: TP is the number of samples of correct fish behaviors identified in positive samples; FN is the number of samples of incorrect fish behaviors identified in positive samples; FP is the number of samples of correct fish behaviors identified in negative samples; TN is the number of samples of incorrect fish behaviors identified in negative samples.

[0087] Precision (Pr) reflects the proportion of correctly classified samples in all samples predicted to be of a specific fish behavior. The calculation method is shown in formula (6):

[0088]

[0089] The recall rate (Recall, Re) reflects the proportion of correctly classified fish behaviors to the total samples of all behaviors. The calculation method is shown in formula (7):

[0090]

[0091] The F1 value (F1-score, F1) is a comprehensive indicator of the classifier, which is the harmonic mean of precision and recall. The calculation method is shown in formula (8):

[0092]

[0093] In order to verify the effectiveness of the temporal aggregation pooling layer TAP module in improving SEResNet, an ablation test was designed. Under the same other operating conditions, a comparative test of fish behavior recognition was carried out with and without the TAP module, and the accuracy Ac and F1 value F1 of the two methods were calculated. The specific contents are shown in Table 1:

[0094] Table 1 Ablation test

[0095]

[0096] The results of the ablation test are shown in Table 1. After adding the TAP module, the accuracy rate increased by 3.23% and the F1 value increased by 4.33%, indicating that adding the TAP module can better identify fish behavior. By integrating the TAP module to improve the SEResNet model, combining the maximum value and the average value, retaining the local key information and overall background information of the fish sound signal, the fine-grained sound of the fish is completely extracted, the loss of effective information is reduced, and the model performance is improved, which can better meet the requirements of fish behavior recognition.

[0097] In order to verify the effectiveness of the Mel spectrogram feature extraction method for extracting fish sound features from fish audio signals, a comparative experiment was designed: under the same other operating conditions, it was compared with the Mel frequency cepstral coefficient feature extraction method (Spectrogram) and the spectrogram feature extraction method (MFCC). The results are shown in Table 2.

[0098] Table 2 Comparison of feature extraction methods

[0099]

[0100] According to Table 2, the Mel spectrogram feature extraction method has an accuracy increase of 8.36% and an F1 value increase of 8.8% compared with the Mel frequency cepstral coefficient feature extraction method; the Mel spectrogram feature extraction method has an accuracy increase of 0.97% and an F1 value increase of 0.47% compared with the spectrogram feature extraction method. From the analysis, it can be seen that the spectrogram feature extraction method is insufficient in processing non-steady-state sound information, and the Mel frequency cepstral coefficient feature extraction method will compress too many frequency scales, which will affect the accuracy of the method recognition. The Mel spectrogram feature extraction method can effectively compress the fish audio signal on the frequency axis and enhance the extraction and resolution capabilities of fish sound information features. Compared with the Mel frequency cepstral coefficient feature extraction method and the spectrogram feature extraction method, the Mel spectrogram feature extraction method is more suitable for extracting fish sound information, and the Mel spectrogram feature extraction method is significantly better than other methods in extracting the characteristics of fish sounds.

[0101] In order to verify the effectiveness of the method TAP-SEResNet of this embodiment in fish behavior recognition, this method is compared with other methods. The compared methods are: Qiuqiang et al. proposed a sound recognition network PANNs-CNN14 through transfer learning method; Desplanques et al. proposed a speech recognition network ECAPA-TDNN by combining Res2Net module and SE attention mechanism and aggregating multi-layer features; Xu Jingwen proposed a fish behavior recognition network MFCC+ResNet by combining MFCC and ResNet. The experimental results are shown in Table 3.

[0102] Table 3 Performance comparison between different methods and the method of this embodiment

[0103]

[0104] According to Table 3, compared with the sound recognition network PANNs-CNN14 proposed by Qiuqiang et al., the accuracy of TAP-SEResNet is improved by 5.32%, and the F1 value is improved by 5.93%; compared with the speech recognition network ECAPA-TDNN proposed by Desplanques et al., the accuracy of TAP-SEResNet is improved by 2.80%, and the F1 value is improved by 1.96%; compared with the fish behavior recognition network MFCC+ResNet proposed by Xu Jingwen, the accuracy of TAP-SEResNet is improved by 1.64%, and the F1 value is improved by 2.00%. After analysis, it can be found that PANNs-CNN14 learns sound features by using neural networks for audio tasks, but the convolutional neural network CNN has limited ability to extract sound information; ECAPA-TDNN aggregates features of different levels of sound by fusing Res2Net and SE modules on the basis of 1D convolutional network, but is sensitive to noise and environmental changes; MFCC+ResNet replaces the maximum pooling in the residual module with average pooling to learn fish sound features in multiple dimensions, but the deep residual network contains a large number of redundant layers, and effective sound information extraction is insufficient. The TAP-SEResNet of this embodiment retains more key features of fish behavior sound by fusing the TAP module, while not losing the sound background information, promoting SEResNet to effectively extract fine-grained fish sound information and achieve optimal recognition performance.

[0105] To verify the classification performance of the method of this embodiment for fish behavior recognition, the fish behavior recognition results and normalized confusion matrix are shown in Table 4 and Figure 2 As shown, “Feed” represents feeding behavior, “Swim” represents swimming behavior, and “Jump” represents jumping behavior.

[0106] Table 4 Fish behavior recognition results of the method in this embodiment

[0107]

[0108] From the data analysis in Table 4, it can be seen that the classification effect of feeding behavior is the best due to its rich sound information, and the evaluation indicators are all above 98%; the accuracy of fish behavior recognition of feeding behavior and jumping behavior is above 98%, the recall rate of fish behavior recognition of feeding behavior and swimming behavior is above 99%, and the F1 value of the three fish behavior recognitions is above 89%, and the overall accuracy of the model is 91.15%. Figure 2It can be seen that the diagonal from the upper left to the lower right of the normalized confusion matrix represents the recognition accuracy of each classification, and the area outside the diagonal represents the misclassified area. The classification accuracy of feeding behavior and jumping behavior both reached 98%, with good stability. The results show that the fish behavior recognition method based on Mel spectrogram and improved SEResNet can achieve more accurate recognition of fish behavior. The fish sound information is extracted by the Mel spectrogram feature extraction method. The local key information and overall background information of the fish sound are retained by fusing the TAP module, reducing the loss of key information, improving the recognition ability of the SEResNet model, and helping to accurately identify fish behavior during the breeding process.

[0109] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A fish behavior recognition method based on Mel spectrogram and improved SEResNet, characterized in that: The steps include: S1. Collecting audio signals of fish in aquaculture waters and preprocessing the audio signals of fish; S2. The sound feature extraction method is used to extract the sound feature of the fish audio signal preprocessed in step 1 to obtain the Mel spectrogram feature information of the fish audio; S3. Construct a TAP-SEResNet model, wherein the TAP-SEResNet model includes a SEResNet module, a SE attention mechanism module, a TAP module, a fully connected layer module, and a Softmax classifier module; Specifically: The SE attention mechanism module includes: The pooling layer module is used to obtain the global information in the Mel spectrogram feature information; The first fully connected layer module is used to compress the features in the Mel spectrogram feature information along the spatial dimension to reduce the feature dimension; ReLU layer module, used for nonlinear operations; The second connection layer module is used to restore the feature dimension and fit the correlation between channels to obtain convolution features. The activation function module uses the Sigmoid function to multiply the convolutional features by spatial position to obtain the key information of fish sounds; The TAP module includes: The convolution layer module is used to obtain a feature vector by convolution processing on the fish sound information features; The average pooling module is used to average the feature vectors and provide the overall trend and background information of the features in the region; The maximum pooling module is used to maximize the feature vector pooling, capture the most significant features in the input area, retain important local details and remove redundant information; The splicing module is used to splice the output results of average pooling and maximum pooling; S4. Input the Mel spectrogram feature information obtained in step S2 into the TAP-SEResNet model constructed in step S3, obtain the original sound features of the fish through the residual connection of the SEResNet module, perform key feature weighted calculation on the Mel spectrogram feature information through the embedded SE attention mechanism module to obtain the key information of the fish sound, add the obtained key information of the fish sound and the original sound features of the fish to obtain the fish sound information features; Specifically: the SE attention mechanism module performs global average pooling through the pooling layer module to obtain the global information of the Mel spectrogram feature information, compresses the Mel spectrogram feature information along the spatial dimension through the first fully connected layer module to reduce the feature dimension, performs nonlinear operation through the ReLU layer module, restores the feature dimension through the fully connected layer and fits the complex correlation convolution features between channels, and finally activates with the Sigmoid function and multiplies the convolution features by spatial position to obtain the key information of the fish sound; S5. Input the fish sound information features obtained in step S4 into the TAP module, obtain a feature vector after the fish sound information features are processed by convolution, perform average pooling and maximum pooling on the feature vector at the same time, and splice the output results of average pooling and maximum pooling to obtain a deep sound feature vector; Specifically: let the feature vector of the fish sound information feature after convolution processing be h T , as shown in formula (1): h T =(h1,h2,...,h t ) (1) Where h i (i=1,2,...,t) is the eigenvector component, t is the total time dimension; Along the total time dimension t, the feature vector is simultaneously average pooled μ and max pooled f(x). The average pooled μ is shown in formula (2): The maximum pooling f(x) is shown in formula (3): f(x)=max(0,h i ) (3) Among them, max means taking the maximum value of the eigenvector, The output results of average pooling and maximum pooling are concatenated to obtain the deep sound feature vector E, as shown in formula (4): E=[μ,f(x)] (4)where [,] represents the concatenation operation; S6. Inputting the deep sound feature vector obtained in step S5 into the fully connected layer module for information integration to obtain sound feature integration information; S7. Input the sound feature integration information obtained in step S6 into the Softmax classifier module for classification, and output the fish behavior recognition result.

2. The fish behavior recognition method based on Mel spectrogram and improved SEResNet according to claim 1, characterized in that: In the step S1, the fish audio signal in the aquaculture waters is collected by a hydrophone, and the collection time of each fish behavior is 120 seconds. The collected fish audio signal is manually segmented and numbered according to each segment of 2 seconds. Another group of blank noise control group is set up to synchronously collect environmental noise. The blank noise control group is used to distinguish the fish audio signal from the noise audio signal, and the noise audio signal is removed from the numbered fish audio signal to obtain the preprocessed fish audio signal.

3. The fish behavior recognition method based on Mel spectrogram and improved SEResNet according to claim 2, characterized in that: In step S2, the Mel spectrogram feature extraction method includes performing Fourier transform on the fish audio signal through a Mel filter, nonlinearly mapping the energy to the frequency domain Mel scale, extracting important frequency features in the fish audio signal after the Fourier transform, compressing the fish audio signal on the frequency axis, extracting fine-grained sound information of the fish, and obtaining the Mel spectrogram feature information of the fish audio.

4. The fish behavior recognition method based on Mel spectrogram and improved SEResNet according to claim 3, characterized in that: In step S7, the output fish behavior recognition results include feeding behavior, swimming behavior and jumping behavior.