Method and device suitable for compressed sensing rapid nuclear magnetic resonance spectrum reconstruction
Through the encoding-decoding neural network based on attention mechanism processing of undersampled NMR spectrum, the problem of difficulty in identifying weak peaks under non-uniform sampling technology is solved, efficient and accurate NMR spectrum reconstruction is achieved, and spectrum resolution is improved rate and accuracy.
Patent Information
- Application Number
- CN202411211854.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-30
AI Technical Summary
When using non-uniform sampling technology in the prior art, the identification and resolution ability of weak peaks in the NMR spectrum is insufficient, especially in complex signal environments, which is easily masked by artifacts, resulting in difficulty in signal resolution. Common spectrum reconstruction algorithms High computational complexity or limited recovery effect.
The encoding-decoding neural network based on attention mechanism is used to process the undersampled NMR spectrum. Through multiple feature extraction and artifact reduction, the spectral quality is improved and the high-precision weak peak signal recovery is achieved.
Effectively reduce artifacts, improve the resolution and accuracy of the NMR spectrum, shorten the sampling time, reduce the calculation complexity, and achieve high-quality NMR spectrum reconstruction.
Smart Images

Figure CN119104967A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of nuclear magnetic resonance technology, and more specifically to: 1. A method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction; 2. A device for compressed sensing fast nuclear magnetic resonance spectrum reconstruction. Background Art
[0002] Nuclear magnetic resonance (NMR) spectroscopy is a powerful tool for studying the molecular structure and chemical environment of substances. NMR spectra can not only reveal the atomic arrangement and bonding in the molecular structure, but also provide quantitative information about the concentration of each component in the sample. In particular, one-dimensional and two-dimensional NMR spectra occupy a core position in many laboratories. It shows the chemical environment in the sample by measuring the resonance frequencies of different nuclei. However, one-dimensional and two-dimensional NMR spectra have some limitations when facing complex samples, especially the detection of weak signals (weak peaks). These weak peaks are often masked by strong signals or difficult to distinguish. In addition, in an environment where the chemical shift is relatively close, the peaks tend to overlap, making it difficult to resolve. This limitation is particularly evident in application scenarios that require high resolution. For example, when detecting trace impurities in drug development, accurate resolution of weak peaks is crucial.
[0003] As an effective method to accelerate the acquisition of NMR spectra, non-uniform sampling (NUS) technology is widely used to shorten experimental time and improve experimental efficiency. However, although NUS technology can effectively reduce experimental time by reducing sampling points, it also introduces new problems, especially signal interference and decreased resolution of weak peaks. Since the NUS acquisition method involves undersampling of data, the uncollected data information will cause artifacts in the signal in the spectrum, especially the information loss is more serious during the reconstruction process. This artifact will interfere with the analysis of the real signal, causing the weak peaks to be masked by artifacts or strong signals, resulting in the inability to accurately identify and quantify. This problem is particularly prominent when the molecular structure is complex and the weak peaks are densely distributed. Therefore, in the acquisition of NMR spectra, how to ensure the clear resolution of weak peaks while accelerating the acquisition becomes an important challenge.
[0004] In order to solve the problem of weak peak identification caused by non-uniform sampling, many spectrum reconstruction algorithms have been proposed. These algorithms aim to recover the complete spectrum from under-sampled data, especially to recover weak peak signals. Common methods include maximum entropy reconstruction (ME), compressed sensing (CS) and spectral line shape enhanced reconstruction (SMILE). These methods can recover under-sampled NMR data to a certain extent, but they still have limitations. The ME method usually relies on strong prior knowledge and may have information loss problems when dealing with weak peaks; the CS method has certain advantages in reconstruction efficiency, but in the face of complex signal environments, the recovery effect of weak peaks may not be as expected; the SMILE method optimizes the spectral line shape and enhances the weak peak signal. Although it has made progress in improving the resolution of the spectrum, the computational complexity and processing time are high, and the effect is limited when the artifacts are large.
[0005] Therefore, it is necessary to develop a more efficient and accurate weak peak reconstruction method to solve the artifact problem caused by NUS and improve the resolution of weak peaks without increasing too much computational complexity. Summary of the invention
[0006] Based on this, it is necessary to provide a method and device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction to address the problems of poor reconstruction quality and difficulty in weak peak recovery in some existing spectrum reconstruction algorithms.
[0007] The present invention is implemented by the following technical solutions:
[0008] In a first aspect, the present invention discloses a method for fast nuclear magnetic resonance spectrum reconstruction suitable for compressed sensing, comprising the following steps:
[0009] Step 1, obtaining an undersampled nuclear magnetic resonance spectrum;
[0010] In step 2, the undersampled NMR spectrum is input into a trained attention-based encoder-decoder neural network for processing to obtain a high-quality reconstructed NMR spectrum.
[0011] Among them, the encoding-decoding neural network based on the attention mechanism includes: shallow extraction block, parallel sub-network, and spectral output layer.
[0012] The Shallow Extraction block is used to extract shallow features x_input from undersampled NMR spectra.
[0013] The parallel subnetwork includes: 14 encoder-decoder blocks with attention mechanism, which are used to perform multiple feature extraction optimization on x_input. Among them, 8 encoder-decoder blocks A1~A8 with attention mechanism connected in sequence constitute the first row of subnetworks, which are used to process high-resolution features; the other 6 encoder-decoder blocks A9~A10 connected in sequence with attention mechanism 14The second row of sub-networks is used to process low-resolution features; the first row of sub-networks and the second row of sub-networks are connected through upsampling and downsampling.
[0014] The spectrum output layer is used to perform convolution operations on the output results of the parallel sub-network structure to obtain high-quality reconstructed nuclear magnetic resonance spectra.
[0015] This method suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction implements the method or process according to the embodiment of the present disclosure.
[0016] In a second aspect, the present invention discloses a device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction, which uses the method suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in the first aspect.
[0017] The device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction includes: a spectrum acquisition module and a spectrum reconstruction module.
[0018] The spectrum acquisition module is used to obtain undersampled nuclear magnetic resonance spectra. The spectrum reconstruction module is used to input the undersampled nuclear magnetic resonance spectra into a trained encoder-decoder neural network based on the attention mechanism for processing to obtain a reconstructed nuclear magnetic resonance spectrum.
[0019] The device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction implements the method or process according to the embodiment of the present disclosure.
[0020] In a third aspect, the present invention discloses a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in the first aspect are implemented.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] 1. The present invention provides a method suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction, which uses a constructed encoding-decoding neural network based on an attention mechanism to process undersampled nuclear magnetic resonance spectra. Through multiple internal feature extractions, undersampled artifacts are gradually reduced, the spectrum quality is improved, and the sampling speed of the nuclear magnetic resonance spectrum can be accelerated.
[0023] 2. The attention-based encoding-decoding neural network of the present invention includes three parts: a shallow extraction block, a parallel subnetwork composed of multiple encoding-decoding blocks containing an attention mechanism, and a spectral output layer. It has a simple architecture and can process features of different scales at the same time. The parallel subnetwork structure can process data in parallel on the GPU, making full use of computing resources and reducing computing time.
[0024] 3. The attention-based encoding-decoding neural network of the present invention gradually enhances the key features of the signal, especially the weak peak signal, from the undersampled NMR spectrum through multiple feature extraction and fitting processes, and effectively reduces artifacts, ultimately achieving high-precision reconstruction output and obtaining high-quality reconstructed NMR spectrum. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0026] Figure 1 A flow chart of a method for fast nuclear magnetic resonance spectrum reconstruction applicable to compressed sensing provided in Example 1 of the present invention;
[0027] Figure 2 for Figure 1 The structural diagram of the encoder-decoder neural network based on the attention mechanism;
[0028] Figure 3 for Figure 2 Structural diagram of the middle and shallow extraction blocks;
[0029] Figure 4 for Figure 2 The structural diagram of any encoder-decoder block with attention mechanism;
[0030] Figure 5 for Figure 4 The structure diagram of the mid-channel attention block;
[0031] Figure 6 A one-dimensional simulation experiment diagram provided in Example 1 of the present invention;
[0032] Figure 7 This is a two-dimensional measured experimental diagram provided for Example 1 of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component at the same time. When a component is considered to be "fixed to" another component, it may be directly fixed on the other component or there may be a central component at the same time.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.
[0036] Example 1
[0037] See also Figure 1 , Figure 1 A brief process of the method for fast NMR spectrum reconstruction using compressed sensing is presented. Figure 1 As shown, the method suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction mainly includes the following steps:
[0038] Step 1, obtaining an undersampled nuclear magnetic resonance spectrum;
[0039] In step 2, the undersampled NMR spectrum is input into a trained attention-based encoder-decoder neural network for processing to obtain a high-quality reconstructed NMR spectrum.
[0040] The core of this method is to effectively extract and enhance weak peak signals that are submerged by artifacts through the attention mechanism.
[0041] See also Figure 2 , showing the overall structure of the attention-based encoding-decoding neural network, which includes: shallow extraction blocks, parallel sub-networks, and spectral output layers.
[0042] 1. The shallow extraction block is used to extract shallow features x_input of the undersampled NMR spectrum.
[0043] For details, see Figure 3 ,The shallow extraction block includes: separation convolution layer, BN layer one, and activation function one.
[0044] The separation convolution layer is used to perform convolution processing on the undersampled NMR spectrum to obtain the convolved data. The convolution kernel size of the separation convolution layer is 5×1, the step size is 1, and the padding is 2.
[0045] The BN layer is used to process the convolutional data to obtain batch normalized data.
[0046] Activation function 1 is used to process the batch-normalized data through the LeakyReLU activation function to obtain x_input.
[0047] 2. The parallel sub-network is used to perform multiple feature extraction optimizations on x_input to gradually reduce artifacts and improve signal quality.
[0048] like Figure 2 As shown, the parallel sub-network includes: 14 encoding-decoding blocks with attention mechanism.
[0049] The eight sequentially connected encoding-decoding blocks A1 to A8 with attention mechanisms constitute the first row of sub-networks for processing high-resolution features; the other six sequentially connected encoding-decoding blocks A9 to A10 constitute the first row of sub-networks for processing high-resolution features. 14 The second row of sub-networks is used to process low-resolution features; the first row of sub-networks and the second row of sub-networks are connected through upsampling and downsampling.
[0050] Specifically, in the parallel subnetwork:
[0051] x_input is used as input of A1; the output of A1 is used as input of A2; the output of A1 is downsampled and used as input of A9; the output of A2 is used as input of A3; 10 The output of A is upsampled and fused with the output of A3 to serve as the input of A4; the output of A4 serves as the input of A5; 12 The output of A is upsampled and fused with the output of A5 as the input of A6; the output of A6 is the input of A7; 14 The output of A7 is fused with the output of A8 after upsampling, and the output of A8 is used as the input of the spectrum output layer; the output of A9 is used as the input of A 10 The output of A3 is downsampled and 10 The output fusion of 11 Input; A 11 The output is A 12 The output of A5 is downsampled and then 12 The output fusion of 13 Input; A 13 The output is A 14 Input.
[0052] Taking x_input as an example, the data processing process of the parallel subnetwork is described in detail:
[0053] x_input inputs A1; A1 performs high-level extraction and enhancement on x_input and outputs high-resolution features x1_hight;
[0054] On the one hand, x1_hight is input into A2, and on the other hand, it passes through the downsampling conversion layer low-resolution feature x1_d and inputs into A9;
[0055] A9 performs deep extraction and enhancement on x1_d and outputs low-resolution features x1_low;
[0056] x1_low input A 10 ; A 10 Perform deeper extraction and enhancement on x1_low and output low-resolution feature x2_low; x2_low is converted into high-resolution feature x2_u through upsampling;
[0057] A2 performs higher-level extraction and enhancement on x1_hight and outputs high-resolution features x2_hight;
[0058] x2_hight is input into A3; A3 extracts and enhances x2_hight at a higher level and outputs a high-resolution feature x3_hight; x3_hight is converted into a low-resolution feature x3_d through downsampling;
[0059] x3_hight is fused with x2_u to obtain x3_hight'; x3_hight' is input into A4; A4 performs higher-level extraction and enhancement on x3_hight' and outputs high-resolution features x4_hight;
[0060] x3_d is fused with x2_low to get x2_low'; x2_low' is input into A 11 ; A 11 Perform deeper extraction and enhancement on x2_low' and output low-resolution features x3_low;
[0061] x4_hight is input into A5; A5 extracts and enhances x4_hight at a higher level and outputs a high-resolution feature x5_hight; x5_hight is converted into a low-resolution feature x5_d through downsampling;
[0062] x3_low input A 12 ; A 12 Perform deeper extraction and enhancement on x3_low and output low-resolution feature x4_low; x4_low is converted into low-resolution feature x3_u through upsampling;
[0063] x5_hight is fused with x3_u to obtain x5_hight'; x5_hight' is input into A6; A6 performs higher-level extraction and enhancement on x5_hight' and outputs high-resolution features x6_hight;
[0064] x5_d is fused with x4_low to get x4_low'; x4_low' is input to A 13 ; A 13 Perform deeper extraction and enhancement on x4_low' and output low-resolution features x5_low;
[0065] x6_hight inputs A7; A7 performs higher-level extraction and enhancement on x6_hight and outputs high-resolution features x7_hight;
[0066] x5_low input A 14 ; A 14 Perform deeper extraction and enhancement on x5_low and output low-resolution feature x6_low; x6_low is converted into low-resolution feature x4_u through upsampling;
[0067] x7_hight is fused with x4_u to obtain x7_hight'; x7_hight' is input into A8; A8 performs higher-level extraction and enhancement on x7_hight' and outputs high-resolution features x8_hight;
[0068] x8_hight is used as the input of the spectral output layer.
[0069] The entire parallel sub-network gradually extracts the key features of the signal through continuous conversion and fusion of high-resolution and low-resolution features.
[0070] The structures of the 14 encoder-decoder blocks with attention mechanisms are the same. Let’s take one of the encoder-decoder blocks with attention mechanisms as an example to illustrate:
[0071] See also Figure 4 ,The encoding-decoding block with attention mechanism includes: feature extraction block, channel attention block, and feature fusion block.
[0072] 201. The feature extraction block is used to perform two rounds of feature extraction on P and obtain activated second-round features; P represents the input data of the encoding-decoding block with the attention mechanism.
[0073] For details, see Figure 4 ,The feature extraction part includes: BN layer two, Conv layer, activation function two, BN layer three, Deconv layer, activation function three.
[0074] The second BN layer is used to perform the first round of batch normalization on P to obtain the data after the first round of batch normalization.
[0075] The Conv layer is used to perform convolution operations on the data after the first round of batch normalization to extract the first round of features. The convolution kernel size of the Conv layer is 5×1, the step size is 1, and the padding is 2.
[0076] Activation function 2 is used to activate the first round of features through the LeakyReLU activation function.
[0077] The third BN layer is used to perform the second round of batch normalization on the activated first round features to obtain the data after the second round of batch normalization.
[0078] The Deconv layer is used to perform deconvolution on the data after the second round of batch normalization to improve its resolution and obtain the second round of features. The convolution kernel size of the Deconv layer is 5×1, the stride is 1, and the padding is 2.
[0079] Activation function three is used to activate the second round of features through the LeakyReLU activation function.
[0080] 202. The channel attention block is used to perform weighted processing on the activated second round features to obtain weighted features.
[0081] For details, see Figure 5 ,The channel attention block includes: average pooling layer, dimensionality reduction layer, activation function three, dimensionality increase layer, activation function four, and product layer.
[0082] The average pooling layer is used to extract global features from the activated second-round features through adaptive average pooling. Specifically, the average pooling layer can perform global average pooling on the input tensor (i.e., the activated second-round features) in the time / space dimension, mapping the features of each channel to a single scalar, thereby capturing global information.
[0083] The dimensionality reduction layer is used to map global features to a low-dimensional space to obtain low-dimensional features. This reduces the channel dimension, reduces parameters and computation, and simultaneously learns nonlinear combinations of features.
[0084] Activation function four is used to activate low-dimensional features through the ReLU activation function.
[0085] The dimension-raising layer is used to map the activated low-dimensional features back to the dimension of the global features to obtain high-dimensional features. In this way, the output after dimensionality reduction (i.e., high-dimensional features) is restored to the original number of channels in order to generate attention weights with the same number of channels as the input.
[0086] Activation function five is used to activate high-dimensional features through the Sigmoid activation function, which limits the output to the range of [0,1] as the attention weight of each channel (i.e., the activated high-dimensional features).
[0087] The product layer is used to perform element-by-element product operations on the activated second-round features and the activated high-dimensional features to obtain weighted features.
[0088] By incorporating the channel attention block into the parallel sub-network, the weak peaks in the undersampled signal can be effectively enhanced and reconstructed.
[0089] 203. The feature fusion block concatenates P with the weighted features, and further performs feature fusion processing on the concatenated features to obtain an output Q; Q represents the output data of the encoding-decoding block with the attention mechanism.
[0090] 3. The spectrum output layer is used to perform convolution operations on the output results of the parallel sub-network structure to obtain high-quality reconstructed nuclear magnetic resonance spectra.
[0091] The above is an introduction to the structure and function of the encoding-decoding neural network based on the attention mechanism.
[0092] This method requires the use of a trained neural network, so the following continues to introduce the training method of the network, which includes:
[0093] S1, obtain the fully sampled ideal data set X full ;in, represents the fully sampled ideal data of the nth sampling point; N represents the total number of sampling points.
[0094] X full The label only needs to consider the influence of chemical shift evolution and relaxation, so X full It can be expressed in exponential form: In the formula, n represents the number of group signals, A n represents the peak amplitude; T1 represents the relaxation time; v n Represents the distribution frequency range of the peak; t1 represents the direct dimension sampling time; i represents the imaginary part.
[0095] S2, using undersampling mode to full Perform under-sampling processing to obtain the under-sampling data set Y under ;in, Represents the undersampled data of the nth sampling point.
[0096] In this embodiment 1, the undersampling mode is exponential sampling, and the undersampling rate is 20%. In addition, in order to ensure the training effect, the amount of data in the data set should reach a certain level. In this embodiment 1, it is recommended to take data from 256 sampling points (a total of 40,000 pairs), that is, N is 256.
[0097] S3, based on Y under , X full Training the attention-based encoder-decoder neural network to obtain a trained attention-based encoder-decoder neural network;
[0098] Among them, Y under As the input of the attention-based encoder-decoder neural network during training; X full as a training goal.
[0099] In this embodiment 1, during training, the learning rate is set to 0.00003 and the batch size is set to 32; the early stopping learning method is adopted: if the loss of the validation set increases P times in a row compared with the current loss, the training is stopped to avoid too long training time; the optimizer uses the Adam optimization algorithm.
[0100] It should be noted that the value of P is set according to actual conditions. In this embodiment 1, a value of P of 15 is the best.
[0101] Among them, the loss function used in training is:
[0102] Where MANE loss represents the loss function; express The data obtained after being processed by the encoder-decoder neural network based on the attention mechanism; α represents a constant (usually 1).
[0103] MANE loss By calculating the difference loss between the reconstructed data and the ideal data, all errors are brought to the same level, ensuring that strong peaks and weak peaks contribute equally to the loss, which can enhance the network's ability to identify weak peaks.
[0104] Simulation and measurement experiment
[0105] See also Figure 6 , Figure 7 , this embodiment 1 also carried out simulation experiments and actual measurement experiments on the above method respectively:
[0106] 1. Experiment using one-dimensional simulated spectrum:
[0107] like Figure 6As shown in (a), a one-dimensional simulated spectrum with 5 peaks, increasing peak values and two weak peaks is provided (which can be regarded as a one-dimensional ideal spectrum);
[0108] right Figure 6 The one-dimensional simulated spectrum of (a) is undersampled and the Figure 6 (b) is used as the one-dimensional undersampled NMR spectrum to be processed.
[0109] The above method is used to Figure 6 (b) is processed by the one-dimensional undersampled spectrum to obtain Figure 6 (c) One-dimensional reconstructed spectrum.
[0110] right Figure 6 By comparing the three spectra of , it can be seen that the method of the present invention can effectively suppress pseudo-peak signals when processing one-dimensional under-sampled NMR spectra, and successfully restore weak peaks that are almost completely submerged by severe artifacts, thereby achieving high-quality NMR spectrum reconstruction.
[0111] 2. Experiment using two-dimensional spectra:
[0112] like Figure 7 As shown in (a), a two-dimensional measured spectrum of a biological protein is provided (which can be regarded as a two-dimensional ideal spectrum);
[0113] right Figure 7 The biological spectrum of (a) is sampled with an exponential undersampling rate of 20%, and Figure 7 (b) is used as the two-dimensional under-sampled NMR spectrum to be processed.
[0114] The above method is used to Figure 7 (b) is processed to obtain the following two-dimensional undersampled spectrum: Figure 7 (c) The two-dimensional reconstructed spectrum is shown.
[0115] right Figure 7 By comparing the three spectra, it can be seen that the method of the present invention can accurately restore all peaks interfered with or even submerged by artifacts when processing two-dimensional under-sampled nuclear magnetic resonance spectra, and the intensity of the peaks remains almost unchanged; at the same time, it can well suppress the artifacts caused by under-sampling operations, making the peak shape and intensity of small peaks closer to the ideal spectrum.
[0116] In summary, the method of the present invention has a good reconstruction effect on one-dimensional and two-dimensional undersampled nuclear magnetic resonance spectra, and the weak peak recovery quality is high.
[0117] Example 2
[0118] This embodiment 2 provides a device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction, which uses the method suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in embodiment 1.
[0119] The device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction includes: a spectrum acquisition module and a spectrum reconstruction module.
[0120] The spectrum acquisition module is used to obtain undersampled NMR spectra. The spectrum reconstruction module is used to input the undersampled NMR spectra into a trained encoder-decoder neural network based on the attention mechanism for processing to obtain high-quality reconstructed NMR spectra.
[0121] Since the present device uses the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction in Example 1, it also has the same effect, which will not be repeated here.
[0122] Example 3
[0123] This embodiment 3 discloses a computer device, including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in embodiment 1 are implemented.
[0124] This embodiment 3 also discloses a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps of the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in embodiment 1 are executed.
[0125] This embodiment 3 also discloses a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction disclosed in embodiment 1 are implemented.
[0126] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for fast nuclear magnetic resonance spectrum reconstruction using compressed sensing, characterized in that: The following steps are involved: Step 1, obtaining an undersampled nuclear magnetic resonance spectrum; Step 2: The undersampled NMR spectrum is input into a trained attention-based encoder-decoder neural network for processing to obtain a high-quality reconstructed NMR spectrum. Among them, the encoding-decoding neural network based on the attention mechanism includes: The shallow extraction block is used to extract shallow features x_input of the undersampled NMR spectrum; The parallel subnetwork includes: 14 encoder-decoder blocks with attention mechanism, which are used to perform multiple feature extraction optimization on x_input; 8 encoder-decoder blocks A1 to A8 with attention mechanism connected in sequence constitute the first row of subnetworks, which are used to process high-resolution features; the other 6 encoder-decoder blocks A9 to A10 connected in sequence with attention mechanism form the first row of subnetworks, which are used to process high-resolution features. 14 The second row of sub-networks is constructed to process low-resolution features; the first row of sub-networks and the second row of sub-networks are connected through upsampling and downsampling; as well as The spectrum output layer is used to perform convolution operations on the output results of the parallel sub-network structure to obtain high-quality reconstructed nuclear magnetic resonance spectra.
2. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 1, characterized in that: The shallow extraction block includes: A separate convolution layer is used to perform convolution processing on the undersampled nuclear magnetic resonance spectrum to obtain convolved data; BN layer 1, which is used to process the convolutional data to obtain batch normalized data; and Activation function 1 is used to process the batch-normalized data through the LeakyReLU activation function to obtain x_input.
3. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 2, characterized in that: The encoding-decoding block with attention mechanism includes: The feature extraction block is used to perform two rounds of feature extraction on P and obtain the activated second round features; where P represents the input data of the encoder-decoder block with the attention mechanism; Channel attention block, which is used to perform weighted processing on the activated second-round features in the channel dimension to obtain weighted features; as well as The feature fusion block is used to concatenate P with the weighted features, fuse them, and output Q, where Q represents the output data of the encoder-decoder block with the attention mechanism.
4. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 3, characterized in that: The feature extraction block includes: BN layer 2, which is used to perform the first round of batch normalization on P to obtain the data after the first round of batch normalization; Conv layer, which is used to perform convolution operation on the data after the first round of batch normalization to extract the first round of features; Activation function 2, which is used to activate the first round of features through the LeakyReLU activation function; BN layer three, which is used to perform the second round of batch normalization on the activated first round features to obtain the second round of batch normalized data; The Deconv layer is used to perform deconvolution on the data after the second round of batch normalization to improve its resolution and obtain the second round of features; as well as Activation function three, which is used to activate the second round of features through the LeakyReLU activation function.
5. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 3, characterized in that: The channel attention block includes: The average pooling layer is used to extract global features from the activated second round of features through adaptive average pooling; Dimensionality reduction layer, which is used to map global features to low-dimensional space to obtain low-dimensional features; Activation function 4, which is used to activate low-dimensional features through the ReLU activation function; Dimensionality-raising layer, which is used to map the activated low-dimensional features back to the dimension of the global features to obtain high-dimensional features; Activation function five, which is used to activate high-dimensional features through the Sigmoid activation function; as well as The product layer is used to perform element-by-element product operations on the activated second-round features and the activated high-dimensional features to obtain weighted features.
6. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 1, characterized in that: In the parallel subnetwork, x_input is the input of A1; The output of A1 is used as the input of A2; after downsampling, the output of A1 is used as the input of A9; The output of A2 serves as the input of A3; 10 The output of is upsampled and fused with the output of A3 to serve as the input of A4. The output of A4 serves as the input of A5; 12 The output of is upsampled and fused with the output of A5 to serve as the input of A6; The output of A6 serves as the input of A7; 14 The output of is upsampled and fused with the output of A7 to serve as the input of A8. The output of A8 serves as the input of the spectrum output layer; The output of A9 is used as A 10 The output of A3 is downsampled and 10 The output fusion of 11 Input; A 11 The output is A 12 The output of A5 is downsampled and 12 The output fusion of 13 Input; A 13 The output is A 14 input.
7. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 1, characterized in that: The training methods of the attention-based encoder-decoder neural network include: S1, obtain the fully sampled ideal data set X full ;in, n∈[1,N]; represents the ideal data of full sampling at the nth sampling point, and N represents the total number of sampling points; S2, using undersampling mode to full Perform undersampling processing to obtain the undersampled dataset Y under ;in, Represents the undersampled data of the nth sampling point; S3, based on Y under 、X full Training the attention-based encoder-decoder neural network to obtain a trained attention-based encoder-decoder neural network; Among them, Y under As the input of the encoder-decoder neural network based on the attention mechanism during training; full As a training goal.
8. The method for fast nuclear magnetic resonance spectrum reconstruction based on compressed sensing according to claim 7, characterized in that: Early stopping learning method is used during training; The loss function used in training is: Where, MANE loss represents the loss function; express Data obtained after being processed by the attention-based encoder-decoder neural network; α represents a constant.
9. A device suitable for compressed sensing fast nuclear magnetic resonance spectrum reconstruction, characterized in that: It uses the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction according to any one of claims 1 to 8; The device suitable for compressed sensing rapid nuclear magnetic resonance spectrum reconstruction includes: A spectrum acquisition module, which is used to acquire undersampled nuclear magnetic resonance spectra; as well as The spectrum reconstruction module is used to input the undersampled nuclear magnetic resonance spectrum into a trained encoder-decoder neural network based on the attention mechanism for processing to obtain high-quality reconstructed nuclear magnetic resonance spectrum.
10. A computer program product, characterized in that The method comprises a computer program; when the computer program is executed by a processor, the method realizes the steps of the method for compressed sensing fast nuclear magnetic resonance spectrum reconstruction according to any one of claims 1 to 8.
Citation Information
Patent Citations
Fast magnetic resonance imaging method and system based on deep learning and edge assistance
CN113096207A
CARDIAC MAGNETIC RESONANCE IMAGE REGISTRATION METHOD BASED ON MASK AUTOCODER CNN-TRANForMER
CN116012344A
Magnetic resonance image reconstruction method based on residual non-local Fourier attention
CN116797682A
Nuclear magnetic resonance spectrum noise reduction method and nuclear magnetic resonance spectrum noise reduction device thereof
CN117314765A
Bidirectional attention parallel network segmentation method for three-dimensional magnetic resonance image
CN118365884A
Cited By
Nuclear magnetic resonance two-dimensional diffusion ordered spectroscopy sparse reconstruction method based on deep learning
CN122989412A
