Method for estimating non-ideal imaging factor of magnetic resonance spectrum
By combining non-gradient retrieval and prior information of spectral peaks, a phase and signal loss function was designed, and an iterative solution algorithm was developed. This solved the problems of gradient non-convexity and high training cost in the estimation of non-ideal factors in magnetic resonance spectroscopy, and achieved the accuracy and generalization of metabolite quantification.
Patent Information
- Application Number
- CN202411041800.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-22
AI Technical Summary
Existing techniques for estimating non-ideal imaging factors in magnetic resonance spectroscopy suffer from gradient non-convexity, overlapping peaks, or noise interference leading to multiple suboptimal solutions. Furthermore, deep learning estimation of non-ideal factors is costly to train, and its generalization is difficult to verify, affecting the accuracy of metabolite content estimation.
A non-gradient retrieval method is adopted, combined with prior information on spectral peaks. By randomly initializing the frequency drift and the full width at half maximum (FWHM) of the Lorentz-type spectral peaks, a phase loss function and a signal loss function are designed. An iterative solution algorithm is used to quickly search for the global optimum and correct the magnetic resonance signal.
It can quickly and accurately estimate non-ideal factors in magnetic resonance signals, reduce the impact of errors, improve the accuracy of metabolite quantification, and adapt to low signal-to-noise ratio environments.
Smart Images

