Reconstruction spectrum denoising method based on Mama
Through the Mamba-based reconstruction spectral denoising method, the U-shaped structure and Mamba module extract spectral features, combined with jump connections for layer-by-layer processing, the problems of spectral reconstruction accuracy and effectiveness in complex scenarios are solved, and the environment is realized Effective removal of noise and efficient reconstruction of spectral data.
Patent Information
- Application Number
- CN202411718880.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2024-12-27
AI Technical Summary
When prior art interferes with environmental noise in complex scenarios, the accuracy and effectiveness of reconstructing spectrum remains a huge challenge.
Using the Mamba-based reconstruction spectral denoising method, the original spectral data is acquired for preprocessing, and the training model of the spectral denoising encoder-decoder is constructed. Multi-scale features are extracted using the U-shaped structure and the Mamba module, and combined with jump connections to perform the following Layer compression and upsampling, noise removal, and reconstruct the spectral data after denoising.
Effectively remove environmental noise, improve the effectiveness and availability of spectral data, and improve the noise resistance, accuracy and robustness of spectral reconstruction.
Smart Images

Figure CN119205967A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of reconstructed spectrum denoising, and in particular to a reconstructed spectrum denoising method based on Mamba. Background Art
[0002] In recent years, the rapid development of deep learning has brought new ideas to spectral reconstruction technology. Methods based on convolutional neural networks, recursive neural networks, etc. have broken through the limitations of prior assumptions and can better capture complex spectral features and correlations between data. These methods have shown obvious advantages in processing high-dimensional, nonlinear spectral data, effectively improving the accuracy and resolution of reconstruction, and have greatly improved noise resistance. However, in complex scenes, facing the interference of environmental noise, the accuracy and effectiveness of reconstructing the spectrum is still a huge challenge. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a reconstructed spectrum denoising method based on Mamba to solve or at least partially solve the above problems existing in the prior art.
[0004] To achieve the above-mentioned object of the invention, the present invention provides a reconstructed spectrum denoising method based on Mamba, the method comprising the following steps: S101, obtaining original spectral data; S102, preprocessing the original spectral data to obtain valid spectral data, and constructing a spectral denoising encoder-decoder training model based on the valid spectral data; S103, connecting the encoder and the decoder using a U-shaped structure, combining the shallow low-level features of the spectral data with the deep high-level features, and capturing the multi-scale features of the spectral data; S104, using the encoder formed by the Mamba module to extract long-distance dependent features from the spectral data, learn the mapping relationship between the noisy data and the original data, compress the spectral data layer by layer through encoder downsampling, and obtain spectral feature vectors of three different dimensions; S105, using a skip connection method between different levels of the encoder and the decoder to retain the characteristics of the middle layer of the spectral data; S106, inputting the spectral feature vectors of different dimensions into the decoder, the decoder receives the spectral feature vectors compressed layer by layer by the encoder, the decoder upsamples the spectral feature vectors compressed layer by layer, restores the spectral feature vectors of different dimensions to the original space, and finally reconstructs the denoised spectral data.
[0005] Further, the preprocessing includes: Data cleaning: including missing value processing and outlier processing operations. The original spectral data is cleaned by using missing value processing and outlier processing operations. The three processing methods of deletion, supplementation or replacement can be selected as needed. Data normalization: The raw spectral data were normalized using the 0-1 normalization method and the zero-mean normalization method to simplify subsequent data processing; Data enhancement: The original spectral data is enhanced by adding random noise.
[0006] Furthermore, training data is input into the training model of the encoder-decoder, and the encoder-decoder is trained using a mean square error loss function, wherein the training data includes the acquired original spectral data and the noise spectral data after data enhancement.
[0007] Furthermore, the expression of the mean square error loss function is: in, MSE is the mean square error, For the i The original value of the spectral data, For the i After denoising, the spectral data n is the number of spectral data in the training data.
[0008] Furthermore, the encoder composed of the Mamba module performs gradient downsampling three times, and each gradient downsampling is composed of a one-dimensional convolution and a Mamba module; The spectral data is input into a one-dimensional convolution to obtain an isotropic feature vector, and the obtained isotropic feature vector is input into a Mamba module to extract features and long-distance dependency features in the spectral data; The Mamba module is used to capture the long-distance dependencies in the spectral data, and then the spectral data is downsampled and compressed layer by layer through an encoder formed by the Mamba module.
[0009] Furthermore, the jump connection directly propagates the bottom layer features to the upper layer by means of short-circuit connection, allowing the network to utilize the gradient information of the bottom layer features during the back propagation process, retaining the features of the middle layer of the spectral data and the effective information of the original spectral data, which is defined as follows: in, F is the output after skip connection, For splicing operation, and are the feature vectors of the encoder and decoder respectively.
[0010] Furthermore, the encoder uses the spectral feature vector obtained by downsampling layer by layer as the input of the decoder. The decoder restores the feature vectors of different dimensions to the original input space through upsampling and one-dimensional deconvolution, and reconstructs the denoised spectral data according to the features of the spectral data contained in the feature vectors of different dimensions. The calculation method of the decoder for one upsampling is defined as follows: in, is the input feature of the i+1th layer decoder, is the input feature of the i-th layer decoder, is an upsampling operation.
[0011] Compared with the prior art, the present invention has the following beneficial effects: The present invention can effectively remove the environmental noise contained in the original spectral data, so that the reconstructed spectrum only has data containing valid information, thereby improving the validity and availability of the spectral data. Mamba can be used to fully mine the key features and effective information in the spectral data, and improve the noise resistance, accuracy and robustness of the spectral reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 It is a flowchart of a Mamba-based reconstructed spectrum denoising method provided in an embodiment of the present invention; Figure 2 It is a schematic diagram of the working process of the spectral denoising encoder based on the Mamba module provided in an embodiment of the present invention; Figure 3 It is a schematic diagram of the flow of data preprocessing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The enumerated embodiments are only used to explain the present invention and are not used to limit the scope of the present invention.
[0015] This embodiment provides a reconstructed spectrum denoising method based on Mamba, the method comprising the following steps: like Figure 1-Figure 3 As shown, the present invention provides a reconstructed spectrum denoising method based on Mamba, comprising: S101, obtaining original spectral data.
[0016] Obtain raw spectral data through spectrometer acquisition or using public datasets.
[0017] S102, preprocessing the original spectral data to obtain valid spectral data, and constructing a spectral denoising encoder-decoder training model based on the valid spectral data, specifically: The pre-processing comprises: Data cleaning: including missing value processing and outlier processing operations, using missing value processing and outlier processing operations to clean the original data, and choose to delete, supplement or replace as needed; Data normalization: Normalize the cleaned raw spectral data using the 0-1 normalization method and the zero-mean normalization method, convert spectral data of different dimensions to the same dimension, eliminate the impact of dimensions between different features, and make them comparable at the same level; Data enhancement: The original spectral data is enhanced by adding random noise to meet the needs of deep learning training. The definition is as follows: (1) in, x represents the original spectrum, represents random noise, y is the spectral data after adding noise; Data segmentation: The obtained spectral data are integrated into a file and segmented into a training set, a validation set, and a test set in a ratio of 8:1:1 for training the encoder-decoder training model and as input for the deep learning model to train the network; The training data is input into the encoder-decoder training model, and the training data is a training set, a validation set, and a test set, and the encoder-decoder is trained using a mean square error loss function, which is defined as: in, MSE is the mean square error, For the i The original value of the spectral data, For the i After denoising, the spectral data n is the number of spectral data in the training data.
[0018] The quality of spectral data is improved and enhanced through the above method. The acquired raw spectral data is preprocessed, including data cleaning, data normalization, data enhancement and data segmentation, to obtain two-dimensional automotive parts images and large amounts of standardized and effective spectral data as input to the deep learning model.
[0019] S103, using a U-shaped structure to connect the encoder and the decoder, combining the shallow low-level features of the spectral data with the deep high-level features, and capturing the multi-scale features of the spectral data.
[0020] Affected by factors such as the network structure, some effective information is often lost when actually extracting spectral data features. Therefore, a U-shaped structure is used to connect the encoder and decoder to enhance the network's ability to retain effective information to the greatest extent.
[0021] S104, using the encoder formed by the Mamba module to extract long-distance dependent features from the spectral data, learn the mapping relationship between the noisy data and the original data, and compress the spectral data layer by layer through encoder downsampling to obtain spectral feature vectors of three different dimensions, specifically: The encoder formed by the Mamba module can adapt to data of different types and noise levels by utilizing the adaptive characteristics of the Mamba module. Even if the input data is noisy or changes, the Mamba module can still learn the mapping relationship between the data and capture the characteristics of the data. By capturing the long-distance dependency relationship in the spectral data and compressing the spectral data layer by layer, the spectral feature vectors of different dimensions of the spectral data are obtained. By inputting the spectral data into the encoder module, the features of the spectral data are extracted to obtain spectral feature vectors of different dimensions, wherein the calculation method of one downsampling is defined as follows: (2) in, For the i +1 layer input features, For the i +1 layer output features, is the input feature of the i-th layer. For the first downsampling, is the input spectral data y, is the i-th convolution kernel, represents the convolution operation, is the bias of the i-th layer, is the ReLU activation function, It is the Mamba spectral feature extraction module; The spectral features and validity information in this dimension are obtained by downsampling once, and the encoder performs the downsampling process three times to obtain spectral feature vectors of three different dimensions, which retain the key information in the original data.
[0022] S105, the encoder and decoder at different levels use a skip connection method to retain the characteristics of the middle layer of the spectral data, specifically: Using a skip connection method, the encoder and decoder in the U-shaped structure are connected at different levels. The skip connection directly propagates the bottom layer features to the upper layer by means of a short-circuit connection, and allows the network to use the gradient information of the bottom layer features during the back propagation process. The different levels of the encoder and decoder in the U-shaped structure are connected by skip connections. In order to retain the characteristic information of the spectrum in different levels to achieve spectral data denoising, skip connections are designed to allow the high-level network to directly obtain the information of the bottom layer, retaining the original input and middle-level features, and avoiding the distortion or loss of the information contained in the spectral data during the layer-by-layer downsampling process. Its definition is as follows: (3) in, F is the output after skip connection, For splicing operation, and are the feature vectors of the encoder and decoder respectively.
[0023] S106, inputting the spectral feature vectors of different dimensions into the decoder, the decoder receives the spectral feature vectors compressed layer by layer by the encoder, the decoder upsamples the spectral feature vectors compressed layer by layer, restores the spectral feature vectors of different dimensions to the original space, and finally reconstructs the spectral data after denoising, specifically: The spectral data features captured by the encoder are input into the decoder. The decoder restores the spectral feature vectors of different dimensions obtained by compression to the dimensions of the original input data, learns the mapping relationship between the noise data and the original data, and reconstructs the spectral data without noise, thereby achieving the purpose of denoising the spectral data. The calculation method of one upsampling in the decoder is defined as follows: (4) in, For the i +1 layer decoder input features, For the i The input features of the layer decoder, It is an upsampling operation, and its convolution operation is the same as that in formula (2).
[0024] 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, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A reconstructed spectrum denoising method based on Mamba, characterized in that: include: S101, obtaining original spectral data; S102, preprocessing the original spectral data to obtain valid spectral data, and constructing a spectral denoising encoder-decoder training model based on the valid spectral data; S103, connecting the encoder and the decoder using a U-shaped structure, combining the shallow low-level features of the spectral data with the deep high-level features, and capturing the multi-scale features of the spectral data; S104, using the encoder formed by the Mamba module to extract long-distance dependent features from the spectral data, learn the mapping relationship between the noisy data and the original data, compress the spectral data layer by layer through encoder downsampling, and obtain spectral feature vectors of three different dimensions; S105, using a skip connection method between different levels of the encoder and the decoder to retain the characteristics of the middle layer of the spectral data; S106, inputting the spectral feature vectors of different dimensions into the decoder, the decoder receives the spectral feature vectors compressed layer by layer by the encoder, the decoder upsamples the spectral feature vectors compressed layer by layer, restores the spectral feature vectors of different dimensions to the original space, and finally reconstructs the denoised spectral data.
2. The Mamba-based reconstructed spectrum denoising method according to claim 1, characterized in that: In step S102, the preprocessing includes: Data cleaning: including missing value processing and outlier processing operations. The original spectral data is cleaned by using missing value processing and outlier processing operations. The three processing methods of deletion, supplementation or replacement can be selected as needed. Data normalization: The raw spectral data were normalized using the 0-1 normalization method and the zero-mean normalization method to simplify subsequent data processing; Data enhancement: The original spectral data is enhanced by adding random noise.
3. The Mamba-based reconstructed spectrum denoising method according to claim 1, characterized in that: Training data is input into the training model of the encoder-decoder, and the encoder-decoder is trained using a mean square error loss function, wherein the training data includes the acquired original spectral data and the noise spectral data after data enhancement.
4. The Mamba-based reconstructed spectrum denoising method according to claim 3, characterized in that: The expression of the mean square error loss function is: in, MSE is the mean square error, For the i The original value of the spectral data, For the i After denoising, the spectral data n is the number of spectral data in the training data.
5. The Mamba-based reconstructed spectrum denoising method according to claim 1, characterized in that: The encoder composed of the Mamba module performs gradient downsampling three times, and each gradient downsampling consists of a one-dimensional convolution and a Mamba module; The spectral data is input into a one-dimensional convolution to obtain an isotropic feature vector, and the obtained isotropic feature vector is input into a Mamba module to extract features and long-distance dependency features in the spectral data; The Mamba module is used to capture the long-distance dependencies in the spectral data, and then the spectral data is downsampled and compressed layer by layer through an encoder formed by the Mamba module.
6. The Mamba-based reconstructed spectrum denoising method according to claim 1, characterized in that: The jump connection directly propagates the bottom layer features to the upper layer by short-circuiting, allowing the network to use the gradient information of the bottom layer features during the back propagation process, retaining the features of the middle layer of the spectral data and the effective information of the original spectral data, which is defined as follows: in, F is the output after skip connection, For splicing operation, and are the feature vectors of the encoder and decoder respectively.
7. The Mamba-based reconstructed spectrum denoising method according to claim 1, characterized in that: The encoder uses the spectrum feature vector obtained by downsampling layer by layer as the input of the decoder. The decoder restores the feature vectors of different dimensions to the original input space through upsampling and one-dimensional deconvolution, and reconstructs the denoised spectrum data according to the features of the spectrum data contained in the feature vectors of different dimensions. The calculation method of the decoder for one upsampling is defined as follows: in, is the input feature of the i+1th layer decoder, is the input feature of the i-th layer decoder, is an upsampling operation.
Citation Information
Patent Citations
Soil heavy metal element content predicting method based on terahertz spectrum and deep automatic encoder
CN107179291A
Image denoising method, system and device based on depth context prior and multi-scale reconstruction sub-network
CN114723631A
Hyperspectral remote sensing image denoising method based on SwinIR
CN116503292A
Raman spectrum denoising method based on unsupervised learning
CN117852612A
Image segmentation method based on medical hyperspectral image segmentation network
CN118967706A
Cited By
Voice-driven three-dimensional virtual image expression animation generation method
CN120163908A
