Debris flow infrasound recognition method based on deep learning fusion model
Through the combination of improved Resnet18 and ViT network, a deep learning fusion model is constructed, which solves the accuracy and efficiency problems of debris flow infrasound signal analysis, achieves rapid and accurate identification and generalization ability of debris flow infrasound signals, and improves Availability of infrasound alarms in disaster prevention and mitigation.
Patent Information
- Application Number
- CN202410572636.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-10
AI Technical Summary
Existing debris flow infrasound signal analysis methods are difficult to accurately identify different types of debris flows, and traditional machine learning methods consume a lot of time and manpower when processing big data, and perform poorly when accuracy requirements are high, especially for debris flows. The detail recognition ability of frequency images is weak.
Using improved Resnet18 and ViT networks, combined with local feature extraction and global context understanding, through improved fully connected layers and data processing blocks, a fusion model based on deep learning is constructed to identify debris flow infrasound time-frequency maps and reduce parameters. quantity to improve model generalization ability and computational efficiency.
It achieves rapid and accurate identification of debris flow infrasound signals, improves identification accuracy and generalization capabilities, and improves the usability of infrasound alarms in disaster prevention and mitigation.
Smart Images

Figure CN118172647B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method for identifying debris flow infrasound based on a fusion model of deep learning. Background Art
[0002] The frequent activities of debris flows have had a great impact on people's production, life and life safety. Accurate and effective debris flow monitoring and early warning are crucial to disaster prevention and mitigation. As a deterministic signal when debris flows occur, the application of infrasound signal monitoring to debris flow monitoring and early warning has been widely recognized in recent years, and many scholars are actively researching and exploring. In 2019, Marchetti, E et al. used infrasound data collected by small aperture arrays to conduct seismic acoustic analysis of debris flow activities in Illgraben, Switzerland, proving that infrasound arrays can be used as an effective early warning system. In 2020, Shang Dongfang et al. designed a real-time debris flow early warning system based on infrasound monitoring based on the principle of characteristic differences between debris flow infrasound and environmental interference infrasound, with the help of hybrid programming, database and GIS secondary development and other technical means. In 2021, Zhong Zheng et al. developed a portable infrasound wave monitoring instrument and placed it in areas prone to debris flows, greatly shortening the early warning time. In 2022, Liu Peng et al. deployed infrasound monitoring stations in areas prone to debris flows to monitor the occurrence of debris flows. In the same year, Belli et al. conducted further experiments to show that infrasound signals can not only be used for event detection, but also for indirect estimation of the depth and flow of debris flows without real-time rapids measurement. Shang Yanfang et al. used new sensors to collect infrasound, rainfall, mud level and other data, and processed the data with the help of fuzzy control systems, which greatly improved the accuracy of debris flow prediction.
[0003] The analysis method for debris flow infrasound signals mainly uses time-frequency analysis. At present, the main time-frequency analysis methods use short-time Fourier transform (STFT), wavelet transform (CWT), Wigner-Ville distribution (WVD), Hilbert-Huang transform (HHT), etc. In 2018, Yuan Lu used short-time Fourier transform (STFT) and filters to process acoustic signals. Experiments showed that the nature and type of debris flow can be identified by analyzing the energy distribution of acoustic waves. In 2019, Zhang Faquan and others combined ST and time-frequency rearrangement to propose a time-frequency analysis and classification method for microseismic signals based on RST-NMF, which improved the accuracy of capturing microseismic signals. In 2020, Hu Zhihua and others proposed a generalized S transform. In view of the shortcomings of traditional Fourier transform, the wavelet packet transform method was used to extract the frequency characteristics of sound waves, thereby judging different types of debris flows. In 2021, Liu Wenke proposed a method model for secondary monitoring and early warning of debris flow based on the HHT algorithm, which determines whether a debris flow occurs by analyzing the spectral characteristics of the signal.
[0004] Traditional signal recognition methods only judge through various independent indicators, and it is difficult to accurately define indicators for different types of debris flows. Moreover, it is difficult to continuously accumulate experience in monitoring applications through data mining. At present, many machine learning methods are applied to the field of acoustic signal recognition, such as support vector machines, decision trees, neural networks, etc. In 2020, Hu Zhihua established a debris flow type recognition model based on LS-SVM (least squares support vector machine) by extracting the fractal box dimension and wavelet packet band energy characteristics of debris flow infrasound signals. In the same year, Shang Dongfang and others used the spectral estimation method to calculate the center frequency and spectral line width of the energy spectrum density matrix, and analyzed the energy upper and lower limits and trends of the input acquisition signal to identify debris flow infrasound signals. Combining machine learning methods with the identification technology of debris flow infrasound signals can fully mine historical and experimental data, but traditional machine learning data processing requires a lot of time, manpower and material resources. When the amount of data is large or the accuracy requirements are high, it is often difficult.
[0005] This is because debris flows usually present relatively continuous spectral characteristics, unlike some sounds that have obvious frequency peaks or spectral band structures, which is related to the complex dynamic process of debris flow generation. In addition, the amplitude of debris flow infrasound may vary over time and at different stages of debris flow events. Some debris flow events may have sudden amplitude increases, while they may have relatively stable amplitudes during the flow process. These characteristics make it difficult to fully grasp the details of debris flow time-frequency graphs. Neural networks such as Resnet usually capture the spatial hierarchical structure of time-frequency graphs through local perception of convolution kernels, and have weak perception of global contextual information, and cannot identify details in time-frequency graphs well. ViT divides the input time-frequency image into patches and is sensitive to input size, which makes the model relatively sensitive to the structure and resolution of the time-frequency graph.
[0006] Glossary:
[0007] Resnet18 network: ResNet-18 is a smaller network in the ResNet series, suitable for tasks such as image classification with limited computing resources. Its basic architecture is as follows:
[0008] 1. Input layer: used to accept input image data and perform preliminary feature extraction. It is mainly divided into the following layers:
[0009] (1.1) Input image: The size of the input image is usually 224x224 pixels, RGB color image.
[0010] (1.2) Preprocessing layer: Preprocess the input image, including image normalization, resizing, and other operations, so that it can be input into the network.
[0011] (1.3) Convolutional layer: Usually a 7×7 convolutional layer, used to extract low-level features of the image. The stride of this convolutional layer is usually 2, which can reduce the size of the feature map.
[0012] (1.4) Maximum pooling layer: It is placed right after the convolutional layer and is used to further reduce the spatial dimension of the feature map. Usually a maximum pooling operation of size 3×3 is used with a stride of 2.
[0013] 2. Residual Block: The core part of ResNet, which consists of multiple residual blocks. Each residual block contains two convolutional layers, where the first convolutional layer is used to extract features and the second convolutional layer is used to add residual connections to the features.
[0014] 3. Pooling layer: used to reduce the spatial dimension of the feature map, usually using average pooling or maximum pooling.
[0015] 4. Fully connected layer: maps the extracted features to the output category space.
[0016] ViT network: Vision Transformer in English is a Transformer-based deep learning model for image classification and other computer vision tasks. It combines the advantages of Transformer in natural language processing with the advantages of convolutional neural networks (CNN) in computer vision. The standard structure of ViT network usually consists of the following parts:
[0017] 1. Patch Embedding: Patch the input image into fixed-size patches and convert each patch into an embedding vector. The specific workflow is as follows:
[0018] (1.1) Image block division: First, the input image is evenly divided into image blocks of fixed size, each of which usually contains a fixed number of pixels.
[0019] (1.2) Embedding vector conversion: Each image block is converted into an embedding vector. This conversion process usually involves flattening the pixels in the image block into a vector and passing it through a linear projection layer to obtain a fixed-dimensional embedding vector.
[0020] (1.3) Position encoding: In order to preserve the position information of the image blocks in the original image, position encoding is usually added to each embedding vector to help the model learn the relative position relationship between image blocks.
[0021] 2. Transformer encoder: It consists of multiple Transformer blocks, each of which contains a multi-head self-attention mechanism and a feed-forward neural network to learn the global feature representation of the image.
[0022] 3. Classification Head: Pass the output of the Transformer encoder into a fully connected layer and finally output the classification result of the image. Summary of the invention
[0023] The purpose of the present invention is to provide a method for identifying debris flow infrasound based on a deep learning fusion model, which can solve the above-mentioned problems, quickly identify debris flow infrasound waves and improve accuracy and reliability.
[0024] In order to achieve the above object, the technical solution adopted by the present invention is as follows: a method for identifying debris flow infrasound based on a fusion model of deep learning, comprising the following steps;
[0025] S1, construct the data set, including S11~S13;
[0026] S11, collects infrasound signals generated by debris flows and other events on site;
[0027] S12, preprocessing each infrasound signal and then converting it into an infrasound time-frequency diagram;
[0028] S13, marking each row of the infrasound time-frequency graph with a category, wherein the category is debris flow and non-debris flow, and all the infrasound time-frequency graphs with the category mark form a data set;
[0029] S2, construct a debris flow infrasound recognition network, including improving the Resnet18 network M Rn and improve ViT network M ViT , construction methods include S21~S22;
[0030] S21, construct and improve Resnet18 network M Rn ;
[0031] Select a Resnet18 network, whose last layer is the fully connected layer FC1, and use the improved fully connected layer Replace FC1, and connect the output of FC1 to a shape adjustment layer to get M Rn , It is used for one-dimensional features with input size of 1×1×512 and output length of 196×768;
[0032] The shape adjustment layer is used to adjust the one-dimensional features into a first feature sequence with a batch size of 196×768;
[0033] S22, construct improved ViT network M ViT ;
[0034] Select a ViT network, including an image block segmenter, a Transformer encoder, and an MLP head, and replace the image block segmenter with a data processing block to obtain an MLP. ViT ;
[0035] The data processing block includes an identity mapping layer, a category embedding layer, and a position encoding layer arranged in sequence;
[0036] The identity mapping layer input is terminated The output of is used to pass the first feature sequence directly to the category embedding layer;
[0037] The category embedding layer is used to add a category vector with a size of 1×768 before the first feature sequence, so that the category vector and the first feature sequence form a second feature sequence of 197×768, and the category vector can learn categories during training;
[0038] The position encoding layer is used to perform position encoding on each element in the second feature sequence to obtain a third feature sequence;
[0039] The Transformer encoder is used to extract features from the third feature sequence and send it to the MLP head for classification prediction;
[0040] S3, using the data set to train the debris flow infrasound recognition network until convergence, and obtain the debris flow infrasound recognition fusion model;
[0041] S4, obtaining the infrasound signal to be identified, converting it into an infrasound time-frequency diagram according to S12, and sending it into the debris flow infrasound identification fusion model to obtain the prediction output.
[0042] Preferably, in S11, the infrasound signal is collected by an infrasound collector with a sampling frequency of 100 Hz, and the other events include water flow, insect chirping, bird singing, airplanes, explosions, running water, lightning, cars and / or wind.
[0043] Preferably, in S12, the preprocessing is to firstly perform low-pass filtering on the infrasound data to retain only data of 20 Hz and below; then perform denoising using wavelet soft threshold; and the conversion into the infrasound time-frequency diagram is specifically performed using continuous wavelet transform method.
[0044] As a preferred embodiment: in S22, M Rn It includes an input layer, a first residual block, a second residual block, a third residual block, a fourth residual block, a pooling layer, and an improved fully connected layer. and Shape Adjustment Layers;
[0045] The input layer is used to input the 224×224×3 infrasound time-frequency map, pass through a 7×7 convolution layer, and a 3×3 maximum pooling layer, and output the initial time-frequency features with a size of 112×112×64;
[0046] The first residual block has an input feature size of 112×112×64 and an output feature size of 56×56×64;
[0047] The second residual block has an input feature size of 56×56×64 and an output feature size of 28×28×128;
[0048] The third residual block has an input feature size of 28×28×128 and an output feature size of 14×14×256;
[0049] The fourth residual block has an input feature size of 14×14×256 and an output feature size of 7×7×512;
[0050] The input feature size of the pooling layer is 7×7×512, and the output feature size is 1×1×512;
[0051] The input size is 1×1×512 and the output length is 196×768.
[0052] The shape adjustment layer inputs a one-dimensional feature with a length of 196×768 and outputs the first feature sequence with a batch size of 196×768.
[0053] Preferably, in S22, the identity mapping layer uses the nn.Identity() function to pass the input data directly to the next layer.
[0054] Preferably, a Dropout layer is provided between the position encoding layer and the Transformer encoder to reduce data overfitting.
[0055] Preferably, the shape adjustment layer is implemented by the view function in PyTorch.
[0056] Compared with the prior art, the advantages of the present invention are:
[0057] Aiming at the characteristics of debris flow time-frequency graph, the present invention improves ResNet18 and ViT and combines the two together, taking advantage of the Resnet network's ability to extract local features and maintain spatial hierarchical structure, and better understand local patterns and textures in images, and the ViT network's ability to capture long-distance dependencies, thereby effectively understanding global context and complex relationships. Compared with ordinary neural network models, the present invention is more accurate in grasping the global time-frequency graph of debris flow infrasound and extracting contextual detail features, and can better identify the amplitude changes and spectral band structure of the time-frequency graph, thereby more accurately realizing the classification and recognition of the debris flow infrasound time-frequency graph.
[0058] (2) When improving the Resnet network, use the improved fully connected layer The original fully connected layer FC1 is replaced, the classification function of FC1 is cancelled, and a one-dimensional feature with a length of 196×768=150528 is directly output, and then the shape adjustment layer is used to adjust the first feature sequence to (batch_size,196,768), where 196 and 768 correspond to the number of patches of the improved ViT network and the embedding dimension of each patch, respectively, to ensure that the feature transfer between the two models can proceed smoothly; M Rn and M ViT By sharing the parameters of the feature extractor and the new fully connected layer, the number of model parameters can be reduced, the complexity of the model can be reduced, and the training efficiency and generalization ability of the model can be improved; the model can learn feature representations that are more suitable for the current task, thereby improving the generalization ability and classification performance of the model.
[0059] (3) The original ViT network input is an image block. After the present invention improves the Resnet network, there is no need to perform image segmentation operations. Therefore, the ViT network is also improved by replacing the original image block segmenter with an independently designed data processing block. This can not only reduce the computational overhead of image cutting and improve the computational efficiency of the model, but also avoid information loss caused by image segmentation processing, especially information loss at the block boundaries, thereby retaining more global image information, which helps to improve the performance of the model and makes the model more adaptable to different types of time-frequency graph data.
[0060] In summary, the present invention can quickly and accurately identify debris flows, improve the generalization ability of debris flow time-frequency images, and enhance the usability of infrasound alarms in disaster prevention and mitigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of the present invention;
[0062] Figure 2 To improve the Resnet18 network structure diagram;
[0063] Figure 3 To improve the ViT network structure diagram;
[0064] Figure 4 For a Schematic diagram of the structure. DETAILED DESCRIPTION
[0065] The present invention will be further described below in conjunction with the accompanying drawings.
[0066] Example 1: See Figures 1 to 4 ,A fusion model mudslide infrasound recognition method based on deep learning ,including the following steps;
[0067] S1, construct the data set, including S11~S13;
[0068] S11, collects infrasound signals generated by debris flows and other events on site;
[0069] S12, preprocessing each infrasound signal and then converting it into an infrasound time-frequency diagram;
[0070] S13, marking each row of the infrasound time-frequency graph with a category, wherein the category is debris flow and non-debris flow, and all the infrasound time-frequency graphs with the category mark form a data set;
[0071] S2, construct a debris flow infrasound recognition network, including improving the Resnet18 network M Rn and improve ViT network M ViT , construction methods include S21~S22;
[0072] S21, construct and improve Resnet18 network M Rn ;
[0073] Select a Resnet18 network, whose last layer is the fully connected layer FC1, and use the improved fully connected layer Replace FC1, and connect the output of FC1 to a shape adjustment layer to get M Rn , It is used for one-dimensional features with input size of 1×1×512 and output length of 196×768;
[0074] The shape adjustment layer is used to adjust the one-dimensional features into a first feature sequence with a batch size of 196×768;
[0075] S22, construct improved ViT network M ViT ;
[0076] Select a ViT network, including an image block segmenter, a Transformer encoder, and an MLP head, and replace the image block segmenter with a data processing block to obtain an MLP. ViT ;
[0077] The data processing block includes an identity mapping layer, a category embedding layer, and a position encoding layer arranged in sequence;
[0078] The identity mapping layer input is terminated The output of is used to pass the first feature sequence directly to the category embedding layer;
[0079] The category embedding layer is used to add a category vector with a size of 1×768 before the first feature sequence, so that the category vector and the first feature sequence form a second feature sequence of 197×768, and the category vector can learn categories during training;
[0080] The position encoding layer is used to perform position encoding on each element in the second feature sequence to obtain a third feature sequence;
[0081] The Transformer encoder is used to extract features from the third feature sequence and send it to the MLP head for classification prediction;
[0082] S3, using the data set to train the debris flow infrasound recognition network until convergence, and obtain the debris flow infrasound recognition fusion model;
[0083] S4, obtaining the infrasound signal to be identified, converting it into an infrasound time-frequency diagram according to S12, and sending it into the debris flow infrasound identification fusion model to obtain the prediction output.
[0084] In S11, the infrasound signal is collected by an infrasound collector with a sampling frequency of 100Hz, and the other events include water flow, insect chirping, bird calls, airplanes, blasting, flowing water, lightning, cars and / or wind. In S12, the preprocessing is to first low-pass filter the infrasound data to retain only data of 20Hz and below; then use wavelet soft threshold denoising; the conversion to infrasound time-frequency diagram is specifically performed using continuous wavelet transform. In S22, the identity mapping layer uses the nn.Identity() function to pass the input data directly to the next layer. A Dropout layer is also provided between the position encoding layer and the Transformer encoder to reduce data overfitting. The shape adjustment layer is implemented by the view function in PyTorch.
[0085] For improving Resnet18 network M Rn :
[0086] In the input layer: the input size is 224×224×3; after a convolution layer, the convolution kernel is 7×7 with a step size of 2, and then a 3×3 maximum pooling layer, the step size of the pooling layer is also 2. The purpose of the output layer is to perform preliminary feature extraction on the infrasound time-frequency map and reduce the spatial size of the feature map, thereby increasing the invariance and efficiency of the model. The initial time-frequency feature size of the output is 112×112×64.
[0087] The first residual block consists of two 3×3 convolutional layers. The residual connection helps alleviate the gradient vanishing problem. The input feature size is 112×112×64 and the output feature size is 56×56×64.
[0088] The second residual block contains two 3×3 convolutional layers, but increases the number of output channels and halves the spatial size of the feature map, with an input feature size of 56×56×64 and an output feature size of 28×28×128.
[0089] The third residual block contains two 3x3 convolutional layers, which further increases the number of output channels and further halves the spatial size of the feature map. The input feature size is 28×28×128 and the output feature size is 14×14×256.
[0090] The fourth residual block also contains two 3×3 convolutional layers, which again increases the number of output channels and reduces the spatial size of the feature map. The input feature size is 14×14×256 and the output feature size is 7×7×512.
[0091] The pooling layer is a global average pooling layer, which is used to reduce the spatial dimension of each feature map to 1×1, reduce the number of parameters, and reduce the risk of overfitting. Output size: The input feature size is 7×7×512, and the output feature size is 1×1×512;
[0092] Improved fully connected layer The input size is 1×1×512 and the output length is 196×768.
[0093] The shape adjustment layer inputs a one-dimensional feature with a length of 196×768 and outputs the first feature sequence with a batch size of 196×768.
[0094] For improving ViT network M ViT :
[0095] The identity mapping layer uses the nn.Identity() function, which means that the input features do not go through the original image slicing and embedding operations, but directly use the first feature sequence.
[0096] When performing category embedding in the category embedding layer, a learnable category vector is added at the beginning of the first feature sequence, usually represented by the [CLS] tag. After adding the [CLS] tag, the sequence length becomes 197, so the output second feature sequence size is 197×768.
[0097] When position encoding is performed in the position encoding layer, position information is added to the 197 elements in the sequence, the output size is kept at 197×768, and the position code is added to each corresponding element to obtain the third feature sequence.
[0098] It is then sent to the Transformer encoder to extract features from the third feature sequence, and finally sent to the MLP head, which is the key part at the end of the model and is mainly responsible for mapping the output of the Transformer encoder to the final classification task. The input received by the MLP head is usually the output of the last layer of the Transformer encoder. In the ViT model, especially for classification tasks, the first element of the encoder output, that is, the feature vector associated with the [CLS] tag, is usually used. The first fully connected layer is large and is followed by a GELU activation function. There is a Dropout layer to reduce overfitting. The last fully connected layer is the output layer, which is set to num_classes=2 here to adapt to the binary classification task of this study.
[0099] When training a model: Adjusting the model's hyperparameters is an important task. Hyperparameters include learning rate, batch size, number of iterations, etc. The selection of these hyperparameters has an important impact on the convergence speed and generalization ability of the fusion model; the optimal hyperparameter combination can be found through methods such as random search. In addition, strategies such as learning rate decay and early stopping can be used to optimize the training process of the fusion model; select an appropriate loss function.
[0100] Example 2: See Figures 1 to 3 We conducted a comparative experiment and used the following data set: debris flow and other infrasound wave signals collected indoors or outdoors by an infrasound collector at an observation and research station in Dongchuan District, Yunnan Province. After preprocessing, the infrasound time-frequency diagram was obtained, and then the category was marked, which included a total of 200 debris flow infrasound time-frequency diagrams and 190 non-debris flow infrasound time-frequency diagrams.
[0101] Based on this dataset, we conducted comparative experiments with multiple models and introduced the following parameters:
[0102] TP: true positive, which means the number of true positives, that is, the number of images predicted by the model as positive and whose actual labels are also positive. In this embodiment, it represents the number of images of debris flow in the test set that are accurately identified as debris flow.
[0103] FP: false positive, which means false positive examples, that is, the number of false positive examples predicted by the model but actually labeled as negative. In this embodiment, it represents the number of images in the test set that are not debris flow images but are identified as debris flow images.
[0104] FN: false negative, which means false negative examples, that is, the number of false negative examples predicted by the model as negative but actually labeled as positive. In this implementation, it represents the number of images in the test set that are not debris flow images but are correctly identified as non-debris flow images.
[0105] TN: true negative, which means true negative examples, that is, the number of true negative examples predicted by the model and actually labeled as negative. In this example, it means the number of debris flow images that are accurately identified as non-debris flow images.
[0106] Four evaluation indicators, namely precision, accuracy, recall and F1-scores, are introduced to represent the experimental results, and Table 1 is obtained:
[0107] ,
[0108] ,
[0109] ,
[0110] ,
[0111] Table 1: Evaluation index table of each model
[0112] It is particularly important to note that recall is a very important indicator in the results of the debris flow infrasound identification experiment. Recall reflects the ratio of debris flow images identified by the model to the number of actual debris flow images. Specifically, recall measures the ratio of the number of images correctly identified as debris flow by the model to the number of actual debris flow images. A high recall means that the model can minimize the risk of missed detection and ensure that the system can capture all possible debris flow events.
[0113] In the experiment of identifying debris flow infrasound signals based on the fusion of Resnet18 and ViT models in this study, the experimental effect of preprocessing plus res-vit fusion model was the best, with an accuracy of 90.60% and a recall of 90.32%. Compared with the experimental results of other models, they have been greatly improved.
[0114] It can be seen from the experimental results that the improvements in signal preprocessing and deep learning model fusion in this study are effective, and the recognition ability of debris flow infrasound signals has been improved to varying degrees.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying debris flow infrasound based on a fusion model of deep learning, characterized by: The steps include: S1, construct the data set, including S11~S13; S11, collects infrasound signals generated by debris flows and other events on site; S12, preprocessing each infrasound signal and then converting it into an infrasound time-frequency diagram; S13, marking each row of the infrasound time-frequency graph with a category, wherein the category is debris flow and non-debris flow, and all the infrasound time-frequency graphs with the category mark form a data set; S2, construct a debris flow infrasound recognition network, including improving the Resnet18 network M Rn and improve ViT network M ViT , construction methods include S21~S22; S21, construct and improve Resnet18 network M Rn ; Select a Resnet18 network, whose last layer is the fully connected layer FC1, and use the improved fully connected layer Replace FC1, and connect the output of FC1 to a shape adjustment layer to get M Rn , It is used for one-dimensional features with input size of 1×1×512 and output length of 196×768; The shape adjustment layer is implemented by the view function in PyTorch, which is used to adjust the one-dimensional features into The batch size is The first characteristic sequence of 196×768; S22, construct improved ViT network M ViT ; Select a ViT network, including an image block segmenter, a Transformer encoder, and an MLP head, and replace the image block segmenter with a data processing block to obtain an MLP. ViT ; The data processing block includes an identity mapping layer, a category embedding layer, and a position encoding layer arranged in sequence; The identity mapping layer input is terminated The output of is used to pass the first feature sequence directly to the category embedding layer; The category embedding layer is used to add a category vector with a size of 1×768 before the first feature sequence, so that the category vector and the first feature sequence form a second feature sequence of 197×768, and the category vector can learn categories during training; The position encoding layer is used to perform position encoding on each element in the second feature sequence to obtain a third feature sequence; The Transformer encoder is used to extract features from the third feature sequence and send it to the MLP head for classification prediction; S3, using the data set to train the debris flow infrasound recognition network until convergence, and obtain the debris flow infrasound recognition fusion model; S4, obtaining the infrasound signal to be identified, converting it into an infrasound time-frequency diagram according to S12, and sending it into the debris flow infrasound identification fusion model to obtain the prediction output.
2. The method for identifying debris flow infrasound based on a fusion model of deep learning according to claim 1, characterized in that: In S11, the infrasound signal is collected by an infrasound collector with a sampling frequency of 100 Hz, and the other events include water flow, insect chirping, bird singing, airplanes, blasting, flowing water, lightning, cars and / or wind.
3. The method for identifying debris flow infrasound based on a fusion model of deep learning according to claim 1, characterized in that: In S12, the preprocessing is to first low-pass filter the infrasound data to retain only data of 20 Hz and below; then use wavelet soft threshold to denoise; and the conversion into infrasound time-frequency diagram is specifically performed by using continuous wavelet transform method.
4. The method for identifying debris flow infrasound based on a fusion model of deep learning according to claim 1, characterized in that: In S22, M Rn It includes an input layer, a first residual block, a second residual block, a third residual block, a fourth residual block, a pooling layer, and an improved fully connected layer. and Shape Adjustment Layers; The input layer is used to input the 224×224×3 infrasound time-frequency map, pass through a 7×7 convolution layer, and a 3×3 maximum pooling layer, and output the initial time-frequency features with a size of 112×112×64; The first residual block has an input feature size of 112×112×64 and an output feature size of 56×56×64; The second residual block has an input feature size of 56×56×64 and an output feature size of 28×28×128; The third residual block has an input feature size of 28×28×128 and an output feature size of 14×14×256; The fourth residual block has an input feature size of 14×14×256 and an output feature size of 7×7×512; The input feature size of the pooling layer is 7×7×512, and the output feature size is 1×1×512; The input size is 1×1×512 and the output length is 196×768. The shape adjustment layer takes in a one-dimensional feature with a length of 196×768 and outputs The batch size is The first feature sequence of 196×768.
5. The method for identifying debris flow infrasound based on a fusion model of deep learning according to claim 1, characterized in that: In S22, the identity mapping layer uses the nn.Identity() function to pass the input data directly to the next layer.
6. The method for identifying debris flow infrasound based on a fusion model of deep learning according to claim 1, characterized in that: There is also a Dropout layer between the position encoding layer and the Transformer encoder to reduce data overfitting.