Figure BDA0004972569500000011 
Figure BDA0004972569500000031 
Figure BDA0004972569500000032
Abstract
Description
Technical Field
[0001] The invention relates to magnetic resonance spectroscopy, and in particular to a method for estimating a non-ideal imaging factor of magnetic resonance spectroscopy. Background Art
[0002] In actual magnetic resonance applications, magnetic resonance spectroscopy calculates the metabolite content of the human body through the spectra of human metabolites, but these spectra are easily affected by non-ideal imaging conditions such as magnetic field drift and inhomogeneity, which leads to the introduction of non-ideal factors into the metabolite spectra (including the overall zero-order phase shift, the frequency drift of each metabolite, and the half-width of the Lorentzian spectrum peak), resulting in spectrum distortion, which in turn affects the accuracy of metabolite content estimation. Accurately predicting these non-ideal factors from a given spectrum can remove the influence of non-ideal imaging conditions on the spectrum and improve the accuracy of metabolite content estimation.
[0003] Before quantifying the magnetic resonance spectrum, a series of non-ideal factors need to be corrected for preprocessing. The commonly used estimation method is based on the mean square error (MSE) (SW Provencher, "Estimation of metabolite concentrations from localized in vivo proton NMR spectra," Magnetic Resonance In Medicine, vol. 30, pp. 672-679, 1993.). MSE is mostly used as the loss function of deep learning and the fidelity term of the optimization algorithm, and the expression is as shown in formula (1).
[0004]
[0005] Among them, c n is the concentration factor of the metabolite, m n (t) is the basis-set of metabolites, i is the imaginary part of the complex number, y is the MRS observation signal with t sampling points, is the Hadamard multiplication, is the phase shift, Δω n is the frequency shift of each metabolite, σ is the actual half-height width of the Lorentzian peak, represents the predicted value, exp(·) represents the exponential function, and ||·||2 represents the second norm.
[0006] The literature (Y.Yang, N.Zou, E.Lin, F.Suo and Z.Chen, "A neural network method for nonconvex optimization and its application on parameter retrieval," IEEE Transactions on Signal Processing, vol.69, pp.3383-3398, 2021.) studies have confirmed the non-convexity of the gradient of formula (1) and the multiple suboptimal solutions caused by overlapping peaks or noise interference on spectral peaks. Therefore, formula (1) is difficult to solve, and more solution strategies or constraints need to be designed. In practical applications, there are also a series of problems such as estimating non-ideal factors through peak shape and being limited by the environmental influence of the target peak itself (such as spectral peak overlap, noise, background signal interference, etc.), high training cost of deep learning estimation of non-ideal factors (label data is difficult to obtain), and difficulty in verifying generalization. Summary of the invention
[0007] The purpose of the present invention is to provide a non-gradient heuristic search method for estimating non-ideal imaging factors of magnetic resonance spectroscopy combined with spectral peak priors in order to solve the above-mentioned technical problems in the prior art. The present invention quickly searches for the global optimal solution and estimates the initial feasible solution through the peak shape itself, thereby ensuring that the searched solution is reasonable and generalizable, reducing the impact of non-ideal factor errors on metabolite quantification in magnetic resonance spectroscopy with short echo time (TE), and providing preprocessing for improving the accuracy of metabolite quantification.
[0008] The present invention uses non-gradient retrieval, which specifically includes the following steps:
[0009] 1) Initialize the non-ideal factor: Use the prior information of the non-ideal factor to randomly initialize the frequency drift Δω n and the half-width of the Lorentzian spectrum peak σ, locate the target metabolite spectrum peak through the maximum value of the specific target metabolite frequency band, and estimate the frequency of the peak of the target metabolite to obtain the initial frequency drift Δω n ;
[0010] 2) Non-ideal factor search algorithm: According to the initialization frequency drift Δω obtained in step 1) n and the half-height width σ of the Lorentzian spectrum peak, and search for the phase Design a method for evaluating a given initial frequency offset Δω n and the phase at half-width σ The loss function loss1 ensures that the searched solution is reasonable and generalizable;
[0011] 3) Signal solution algorithm: Estimate the magnetic resonance signal according to the non-ideal factor parameters obtained in step 2); design an iterative solution algorithm to calculate the MSE, and design a signal loss function loss2 that uses the estimated phase information to adjust the ideal spectrum to adapt to the input spectrum, and output the corrected spectrum after adjustment; so as to reduce the impact of non-ideal factor errors on the metabolite quantification of magnetic resonance spectroscopy with short echo time.
[0012] In step 1), the frequency of the peak of the target metabolite is estimated to obtain an initial frequency drift Δω n , where metabolites with similar functional groups such as creatine (Cr) and phosphocreatine (PCr), phosphocholine (PCh) and glycerophosphocholine (GPC), N-acetylaspartate (NAA) and N-acetylaspartylglutamate (NAAG), and glutamate (Glu) and glutamine (Gln) are given the same frequency shift Δω n .
[0013] In step 2), the non-ideal factor search algorithm may include the following specific steps:
[0014] 2.1) Loop through each individual i and initialize the speed V of each individual i (uniformly distributed random number from [-5,5]) and position φ i (uniformly distributed random number from [-180,180]), and initialize the historical best position pbest of each individual i is φ i After the cycle ends, the optimal position of the optimal individual in the population gbest is initialized to min(pbest i ), where min(·) represents the minimum value; the number of individuals in the population G is an integer greater than 1;
[0015] 2.2) Loop through each individual i and update the position φ according to the individual speed i ; When |φ i When |>180, |·| means taking the absolute value and resetting the position randomly. The resetting method is:
[0016] φ i =random([-180,180]) (2)
[0017] Among them, random([* min ,* max ]) is from* min arrive* max uniformly distributed random number; at the same time, the fitness of each individual is calculated, and the calculation formula is:
[0018]
[0019] in,* real ,* imag are the real or imaginary part of the complex number, respectively. loss1(·) represents the loss function of the non-ideal factor estimation. M(·) is the sum of the 17 metabolite basis sets. The specific formula is as follows:
[0020]
[0021] in L is a positive integer; if the fit obtained according to formula (3) i >loss1(M(0),y(0),pbest i ), then update the individual's historical optimal position, that is, φ i Assign to pbest i ; if loss1(M(0),y(0),pbest i )>loss1(M(0),y(0),gbest), then the optimal position of the individual population gbest can be obtained as the current pbest i ;
[0022] 2.3) Loop through each individual i and obtain the pbest i And gbest update speed, the update formula is as follows:
[0023] V i ′=c1×(pbest i -φ i )+c2×(gbest-φ i )+c3×V i (5)
[0024] Among them, V i ′ is the speed after individual i is updated, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, when |V i When ′|>z, the speed is randomly reset. The reset method is:
[0025] V i ′=random([-z+1,z-1]) (6)
[0026] Among them, z is a constant greater than 0, random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers;
[0027] 2.4) Iterate steps 2.2) and 2.3) J times.
[0028] In step 3), the signal solving algorithm may include the following specific steps:
[0029] 3.1) Loop through each individual i and initialize the speed V of each individual i ([V min ,V max ] uniformly distributed random number) and position P i ([P min ,P max ] uniformly distributed random number), where P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, and initialize the historical optimal position pbest of each individual i P i After the cycle is finished, the optimal position of the best individual in the population gbest is initialized to min(pbesti), where min(·) represents the minimum value, and the number of individuals in the population G is an integer greater than 1;
[0030] 3.2) Loop through each individual i and update the position P according to the individual speed i When P i >P max or P i <P min When , the position is randomly reset. The reset method is:
[0031] P i =random([P min ,P max ]) (7)
[0032] Among them, random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers; calculate the fitness of each individual, the calculation formula is:
[0033]
[0034] Where M = [m1(t), m2(t), m3(t), ..., m N (t)], y(t) is the observed signal, is the phase estimated in claim 3, loss2(·) is the loss function between the magnetic resonance correction spectrum and the input spectrum, and the specific calculation steps of loss2(·) are:
[0035] (a) Perform M Modulation obtains M', the specific formula is:
[0036]
[0037] Among them, (·,n) is the nth column of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, and j is the imaginary part;
[0038] (b) Solve using linear least squares in* H is the complex conjugate transpose of the matrix, * -1 is the matrix inversion operation;
[0039] (c) Perform the following operations on M: After modulation, the sum is obtained to obtain y′(t), and the specific formula is:
[0040]
[0041] where c n For vector The n values of (·,n) are the nth columns of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, j is the imaginary part, and y′(t) is the magnetic resonance spectrum corrected by the loss function loss2;
[0042] (d) Calculate the structural similarity index SSIM, the calculation formula is:
[0043]
[0044] where μ * is the average of *, is the covariance of * and , is the square of the variance of *, c1=0.0001, c2=0.0009;
[0045] If we use formula (8) to get Then update the individual's historical optimal position, that is, P i Assign to pbest i ;like Then the optimal position of the individual population gbest can be obtained as the current pbest i , and update the flag, set flag = 1;
[0046] 3.3) If flag = 0, update the number of stagnation times; the initial value of the number of stagnation times is V max , the update method is to reduce the current stagnation times by one; if the flag is not 0, then set the flag to 0 in this step;
[0047] 3.4) Loop through each individual i and obtain the pbest i And gbest update speed, the update method is as follows:
[0048] If in the first 1 / 3 of the iterations, that is, [1, E / f], more emphasis is placed on individual inertial search, the formula is:
[0049] V′ i =c1×(pbest i -P i )+(c2-0.7)×(gbest-P i )+(c3+0.7)×V i (12)
[0050] If in the 1 / 3 to 2 / 3 iterations, that is, (E / f, 2×E / f], more emphasis is placed on individual experience search, the formula is:
[0051] V′ i =(c1+0.7)×(pbest i -P i )+(c2-0.7)×(gbest-P i )+c3×V i (13)
[0052] If in the last 1 / 3 of the iterations, i.e. (2×E / f, 3×E / f], more emphasis is placed on social experience search, the formula is:
[0053] V′ i =c1×(pbest i -P i )+c2×(gbest-P i )+c3×V i (14)
[0054] If V i >V max or V i <V min , then the speed is randomly reset, the formula is:
[0055] V′ i =random([V min ,V max ]) (15)
[0056] Among them, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, the number of iterations E is a positive integer, the flight habit coefficient f>0, V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers;
[0057] 3.5) looping the iterative calculations of step 3.2), step 3.3) and step 3.4) for Q times;
[0058] 3.6) Output And use formula (10) to obtain the calibration spectrum after the target spectrum.
[0059] The advantages and outstanding technical effects of the present invention are:
[0060] The present invention proposes a method for estimating non-ideal imaging factors of magnetic resonance spectroscopy (MRS). The present invention uses non-gradient search to firstly use three common non-ideal factors (overall zero-order phase shift The frequency shift Δω of each metabolite n , the actual Lorentzian peak half-width (FWHM) prior information is used and non-point-by-point traversal is performed to efficiently search for a better feasible solution. Then, a magnetic resonance spectroscopy estimation method including an improved loss function loss is designed to accurately estimate the spectral signal by combining the estimated non-ideal factor parameters. The algorithm can be used to quickly and accurately estimate three common non-ideal factors in magnetic resonance signals, aiming to quickly search for the global optimal solution, and estimate the initial feasible solution through the peak shape itself to ensure the rationality and generalization of the searched solution, reduce the impact of non-ideal factor errors on the metabolite quantification of magnetic resonance spectroscopy with short echo time (TE), and do a good job of preprocessing to improve the accuracy of metabolite quantification. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1This is an MRS spectrum with a low signal-to-noise ratio (SNR=10) and a normal half-width (σ=10) according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the following embodiments will further illustrate the present invention in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims.
[0063] The embodiment of the present invention utilizes the prior information of the non-ideal factor to design a non-point-by-point traversal scheme and a prediction algorithm, and utilizes the estimated non-ideal factor parameters to quickly and accurately obtain a corrected magnetic resonance spectrum.
[0064] Its main feature is that it utilizes the prior information of non-ideal factors and performs non-point-by-point traversal, and uses the obtained non-ideal factor parameters to efficiently correct the ideal spectrum; the specific method is:
[0065] The first step is to randomly initialize the frequency drift Δω n and the half-width of the Lorentzian spectrum peak σ, and locate the target metabolite spectrum peak by the maximum value of the specific target metabolite frequency band, and then estimate the frequency of the peak of the target metabolite to obtain the initialization frequency drift Δω n , where metabolites with similar functional groups such as creatine (Cr) and phosphocreatine (PCr), phosphocholine (PCh) and glycerophosphocholine (GPC), N-acetylaspartate (NAA) and N-acetylaspartylglutamate (NAAG), and glutamate (Glu) and glutamine (Gln) are given the same frequency shift Δω n .
[0066] The second step is the non-ideal factor search algorithm: according to the initialization frequency drift Δω in the first step n and the half-height width σ of the Lorentzian spectrum peak, and search for the phase And design a method to evaluate the given initial frequency offset Δω n and the phase at half-width σ Loss function loss1.
[0067] The third step is the signal solution algorithm: according to the non-ideal factor parameters (frequency drift Δω) of the second step n and the half-height width σ of the Lorentzian spectrum peak, and search for the phase ), the magnetic resonance signal is estimated; the present invention adopts the method of minimizing the mean square error (MSE), and the expression is as follows:
[0068]
[0069] Among them, c n is the concentration factor of the metabolite, m n (t) is the basis-set of metabolites, i is the imaginary part of the complex number, y is the MRS observation signal with t sampling points, is the Hadamard multiplication, is the phase shift, Δω n is the frequency shift of each metabolite, σ is the actual half-height width of the Lorentzian peak, represents the predicted value of a specific variable, exp(·) represents the exponential function, and ||·||2 represents the bi-norm.
[0070] In order to solve formula (1), an iterative solution algorithm is designed, and a signal loss function loss2 that uses the estimated phase information is designed to adjust the ideal spectrum to adapt to the input spectrum; after the adjustment is completed, the corrected spectrum is output.
[0071] The non-ideal factor search algorithm includes the following steps:
[0072] The first step is to loop through each individual i and initialize the speed V of each individual i (uniformly distributed random number from [-5,5]) and position φ i (uniformly distributed random number from [-180,180]), and initialize the historical best position pbest of each individual i is φ i After the cycle ends, the optimal position of the optimal individual in the population gbest is initialized to min(pbest i ), where min(·) represents the minimum value; the number of individuals in the population G is an integer greater than 1.
[0073] The second step is to loop through each individual i and update the position φ according to the individual velocity. i ; When |φ i When |>180, |·| means taking the absolute value and resetting the position randomly. The resetting method is:
[0074] φ i =random([-180,180]) (2)
[0075] Among them, random([* min ,* max ]) is from* min arrive* max uniformly distributed random number; at the same time, the fitness of each individual is calculated, and the calculation formula is:
[0076]
[0077] in,* real ,* imag are the real or imaginary part of the complex number, respectively. loss1(·) represents the loss function of the non-ideal factor estimation. M(·) is the sum of the 17 metabolite basis sets. The specific formula is as follows:
[0078]
[0079] in L is a positive integer; if the fit obtained according to formula (3) i >loss1(M(0),y(0),pbest i ), then update the individual's historical optimal position, that is, φ i Assign to pbest i ; if loss1(M(0),y(0),pbest i )>loss1(M(0),y(0),gbest), then the optimal position of the individual population gbest is the current pbest i .
[0080] The third step is to loop through each individual i and obtain the pbest i And gbest update speed, the update formula is as follows:
[0081] V i ′=c1×(pbest i -φ i )+c2×(gbest-φ i )+c3×V i (5)
[0082] Among them, V i ′ is the speed after individual i is updated, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, when |V i When ′|>z, the speed is randomly reset. The reset method is:
[0083] V i ′=random([-z+1,z-1]) (6)
[0084] Among them, z is a constant greater than 0, random([* min ,* max ]) is from* min arrive* max A uniformly distributed random number.
[0085] Step 4: Iterate step 2 and step 3 J times.
[0086] The non-ideal factor search algorithm can be written in the following pseudo code form:
[0087]
[0088] Calculate the fitness of each individual i :loss1(M(0),y(0),φ i )
[0089] If fit i >loss1(M(0),y(0),pbest i )
[0090] Update individual historical best position: pbest i =φ i
[0091] If loss1(M(0),y(0),pbest i )>loss1(M(0),y(0),gbest)
[0092] The optimal position of the optimal individual in the population: gbest = pbest i
[0093] End the loop
[0094] Loop through each individual i
[0095] According to pbest i And gbest update speed:
[0096] V i =c1×(pbest i -φ i )+c2×(gbest-φ i )+c3×V i
[0097] If |V i |>V max
[0098] Random reset speed: V i =random([V imin ,V imax ])(Uniformly distributed random number)
[0099] End the loop
[0100] End the loop
[0101] in* real ,* imag respectively, taking the real or imaginary part of a complex number.
[0102] The signal solving algorithm includes the following steps:
[0103] The first step is to loop through each individual i and initialize the speed V of each individual i ([V min ,V max ] uniformly distributed random number) and position P i ([P min ,P max ] uniformly distributed random number), where P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, and initialize the historical optimal position pbest of each individual i P i After the cycle ends, the optimal position of the optimal individual in the population gbest is initialized to min(pbest i ), where min(·) represents the minimum value, and the number of individuals in the population G is an integer greater than 1.
[0104] The second step is to loop through each individual i and update the position P according to the individual speed. i When P i >P max or P i <P min When , the position is randomly reset. The reset method is:
[0105] P i =random([P min ,P max ]) (7)
[0106] Among them, random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers; calculate the fitness of each individual, the calculation formula is:
[0107]
[0108] Where M = [m1(t), m2(t), m3(t), ..., m N (t)], y(t) is the observed signal, is the phase estimated in claim 3, loss2(·) is the loss function between the magnetic resonance correction spectrum and the input spectrum, and the specific calculation steps of loss2(·) are:
[0109] (a) Perform M Modulation obtains M', the specific formula is:
[0110]
[0111] Among them, (·,n) is the nth column of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, and j is the imaginary part.
[0112] (b) Solve using linear least squares in* H is the complex conjugate transpose of the matrix, * -1 It is the inverse operation of the matrix.
[0113] (c) Perform the following operations on M: After modulation, the sum is obtained to obtain y′(t), and the specific formula is:
[0114]
[0115] where c n For vector The n values of (·,n) are the nth columns of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, j is the imaginary part, and y′(t) is the magnetic resonance spectrum corrected by the loss function loss2.
[0116] (d) Calculate the structural similarity index SSIM, the calculation formula is:
[0117]
[0118] where μ* is the average of *, is the covariance of * and , is the square of the variance of *, c1=0.0001, c2=0.0009.
[0119] If we use formula (8) to get Then update the individual's historical optimal position, that is, P i Assign to pbest i ;like Then the optimal position of the individual population gbest can be obtained as the current pbest i , and update the flag, setting flag=1.
[0120] Step 3: If flag = 0, update the number of stagnation times; the initial value of the number of stagnation times is V max , the update method is to reduce the current stagnation times by one; if the flag is not 0, the flag is set to 0 in this step.
[0121] The fourth step is to loop through each individual i and obtain the pbest i And gbest update speed, the update method is as follows:
[0122] If in the first 1 / 3 of the iterations, that is, [1, E / f], more emphasis is placed on individual inertial search, the formula is:
[0123] V′ i =c1×(pbest i -P i )+(c2-0.7)×(gbest-P i )+(c3+0.7)×V i (12)
[0124] If in the 1 / 3 to 2 / 3 iterations, that is, (E / f, 2×E / f], more emphasis is placed on individual experience search, the formula is:
[0125] V′ i =(c1+0.7)×(pbest i -P i )+(c2-0.7)×(gbest-P i )+c3×V i (13)
[0126] If in the last 1 / 3 of the iterations, i.e. (2×E / f, 3×E / f], more emphasis is placed on social experience search, the formula is:
[0127] V′ i =c1×(pbest i -P i )+c2×(gbest-P i )+c3×V i (14)
[0128] If V i >V max or V i <V min , then the speed is randomly reset, the formula is:
[0129] V′ i =random([V min ,V max ]) (15)
[0130] Among them, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, the number of iterations E is a positive integer, the flight habit coefficient f>0, V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], random([* min ,* max ]) is from* min arrive* max A uniformly distributed random number.
[0131] Step 5: Repeat the iterative calculations of step 2, step 3 and step 4 for Q times.
[0132] Step 6: Output And use formula (10) to obtain the calibration spectrum after the target spectrum.
[0133] The signal solution algorithm can be written in the following pseudo code form:
[0134]
[0135]
[0136]
[0137] (1) Perform M Modulation to obtain M':
[0138] Where (·,n) is the nth column of the matrix, is Hadamard multiplication, exp() is e exponential operation, j is the imaginary part
[0139] (2) Solving using linear least squares (M′ H M′) -1 M′ H y(t), where * H is the conjugate transpose of the matrix, * -1 The pseudo-inverse operation of the matrix
[0140] (3) Perform the following operations on M: After modulation, summation is obtained to obtain y′(t):
[0141] where c n For vector n values of
[0142] (4) Calculate SSIM:
[0143]
[0144] where μ * is the average of *, is the covariance of * and , is the square of the variance of *, c1=0.01 2 ,c2=0.03 2
[0145] Output:
[0146] refer to Figure 1 , a specific embodiment, a magnetic resonance spectrum with low signal-to-noise ratio (SNR=10) and normal half-width (σ=10) (magnetic field intensity B0 is 3T, bandwidth SW is 2000Hz, and number of sampling points npts is 2048) is used as the input of this embodiment.
[0147] In the non-ideal factor search algorithm, the specific parameters of the algorithm are set: the number of individuals in the population G = 100, the number of iterations E = 100, the maximum speed V max =6, maximum position P max =180, individual experience learning factor c1 = 0.1, social experience learning factor c2 = 0.8, inertia factor c3 = 0.1,
[0148] In the signal solution algorithm, the specific parameters of the algorithm are set: the number of individuals in the population G = 5000, the number of iterations E = 12, the individual experience learning factor c1 = 0.1, the social experience learning factor c2 = 0.8, the inertia factor c3 = 0.1, the number of stagnation s = 6, the flight habit coefficient f = 3,
[0149] The estimated value of the frequency drift is searched out by using the phase offset, frequency drift and actual half-width initialized by the maximum spectrum peak search method. The results are shown in Table 1.
[0150] Table 1 Frequency offset Δω estimated by the algorithm of the present invention n result
[0151]
[0152] Note: The unit of frequency is Hz, 1Hz≈0.008ppm
[0153] It can be seen from Table 1 that under low signal-to-noise ratio, the frequency estimation error of the method of the present invention does not exceed 1 Hz, that is, the frequency drift does not exceed 0.008 ppm.
[0154] Experiments show that the present invention can still achieve relatively accurate frequency estimation in a low signal-to-noise ratio environment; therefore, the method of the present invention can still maintain good control of frequency drift in the case of large noise, which is very important for accurate identification and quantitative analysis of metabolites. The present invention can be widely used in medical research, clinical diagnosis, drug development, biochemical research and other fields.
[0155] The above embodiments are only preferred embodiments of the present invention and cannot be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the present invention.
Claims
1. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy, characterized in that Using non-gradient retrieval, we first use the prior information of three common non-ideal factors and perform non-point-by-point traversal to efficiently search for a better feasible solution, ensuring that the searched solution is reasonable and generalizable; then we design a magnetic resonance spectroscopy estimation method that includes an improved loss function loss, which combines the estimated non-ideal factor parameters to accurately estimate the spectral signal and reduce the impact of non-ideal factor errors on the metabolite quantification of magnetic resonance spectroscopy with short echo time; the three common non-ideal factors are the overall zero-order phase offset The frequency shift Δω of each metabolite n , the actual Lorentzian spectrum peak half-width σ.
2. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 1, characterized in that Using the prior information of the non-ideal factor, non-point-by-point traversal is performed, and the obtained non-ideal factor parameters are used to efficiently correct the ideal spectrum. The method includes the following steps: 1) Initialize the non-ideal factor: Use the prior information of the non-ideal factor to randomly initialize the frequency drift Δω n and the half-width of the Lorentzian spectrum peak σ, locate the target metabolite spectrum peak through the maximum value of the specific target metabolite frequency band, and estimate the frequency of the peak of the target metabolite to obtain the initial frequency drift Δω n ; Metabolites with similar functional groups are given the same frequency shift Δω n ; 2) Non-ideal factor search algorithm: According to the initialization frequency drift Δω obtained in step 1) n and the half-width of the Lorentzian spectrum peak σ, and search for the phase Design a method for evaluating a given initial frequency offset Δω n and the phase at half-width σ The loss function loss1 ensures that the searched solution is reasonable and generalizable; 3) Signal solution algorithm: estimating the magnetic resonance signal according to the non-ideal factor parameters obtained in step 2); Among them, c n is the concentration factor of the metabolite, m n (t) is the basis set of metabolites, i is the imaginary part of the complex number, y is the MRS observation signal with t sampling points, is the Hadamard multiplication, is the phase shift, Δω n is the frequency shift of each metabolite, σ is the actual half-height width of the Lorentzian peak, represents the predicted value of a specific variable, exp(·) represents the exponential function, and ||·||2 represents the two-norm; In order to solve equation (1), an iterative solution algorithm is designed. The signal loss function loss2 with estimated phase information is used to adjust the ideal spectrum to adapt to the input spectrum, and the adjusted output is a corrected spectrum to reduce the impact of non-ideal factor errors on the metabolite quantification of magnetic resonance spectroscopy with short echo time.
3. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 2, characterized in that In step 1), the frequency of the peak of the target metabolite is estimated to obtain an initial frequency drift Δω n , where metabolites with similar functional groups including creatine and creatine phosphate, phosphocholine and glycerophosphocholine, N-acetylaspartate and N-acetylaspartylglutamate, glutamate and glutamine are given the same frequency shift Δω n .
4. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 2, characterized in that In step 2), the non-ideal factor search algorithm comprises the following specific steps: 2.1) Loop through each individual i and initialize the speed V of each individual i and position φ i , and initialize the historical optimal position pbest of each individual i is φ i After the cycle is over, the optimal position of the optimal individual in the population gbest is initialized, and its value is all pbest i The minimum value among; the number of individuals in the population G is an integer greater than 1; V i From V min To V max A uniformly distributed random number, φ i is a uniformly distributed random number from -180 to 180; 2.2) Loop through each individual i and update the position φ according to the individual speed i ; When |φ i When |>180, |·| means taking the absolute value and resetting the position randomly. The resetting method is: φ i =random([-180,180]) (2) Among them, random([* min ,* max ]) is from* min arrive* max uniformly distributed random number; at the same time, the fitness of each individual is calculated, and the calculation formula is: in,* real ,* imag are the real or imaginary part of the complex number, respectively. loss1(·) represents the loss function of the non-ideal factor estimation. M(·) is the sum of the 17 metabolite basis sets. The specific formula is as follows: in, L is a positive integer; if the fit obtained according to formula (3) i >loss1(M(0),y(0),pbest i ), then update the individual's historical optimal position, that is, φ i Assign to pbest i ; if loss1(M(0),y(0),pbest i )>loss1(M(0),y(0),gbest), then the optimal position of the individual population gbest is the current pbest i ; 2.3) Loop through each individual i and obtain the pbest i And gbest update speed, the update formula is as follows: 5 i ′=c1×(pbest i -φ i )+c2×(gbest-φ i )+c3×V i (5) Among them, V i ′ is the speed after individual i is updated, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, when |V i When ′|>z, the speed is randomly reset. The reset method is: In i ′=random([-z+1,z-1]) (6) Among them, z is a constant greater than 0, random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers; 2.4) Iterate steps 2.2) and 2.3) J times.
5. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 4, characterized in that The non-ideal factor search algorithm is written in the following pseudo code form: Input: The number of individuals in the population G is an integer greater than 1, the number of iterations E>0, the maximum speed V max >0, maximum position P max >0, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, sum of metabolite basis set Observe the signal y(t), Loop through each individual i Initialize the velocity V of each individual i ([V imin ,V imax ]) and the position φ i (Uniformly distributed random number from [-180,180]) Initialize the historical best position pbest of each individual i :φ i End the loop Initialize the optimal position of the population optimal individual gbest: min(pbest i ) Loop E Loop through each individual i Update position according to velocity: φ i =V i +φ i If |φ i |>P max Random reset position: φ i =random([-180,180])(uniformly distributed random number) Calculate the fitness of each individual i :loss1(M(0),y(0),φ i ) If fit i >loss1(M(0),y(0),pbest i ) Update individual historical best position: pbest i =φ i If loss1(M(0),y(0),pbest i )>loss1(M(0),y(0),gbest) The optimal position of the optimal individual in the population: gbest = pbest i End the loop Loop through each individual i According to pbest i And gbest update speed: 5 i =c1×(pbest i -φ i )+c2×(gbest-φ i )+c3×V i If |V i |>V max Random reset speed: V i =random([V imin ,V imax ])(Uniformly distributed random number) End the loop End the loop in* real ,* imag respectively, taking the real or imaginary part of a complex number.
6. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 2, characterized in that In step 3), the signal solving algorithm comprises the following specific steps: 3.1) Loop through each individual i and initialize the speed V of each individual i , whose value is from V min To V max Uniformly distributed random numbers and positions P i From P min To P max A uniformly distributed random number, where P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, and initialize the historical optimal position pbest of each individual i P i After the cycle is over, the optimal position of the optimal individual in the population gbest is initialized, and its value is all pbest i The minimum value in , the number of individuals in the population G is an integer greater than 1; 3.2) Loop through each individual i and update the position P according to the individual speed i When P i >P max or P i <P min When , the position is randomly reset. The reset method is: P i =random([P min ,P max ]) (7) Among them, random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers; calculate the fitness of each individual, the calculation formula is: Where M = [m1(t), m2(t), m3(t), ..., m N (t)], y(t) is the observed signal, is the phase estimated in claim 3, loss2(·) is the loss function between the magnetic resonance correction spectrum and the input spectrum, and the specific calculation steps of loss2(·) are: (a) Perform M Modulation obtains M', the specific formula is: Among them, (·,n) is the nth column of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, and j is the imaginary part; (b) Solve using linear least squares Where *H is the complex conjugate transpose of the matrix, * -1 is the matrix inversion operation; (c) Perform the following operations on M: After modulation, the sum is obtained to obtain y′(t), and the specific formula is: where c n For vector The n values of (·,n) are the nth columns of the matrix, is the Hadamard multiplication, exp(·) represents the exponential function, j is the imaginary part, and y′(t) is the magnetic resonance spectrum corrected by the loss function loss2; (d) Calculate the structural similarity index SSIM, the calculation formula is: where μ * is the average of *, is the covariance of * and , is the square of the variance of *, c1=0.0001, c2=0.0009; If we use formula (8) to get Then update the individual's historical optimal position, that is, P i Assign to pbest i ;like Then the optimal position of the individual population gbest is the current pbest i , and update the flag, set flag = 1; 3.3) If flag = 0, update the number of stagnation times; the initial value of the number of stagnation times is V max , the update method is to reduce the current stagnation times by one; if the flag is not 0, then set the flag to 0 in this step; 3.4) Loop through each individual i and obtain the pbest i And gbest update speed, the update method is as follows: If in the first 1 / 3 of the iterations, that is, [1, E / f], more emphasis is placed on individual inertial search, the formula is: V i ′=c1×(pbest i -P i )+(c2-0.7)×(gbest-P i )+(c3+0.7)×V i (12) If in the 1 / 3 to 2 / 3 iterations, that is, (E / f, 2×E / f], more emphasis is placed on individual experience search, the formula is: V i ′=(c1+0.7)×(pbest i -P i )+(c2-0.7)×(gbest-P i )+c3×V i (13) If in the last 1 / 3 of the iterations, i.e. (2×E / f, 3×E / f], more emphasis is placed on social experience search, the formula is: V i ′=c1×(pbest i -P i )+c2×(gbest-P i )+c3×V i (14) If V i >V max or V i <V min , then the speed is randomly reset, the formula is: In i ′=random([V min ,V max ]) (15) Among them, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, the number of iterations E is a positive integer, the flight habit coefficient f>0, V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, P max =[Δω n +5,σ n +5], P min =[Δω n -5,σ n -5], random([* min ,* max ]) is from* min arrive* max Uniformly distributed random numbers; 3.5) looping the iterative calculations of step 3.2), step 3.3) and step 3.4) for Q times; 3.6) Output And use formula (10) to obtain the calibration spectrum after the target spectrum.
7. A method for estimating non-ideal imaging factors of magnetic resonance spectroscopy as claimed in claim 6, characterized in that The signal solving algorithm is written in the following pseudo code form: Input: The number of individuals in the population G is an integer greater than 1, the number of iterations E>0, the maximum position P max =[Δω n +5,σ n +5],P min =[Δω n -5,σ n -5], maximum speed V max =(P max -P min ) / 10,V min =(P max -P min ) / 20, individual experience learning factor c1>0, social experience learning factor c2>0, inertia factor c3>0, number of stagnation s>0, flight habit coefficient f>0, number of metabolites N=17, observation signal y(t), metabolite basis set is arranged in columns into basis set matrix M=[m1(t),m2(t),m3(t),...,m N (t)], Search Results Loop through each individual i Initialize the velocity V of each individual i ([V min ,V max ] uniformly distributed random number) and position P i ([P max ,P min ] uniformly distributed random number) Initialize the historical best position pbest of each individual i :P i End the loop Initialize the optimal position of the population optimal individual gbest: min(pbest i ) Loop E Loop through each individual i Update position according to speed: P i =V i +P i If P i >P max or P i <P min Random reset position: P i =random([P max ,P min ])(Uniformly distributed random number) Calculate the fitness of each individual i : if Update individual historical best position: pbest i =P i if The optimal position of the optimal individual in the population: gbest = pbest i Flag updated: flag = 1 End the loop If flag == 0 Update stall times: s = s-1 otherwise flag=0 Loop through each individual i According to pbest i And gbest update speed: If [1, E / f] (in the first 1 / 3 of the iterations, more emphasis is placed on individual inertial search) V i =c1×(pbest i -P i )+(c2-0.7)×(gbest-P i )+(c3+0.7)×V i If (E / f, 2×E / f] (in the 1 / 3 to 2 / 3 iterations, more emphasis is placed on individual experience search) V i =(c1+0.7)×(pbest i -P i )+(c2-0.7)×(gbest-P i )+c3×V i If (2×E / f, 3×E / f] (in the last 1 / 3 of the iterations, more emphasis is placed on social experience search) V i =c1×(pbest i -P i )+c2×(gbest-P i )+c3×V i If V i >V max or V i <V min Random reset speed: V i =random([V min ,V max ]) uniformly distributed random numbers End the loop End the loop (1) Perform M Modulation to obtain M': Where (·,n) is the nth column of the matrix, is Hadamard multiplication, exp() is e exponential operation, j is the imaginary part (2) Solving using linear least squares (M′ H M′) -1 M′ H y(t), where * H is the conjugate transpose of the matrix, * -1 The pseudo-inverse operation of the matrix (3) Perform M After modulation, summation is obtained to obtain y′(t): where c n For vector n values of (4) Calculate SSIM: where μ * is the average of *, is the covariance of * and , is the square of the variance of *, c1=0.01 2 ,c2=0.03 2 ; Output:
