WO2021097594A1 - Quick imaging model training method and apparatus, and server - Google Patents

Quick imaging model training method and apparatus, and server Download PDF

Info

Publication number
WO2021097594A1
WO2021097594A1 PCT/CN2019/119097 CN2019119097W WO2021097594A1 WO 2021097594 A1 WO2021097594 A1 WO 2021097594A1 CN 2019119097 W CN2019119097 W CN 2019119097W WO 2021097594 A1 WO2021097594 A1 WO 2021097594A1
Authority
WO
WIPO (PCT)
Prior art keywords
under
data
training
sampling
mask
Prior art date
Application number
PCT/CN2019/119097
Other languages
French (fr)
Chinese (zh)
Inventor
王珊珊
郑海荣
梁皓云
刘新
梁栋
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2019/119097 priority Critical patent/WO2021097594A1/en
Publication of WO2021097594A1 publication Critical patent/WO2021097594A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Definitions

  • This application relates to the technical field of magnetic resonance scanning imaging, in particular to a training method, device and server for a fast imaging model.
  • magnetic resonance imaging can provide a wealth of anatomical and functional information, making magnetic resonance imaging widely used in the medical field.
  • the patient In order to perform magnetic resonance imaging, the patient needs to be clinically scanned with magnetic resonance. During the scan, the patient needs to maintain a posture for a long time, resulting in a poor patient experience. Therefore, the speed of magnetic resonance imaging needs to be accelerated.
  • the magnetic resonance scanner In a real scene, the magnetic resonance scanner needs to sample the data at the Nyquist sampling frequency to ensure that the data can be restored without distortion.
  • the method of rapid magnetic resonance imaging is mainly constructed based on deep learning.
  • the main steps of imaging using this method are to consider collecting only part of the data, sampling the data in a sampling method that does not meet the Nyquist sampling theorem (high-power retrospective under-sampling); performing zero-filling operations on the obtained under-sampling data Obtain a zero-filled image; input the zero-filled image into the deep learning network, and output the restored high-definition image after processing by the deep learning network.
  • the fast imaging method constructed based on deep learning cannot learn from the under-sampling mask used for data sampling, the under-sampling mask cannot be optimized; and the fast imaging method constructed based on deep learning only considers the channel attention, resulting in The imaging effect of the rapid imaging method is not good.
  • One of the objectives of the embodiments of the present application is to provide a fast imaging model training method, device, and server, aiming to solve the problems of the inability to optimize the under-sampling mask and the long imaging time.
  • a training method for a fast imaging model including:
  • the training data is input into a fast imaging model, the training data is extracted according to the multi-scale information of the image and the attention mechanism through N multi-granularity attention modules, and each of the multi-granularity attention modules is merged to extract Characteristic map of; N ⁇ 1;
  • the updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data.
  • the training data is input to a fast imaging model, and features are extracted from the training data according to the multi-scale information of the image and the attention mechanism through N multi-granularity attention modules, and each of them is merged.
  • the feature maps extracted by the multi-granularity attention module include:
  • For each of the multi-granularity attention modules perform feature extraction on the initialization feature data according to preset image scales, and fuse the extracted feature maps;
  • the step of calculating the gradient inversely according to the imaging data and the target label to update the parameters of the fast imaging model and the under-sampling mask through the gradient includes:
  • the step of calculating the gradient inversely according to the imaging data and the target label to update the parameters of the fast imaging model and the under-sampling mask through the gradient further includes:
  • the fast imaging model includes learning the convolutional layer of the under-sampling mask, and correspondingly setting the convolution kernel and parameters of the convolutional layer according to the under-sampling mask; the under-sampling mask
  • the initial value of the film includes a preset number of low-frequency sampling strips and randomly sampled high-frequency sampling strips.
  • the rule for binarizing the updated continuous mask is: set to 1 when any element in the updated continuous mask is greater than a preset threshold; when If any element in the updated continuous mask is less than the preset threshold, it is set to 0; wherein, the preset threshold is a preset percentage of the maximum value in the updated continuous mask; The preset percentage is set according to the imaging acceleration multiple.
  • the under-sampling of the image scanned by magnetic resonance according to the under-sampling mask to obtain training data includes:
  • inverse Fourier transform is performed on the image scanned by magnetic resonance to obtain full-sample image domain data, which is used as the target tag.
  • a training device for a fast imaging model including:
  • the training data generation module is used for under-sampling the image scanned by MRI according to the under-sampling mask during each iteration of the model training to obtain training data;
  • the model training module is used to input the training data into the fast imaging model for model training to obtain imaging data;
  • the feature extraction module is used to input the training data into the fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multiple The feature map extracted by the granular attention module; N ⁇ 1;
  • the image fusion module is used to reconstruct the image of the fused feature map and output the imaging data
  • the forward calculation module is used for forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
  • the feature extraction module includes:
  • the feature extraction unit is used to extract the initialization feature data of the training data.
  • each of the multi-granularity attention modules includes:
  • the multi-scale densely connected feature fusion unit is used to perform feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps;
  • the feature refinement unit based on the multi-granularity attention mechanism is used to segment the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
  • the fusion image unit is used to fuse all the region images to obtain a feature map after feature refinement.
  • the parameter and under-sampling mask update module includes:
  • a gradient calculation unit configured to reversely calculate a gradient according to the imaging data and the target tag to obtain a gradient matrix
  • the model parameter update unit is configured to update the attention weight given to the plurality of regional images by the multi-granularity attention mechanism according to the gradient matrix.
  • the parameter and under-sampling mask update module further includes:
  • An under-sampling mask updating unit configured to generate a continuous mask according to the under-sampling mask, and add the continuous mask and the gradient matrix to obtain an updated continuous mask
  • the mask binarization unit is used to binarize the updated continuous mask to obtain an updated under-sampling mask.
  • a server including: a memory, a processor, and a computer program stored in the memory and capable of being run on the processor.
  • the processor executes the computer program, the computer program in the first aspect is implemented. Training method of fast imaging model.
  • the training method, device, and server of a fast imaging model provided by the embodiments of the application have the beneficial effect of: under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training to obtain training Data; input the training data into a fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multi-granularity attention modules
  • the fast imaging model includes a neural network layer that learns the under-sampling mask; according to the imaging data and the target label Calculate the gradient backwards to update the parameters of the fast imaging model and the under-sampling mask through the gradient; use the updated parameters and the updated under-sampling mask to perform forward calculation to output the next Imaging data.
  • the fast imaging model By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model.
  • the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
  • FIG. 1 is a schematic flowchart of a method for training a fast imaging model provided in Embodiment 1 of the present application;
  • FIG. 2 is a schematic structural diagram of a fast imaging model provided by Embodiment 1 of the present application;
  • FIG. 3 is a schematic structural diagram of a multi-granularity attention module provided in Embodiment 1 of the present application;
  • Embodiment 4 is a schematic structural diagram of a feature refinement part based on a multi-granularity attention mechanism provided by Embodiment 1 of the present application;
  • FIG. 5 is a schematic flowchart of a training method for a fast imaging model provided in Embodiment 2 of the present application;
  • FIG. 6 is a schematic diagram of an embodiment of a magnetic resonance scanning imaging process provided in Embodiment 2 of the present application.
  • FIG. 7 is a schematic structural diagram of a training device for a fast imaging model provided in Embodiment 3 of the present application.
  • FIG. 8 is a schematic structural diagram of a server provided in Embodiment 4 of the present application.
  • the element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation of the present application.
  • the specific meaning of the above terms can be understood according to specific conditions.
  • the terms “first” and “second” are only used for ease of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features.
  • the meaning of "plurality” means two or more than two, unless otherwise specifically defined.
  • FIG. 1 it is a schematic flowchart of a training method for a fast imaging model provided in Embodiment 1 of the present application.
  • This embodiment can be applied to the application scenario of magnetic resonance scanning imaging.
  • the method can be executed by a training device of a fast imaging model.
  • the device can be a server, a smart terminal, a tablet or a PC, etc.; in this embodiment of the application, fast imaging is used.
  • the training device of the model is explained as the main body of execution, and the method specifically includes the following steps:
  • the scan data that is, the full sampling K-space data
  • the magnetic resonance scanner needs to sample the scanned data at the Nyquist sampling frequency to generate images to ensure that the data can be restored without distortion.
  • the process of sampling the scanned data at the Nyquist sampling frequency is slow, resulting in a long imaging time.
  • it may be considered to collect only part of the scanned data, and sample the data at a sampling rate lower than the Nyquist sampling frequency, that is, under-sampling.
  • under-sampling methods There are many under-sampling methods in related technologies.
  • the commonly used method is 1D random (one-dimensional random), which uses an under-sampling matrix whose number of columns is consistent with the length of the phase encoding direction of the K-space image (scan data), that is, the under-sampling mask. Multiply the scanned data to get an under-sampled image. Therefore, the data required for imaging can be obtained by under-sampling the scan data according to the preset under-sampling mask.
  • the iterative training process is the first model iterative training process, under-sampling the image scanned by magnetic resonance according to the preset initial value of the under-sampling mask to obtain training data; If this iterative training process is not the first model iterative training process, then the image scanned by the magnetic resonance is under-sampled according to the under-sampling mask updated after the previous iterative training to obtain training data.
  • FIG. 2 it is a schematic structural diagram of a fast imaging model.
  • the fast imaging model can be a multi-granularity attention network, which mainly includes two parts: a feature extraction part 21 and a reconstruction part 22.
  • the initial feature data of the training data can be extracted through a convolutional layer in the feature extraction part 21 first.
  • the feature extraction part of the fast imaging model also includes N multi-granularity attention modules 23, where N ⁇ 1; and the parameters in each multi-granularity attention module 23 are different to add more nonlinear operations. Make the result more optimized.
  • N can be 5.
  • the initial feature data extracted through a convolutional layer in the feature extraction part 21 is input to a multi-granularity attention module 23, and the initial feature data is feature extracted according to the multi-scale information of the image and the attention mechanism to obtain the feature image, and then The feature image is input to the next multi-granularity attention module 23 until N multi-granularity attention modules 23 are traversed.
  • the feature extraction part of the fast imaging model also includes a connection layer, through which the feature maps extracted by each of the multi-granularity attention modules are fused together. Since the feature maps extracted by each of the multi-granularity attention modules produce feature maps of many channels, one convolutional layer in the feature extraction part needs to modify the number of channels of the feature maps. The feature map after the number of channels is modified also needs to perform global residual calculation to prevent the problem of gradient disappearance due to too deep model network layers and difficulty in training parameters. The calculated feature map is then input into the reconstruction part 22 in the fast imaging model to generate an image, which enhances the representation of the features in the generated image.
  • the process for each multi-granularity attention module to perform feature extraction on the initial feature data according to the multi-scale information of the image and the attention mechanism is: for each of the multi-granularity attention modules, according to a preset Perform feature extraction on the initial feature data at several image scales, and fuse the extracted feature maps; divide the fused feature maps into several regional images with different attention weights through a multi-granularity attention mechanism; fuse all The area image is described, and the feature map after feature refinement is obtained.
  • each multi-grained attention block may include two parts: a feature fusion part based on multi-scale dense connection and a feature refinement part based on a multi-grained attention mechanism; and each multi-grained attention block There is a local residual connection in the force module.
  • Figure 3 it is a schematic diagram of the structure of the multi-granularity attention module. Since visual information of different scales will be helpful for imaging, the feature fusion part based on multi-scale dense connection performs feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps.
  • each unit has two paths, and each path is equipped with a convolutional layer. According to a number of preset image scales, each unit is The convolutional layer parameters are set.
  • there are 3 units in the feature fusion part based on multi-scale dense connection and a convolution layer with a 3 ⁇ 3 convolution kernel and a convolution layer with a 5 ⁇ 5 convolution kernel may be used respectively.
  • the initial feature data is input based on the feature fusion part of multi-scale dense connection
  • the initial feature data is convolved through two convolutional layers in a unit, and then the outputs of the two convolutional layers are fused together through the connection layer, thus
  • the feature maps containing visual information of different scales are integrated together; the feature images obtained by the fusion are input into the next unit in a densely connected manner to continue the convolution calculation, until traversing the 3 in the feature fusion part based on the multi-scale densely connected Units.
  • several feature maps extracted from the fusion are input into the feature refinement part based on the multi-granularity attention mechanism after convolution with a convolution kernel of 1X1.
  • the feature refinement part based on the multi-granularity attention mechanism may include two parts: the squeeze excitation operation and the multi-granularity attention mechanism.
  • Figure 4 it is a schematic diagram of the structure of the feature refinement part based on the multi-granularity attention mechanism.
  • the multi-granularity attention mechanism divides the input feature maps in a variety of preset ways, and each division way forms a corresponding number of regional feature maps.
  • each regional image with attention weight also needs to go through the squeeze excitation operation, that is, go through the corresponding global pooling, and then go through two convolutional layers with weighted convolution kernels of 1X1 to obtain the learned channel weights W 1 and W 2 ; It also needs to go through activation function calculation and a dot product operation to get the final attention weight value.
  • the activation function may be a Sigmoid activation function. Fusion of all the regional images with the final attention weight value to obtain the feature map after feature refinement.
  • S130 Perform image reconstruction on the fused feature map, and output the imaging data
  • the reconstruction part may be composed of an up-sampling layer and a convolutional layer. Since the feature map after feature refinement is inconsistent with the final real image (target label), there is only half of the dimension.
  • the feature map after feature refinement is up-sampling through the upsampling layer to restore the feature map to the real image (target label) Same size.
  • the up-sampled feature map is then convolved by the convolutional layer to obtain imaging data.
  • the parameters and under-sampling masks of the fast imaging model are determined based on the imaging data output from this model training.
  • the gradient can be calculated inversely based on the imaging data output from this model training and the preset target label, so as to update the parameters of the fast imaging model and the under-sampling mask according to the calculated gradient.
  • the process of updating the parameters of the fast imaging model according to the gradient calculated inversely between the imaging data and the target tag may be: calculating the gradient inversely according to the imaging data and the target tag to obtain a gradient matrix;
  • the gradient matrix updates the attention weight given to the several regional images by the multi-granularity attention mechanism.
  • the parameters of the fast imaging model and the under-sampling mask are updated according to the output imaging data and the target label in reverse calculation of the gradient, and then the model iterative training process of this round is completed.
  • the updated parameters and the under-sampling mask are used for forward calculation to perform the next round of model iterative training.
  • the training method of a fast imaging model is to obtain training data by under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training; and input the training data
  • the fast imaging model uses N multi-granularity attention modules to perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image, and fuse the feature maps extracted by each of the multi-granularity attention modules; N ⁇ 1; Perform image reconstruction on the fused feature map and output imaging data;
  • the fast imaging model includes a neural network layer that learns the under-sampling mask; the gradient is calculated inversely according to the imaging data and the target label to pass all
  • the gradient updates the parameters of the fast imaging model and the under-sampling mask; the updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data.
  • the fast imaging model By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model.
  • the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
  • FIG. 5 is a schematic flowchart of the training method of the fast imaging model provided in the second embodiment of the present application.
  • this embodiment also provides a method of implementing the learning of the under-sampling mask by embedding the neural network for learning the under-sampling mask into the fast imaging model together with iterative training.
  • the method specifically includes:
  • a fast imaging model that can be constructed through deep learning generates images based on data obtained by under-sampling. If the imaging effect is not good, the parameters of the fast imaging model can be optimized through multiple iteration training. However, no matter how the fast imaging model is optimized, the under-sampling data of the input model is always obtained by under-sampling according to the initial under-sampling mask, and the under-sampling mask cannot be optimized at the same time according to the imaging effect. Since the under-sampling mask is related to the imaging speed of the fast imaging model, the under-sampling mask cannot be updated and optimized, which makes the imaging time long.
  • the neural network layer that learns the under-sampling mask is embedded in the fast imaging model.
  • the fast imaging model is iteratively trained, the image scanned by magnetic resonance is under-sampled according to the under-sampling mask to obtain training data.
  • the under-sampling mask can be iteratively trained with the fast imaging model to generate a learnable under-sampling mask.
  • the fast imaging model includes a convolutional layer that learns an under-sampling mask, and the convolution kernel and parameters of the convolutional layer are correspondingly set according to the elements contained in the under-sampling mask;
  • the initial value of the under-sampling mask includes A preset number of low-frequency sampling strips and randomly sampled high-frequency sampling strips.
  • the initial value corresponding to the preset under-sampling mask includes a preset number of low-frequency samples Strips and randomly sampled high-frequency sampling strips.
  • the under-sampling mask is a binarization mask (that is, only two values of 0 and 1 are included), the element corresponding to the sampling bar in the under-sampling mask is "1", and the remaining elements are "0".
  • the image scanned by magnetic resonance is under-sampled according to the under-sampling mask
  • the specific process of obtaining training data may be: according to the under-sampling mask, the image scanned by magnetic resonance (full-sampled K-space Data) performing under-sampling to obtain under-sampled K-space data; performing inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data, which is used as the training data.
  • S220 Input the training data into a fast imaging model for model training, to obtain imaging data;
  • FIG. 6 is a schematic diagram of an embodiment of the magnetic resonance scanning imaging process.
  • the training data After under-sampling the image scanned by magnetic resonance according to the under-sampling mask, the training data will be obtained.
  • Data is input to the fast imaging model for model training to obtain imaging data, that is, imaging calculations are performed according to the training data to generate reconstructed images.
  • the parameters and under-sampling masks of the fast imaging model are determined based on the imaging data output from this model training.
  • the gradient can be calculated inversely based on the imaging data output from this model training and the preset target label, so as to update the parameters of the fast imaging model and the under-sampling mask according to the calculated gradient.
  • the gradient is calculated backwards according to the imaging data output by the model training and the preset target label to update the under-sampling mask may be: the gradient is calculated backwards according to the imaging data and the target label, Obtain a gradient matrix; generate a continuous mask according to the under-sampling mask, add the continuous mask and the gradient matrix to obtain an updated continuous mask; combine the updated continuous mask Binarize to obtain the updated under-sampling mask.
  • the full-sampling image domain data can be obtained by performing inverse Fourier transform on the image scanned by magnetic resonance, which can be used as a preset target label.
  • the gradient is calculated inversely to obtain the gradient matrix, and then the current undersampling mask needs to be generated according to the current undersampling mask before updating the current undersampling mask according to the gradient matrix.
  • this model training process is the first model iterative training process, the current under-sampling mask is the initial value, and the sampling strip position of the continuous mask generated according to the current under-sampling mask can be preset to be consistent with the current under-sampling mask.
  • the initial value of the sampling strip position comes from a uniform distribution U(0.5, 1), and the initial value of the non-sampling strip position comes from another uniform distribution U(0, 0.5).
  • the generated continuous mask and the calculated gradient matrix are equal in size, and each element in the gradient matrix is the gradient that the corresponding element in the continuous mask needs to update.
  • the generated continuous mask and the gradient matrix are added to obtain the updated continuous mask; the updated continuous mask is binarized to obtain the updated under-sampling mask, so that the updated continuous mask can be obtained.
  • the under-sampling mask of is used in the next round of fast imaging model training process.
  • the rule for binarizing the updated continuous mask is: when any element in the updated continuous mask is greater than a preset threshold, set to 1; when the Any element in the updated continuous mask is set to 0 when it is less than the preset threshold; wherein, the preset threshold is a preset percentage of the maximum value in the updated continuous mask; The preset percentage is set according to the imaging acceleration multiple.
  • the updated continuous mask is binarized according to the above-mentioned rules, and the value of the element greater than the preset threshold in the updated continuous mask is set to 1, and the value of the updated continuous mask is smaller than the preset threshold.
  • the preset threshold is a preset percentage of the maximum value in the continuous mask after the update; and the preset percentage is set according to the imaging acceleration multiple.
  • the corresponding relationship between the imaging acceleration factor and the percentage may be that acceleration factor 4 corresponds to 25%, acceleration factor 8 corresponds to 12.5%, acceleration factor 12 corresponds to 8.3%, and acceleration factor 16 corresponds to 6.25%. In order to improve the imaging speed by updating and optimizing the under-sampling mask.
  • S240 Perform forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
  • the parameters of the fast imaging model and the under-sampling mask are updated according to the output imaging data and the target label in reverse calculation of the gradient, and then the model iterative training process of this round is completed.
  • the updated parameters and the under-sampling mask are used for forward calculation to perform the next round of model iterative training.
  • FIG. 7 is a schematic structural diagram of a training device for a fast imaging model provided in Embodiment 3 of the present application.
  • a training device 7 which includes:
  • the training data generation module 701 is used for under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training to obtain training data;
  • the training data generation module 701 includes:
  • a data processing unit configured to perform inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data as the training data;
  • the target label generating unit is configured to perform inverse Fourier transform on the image scanned by magnetic resonance to obtain full-sampled image domain data, which is used as the target label.
  • the feature extraction module 702 is used to input the training data into a fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the training data.
  • the image fusion module 703 is configured to perform image reconstruction on the fused feature map, and output the imaging data.
  • the feature extraction module 702 includes:
  • the feature extraction unit is used to extract the initialization feature data of the training data.
  • each multi-granularity attention module includes:
  • the multi-scale densely connected feature fusion unit is used to perform feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps;
  • the feature refinement unit based on the multi-granularity attention mechanism is used to segment the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
  • the image fusion unit is used to fuse all the regional images to obtain a feature map after feature refinement.
  • the parameter and under-sampling mask update module 704 is configured to calculate a gradient inversely according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient;
  • the parameter and under-sampling mask update module 704 include:
  • a gradient calculation unit configured to reversely calculate a gradient according to the imaging data and the target tag to obtain a gradient matrix
  • the model parameter update unit is configured to update the attention weight given to the plurality of regional images by the multi-granularity attention mechanism according to the gradient matrix.
  • An under-sampling mask updating unit configured to generate a continuous mask according to the under-sampling mask, and add the continuous mask and the gradient matrix to obtain an updated continuous mask
  • the mask binarization unit is used to binarize the updated continuous mask to obtain an updated under-sampling mask.
  • the forward calculation module 705 is configured to use the updated parameter and the updated under-sampling mask to perform forward calculation to output the next imaging data.
  • the training device for a fast imaging model obtains training data by under-sampling images scanned by magnetic resonance according to an under-sampling mask during each iteration of the model training; and inputting the training data
  • the fast imaging model uses N multi-granularity attention modules to perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image, and fuse the feature maps extracted by each of the multi-granularity attention modules; N ⁇ 1; Perform image reconstruction on the fused feature map and output imaging data;
  • the fast imaging model includes a neural network layer that learns the under-sampling mask; the gradient is calculated inversely according to the imaging data and the target label to pass all
  • the gradient updates the parameters of the fast imaging model and the under-sampling mask; the updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data.
  • the fast imaging model By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model.
  • the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
  • FIG. 8 is a schematic structural diagram of a server provided in Embodiment 4 of the present application.
  • the server includes: a processor 1, a memory 2, and a computer program 3 stored in the memory 2 and running on the processor 1, such as a program for a training method of a fast imaging model.
  • the processor 1 executes the computer program 3 the steps in the above-mentioned fast imaging model training method embodiment are implemented, for example, steps S110 to S150 shown in FIG. 1.
  • the computer program 3 may be divided into one or more modules, and the one or more modules are stored in the memory 2 and executed by the processor 1 to complete the application.
  • the one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 3 in the server.
  • the computer program 3 can be divided into a training data generation module, a feature extraction module, an image fusion module, a parameter and under-sampling mask update module, and a forward calculation module.
  • the specific functions of each module are as follows:
  • the training data generation module is used for under-sampling the image scanned by MRI according to the under-sampling mask during each iteration of the model training to obtain training data;
  • the feature extraction module is used to input the training data into the fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multiple The feature map extracted by the granular attention module; N ⁇ 1;
  • the image fusion module is used to reconstruct the image of the fused feature map and output the imaging data
  • the parameter and under-sampling mask update module is used to calculate a gradient inversely according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient;
  • the forward calculation module is used for forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
  • the server may include, but is not limited to, a processor 1, a memory 2, and a computer program 3 stored in the memory 2.
  • FIG. 8 is only an example of a server, and does not constitute a limitation on the server. It may include more or less components than those shown in the figure, or a combination of certain components, or different components, such as the
  • the server may also include input and output devices, network access devices, buses, and so on.
  • the processor 1 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the storage 2 may be an internal storage unit of the server, such as a hard disk or memory of the server.
  • the memory 2 may also be an external storage device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), etc. Further, the storage 2 may also include both an internal storage unit of the server and an external storage device.
  • the memory 2 is used to store the computer program and other programs and data required by the fast imaging model training method.
  • the memory 2 can also be used to temporarily store data that has been output or will be output.
  • the disclosed device/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
  • components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunications signal
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
  • the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Magnetic Resonance Imaging Apparatus (AREA)

Abstract

A quick imaging model training method and apparatus, and a server. The method comprises: during each instance of model iteration training, carrying out under-sampling, according to an under-sampling mask, on an image obtained by means of magnetic resonance scanning, to obtain training data (S110); inputting the training data into a quick imaging model, performing feature extraction on the training data by means of N multi-granularity attention modules and according to multi-scale information and an attention mechanism of the image, and fusing a feature map extracted by each multi-granularity attention module (S120); performing image reconstruction on the fused feature map, and outputting imaging data (S130); reversely calculating a gradient according to the imaging data and a target label so as to update parameters of the quick imaging model and the under-sampling mask by means of the gradient (S140); and performing forward calculation by using the updated parameters and the updated under-sampling mask to output the next piece of imaging data (S150). The method solves the problems of it not being possible to optimize an under-sampling mask and an imaging effect being poor.

Description

快速成像模型的训练方法、装置及服务器Training method, device and server of fast imaging model 技术领域Technical field
本申请涉及磁共振扫描成像的技术领域,具体涉及一种快速成像模型的训练方法、装置及服务器。This application relates to the technical field of magnetic resonance scanning imaging, in particular to a training method, device and server for a fast imaging model.
背景技术Background technique
磁共振成像由于自身强大的功能,能提供丰富的解剖和功能信息,使得磁共振成像在医疗领域应用广泛。为进行磁共振成像,需在临床上对病人进行磁共振扫描。在扫描时,病人需长时间保持一个姿势不变,导致病人体验感差。因此需加快磁共振成像速度。在真实场景中,磁共振扫描仪需要以奈奎斯特采样频率对数据进行采样才能确保能够完全不失真地恢复数据。Due to its powerful functions, magnetic resonance imaging can provide a wealth of anatomical and functional information, making magnetic resonance imaging widely used in the medical field. In order to perform magnetic resonance imaging, the patient needs to be clinically scanned with magnetic resonance. During the scan, the patient needs to maintain a posture for a long time, resulting in a poor patient experience. Therefore, the speed of magnetic resonance imaging needs to be accelerated. In a real scene, the magnetic resonance scanner needs to sample the data at the Nyquist sampling frequency to ensure that the data can be restored without distortion.
在相关技术中,主要是基于深度学习构建磁共振快速成像方法。采用该方法进行成像的步骤主要为,考虑只采集部分数据,以不满足奈奎斯特采样定理的采样方式(高倍回顾性欠采样)对数据进行采样;对获得的欠采样数据进行填零操作得到零填充图像;将零填充图像输入深度学习网络,经过深度学习网络处理后输出恢复的高清图像。但由于基于深度学习构建的快速成像方法无法对应用于数据采样的欠采样掩膜进行学习,无法对欠采样掩膜进行优化;且基于深度学习构建的快速成像方法仅考虑了通道注意力,导致快速成像方法的成像效果不佳。In related technologies, the method of rapid magnetic resonance imaging is mainly constructed based on deep learning. The main steps of imaging using this method are to consider collecting only part of the data, sampling the data in a sampling method that does not meet the Nyquist sampling theorem (high-power retrospective under-sampling); performing zero-filling operations on the obtained under-sampling data Obtain a zero-filled image; input the zero-filled image into the deep learning network, and output the restored high-definition image after processing by the deep learning network. However, because the fast imaging method constructed based on deep learning cannot learn from the under-sampling mask used for data sampling, the under-sampling mask cannot be optimized; and the fast imaging method constructed based on deep learning only considers the channel attention, resulting in The imaging effect of the rapid imaging method is not good.
发明概述Summary of the invention
技术问题technical problem
本申请实施例的目的之一在于:提供一种快速成像模型的训练方法、装置及服务器,旨在解决无法对欠采样掩膜进行优化和成像时间长的问题。One of the objectives of the embodiments of the present application is to provide a fast imaging model training method, device, and server, aiming to solve the problems of the inability to optimize the under-sampling mask and the long imaging time.
问题的解决方案The solution to the problem
技术解决方案Technical solutions
为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above technical problems, the technical solutions adopted in the embodiments of this application are:
第一方面,提供了一种快速成像模型的训练方法,包括:In the first aspect, a training method for a fast imaging model is provided, including:
在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;In each iteration of the model training, under-sampling the image scanned by MRI according to the under-sampling mask to obtain training data;
将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The training data is input into a fast imaging model, the training data is extracted according to the multi-scale information of the image and the attention mechanism through N multi-granularity attention modules, and each of the multi-granularity attention modules is merged to extract Characteristic map of; N≥1;
对融合后的特征图进行图像重建,输出成像数据;Perform image reconstruction on the fused feature map and output imaging data;
根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;Reversely calculate gradients according to the imaging data and target tags, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradients;
采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data.
在一个实施例中,所述将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图,包括:In one embodiment, the training data is input to a fast imaging model, and features are extracted from the training data according to the multi-scale information of the image and the attention mechanism through N multi-granularity attention modules, and each of them is merged. The feature maps extracted by the multi-granularity attention module include:
提取所述训练数据的初始化特征数据;Extracting the initialization feature data of the training data;
对于每一所述多粒度注意力模块,根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;For each of the multi-granularity attention modules, perform feature extraction on the initialization feature data according to preset image scales, and fuse the extracted feature maps;
通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;Divide the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
融合所有所述区域图像,得到特征细化后的特征图。Fusion of all the regional images to obtain a feature map after feature refinement.
在一个实施例中,所述根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜,包括:In an embodiment, the step of calculating the gradient inversely according to the imaging data and the target label to update the parameters of the fast imaging model and the under-sampling mask through the gradient includes:
根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;Calculate gradients backwards according to the imaging data and the target tag to obtain a gradient matrix;
根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域图像的注意力权重。Updating the attention weight given to the several regional images by the multi-granularity attention mechanism according to the gradient matrix.
在一个实施例中,所述根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜,还包括:In an embodiment, the step of calculating the gradient inversely according to the imaging data and the target label to update the parameters of the fast imaging model and the under-sampling mask through the gradient further includes:
根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;Generating a continuous mask according to the under-sampling mask, and adding the continuous mask and the gradient matrix to obtain an updated continuous mask;
将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。Binarize the updated continuous mask to obtain an updated under-sampling mask.
在一个实施例中,所述快速成像模型包括学习所述欠采样掩膜的卷积层,根据所述欠采样掩膜对应设置所述卷积层的卷积核和参数;所述欠采样掩膜的初始值包括预设数量的低频采样条和随机采样的高频采样条。In one embodiment, the fast imaging model includes learning the convolutional layer of the under-sampling mask, and correspondingly setting the convolution kernel and parameters of the convolutional layer according to the under-sampling mask; the under-sampling mask The initial value of the film includes a preset number of low-frequency sampling strips and randomly sampled high-frequency sampling strips.
在一个实施例中,所述将所述更新后的连续型掩膜二值化的规则为:当所述更新后的连续型掩膜中的任一元素大于预设阈值时设为1;当所述更新后的连续型掩膜中的任一元素小于所述预设阈值时设为0;其中,所述预设阈值为所述更新后的连续型掩膜中最大值的预设百分比;所述预设百分比根据成像加速倍数设置。In an embodiment, the rule for binarizing the updated continuous mask is: set to 1 when any element in the updated continuous mask is greater than a preset threshold; when If any element in the updated continuous mask is less than the preset threshold, it is set to 0; wherein, the preset threshold is a preset percentage of the maximum value in the updated continuous mask; The preset percentage is set according to the imaging acceleration multiple.
在一个实施例中,所述根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据,包括:In an embodiment, the under-sampling of the image scanned by magnetic resonance according to the under-sampling mask to obtain training data includes:
根据所述欠采样掩膜对磁共振扫描到的图像进行欠采样,得到欠采样K空间数据;Performing under-sampling on the image scanned by magnetic resonance according to the under-sampling mask to obtain under-sampled K-space data;
对所述欠采样K空间数据进行傅里叶逆变换得到欠采样图像域数据,以作为所述训练数据。Performing an inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data as the training data.
在一个实施例中,对磁共振扫描到的所述图像进行傅里叶逆变换得到全采样图像域数据,以作为所述目标标签。In one embodiment, inverse Fourier transform is performed on the image scanned by magnetic resonance to obtain full-sample image domain data, which is used as the target tag.
第二方面,提供了一种快速成像模型的训练装置,包括:In the second aspect, a training device for a fast imaging model is provided, including:
训练数据生成模块,用于在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;The training data generation module is used for under-sampling the image scanned by MRI according to the under-sampling mask during each iteration of the model training to obtain training data;
模型训练模块,用于将所述训练数据输入快速成像模型进行模型训练,得到成像数据;The model training module is used to input the training data into the fast imaging model for model training to obtain imaging data;
特征提取模块,用于将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The feature extraction module is used to input the training data into the fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multiple The feature map extracted by the granular attention module; N≥1;
图像融合模块,用于对融合后的特征图进行图像重建,输出成像数据;The image fusion module is used to reconstruct the image of the fused feature map and output the imaging data;
前向计算模块,用于采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The forward calculation module is used for forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
在一个实施例中,所述特征提取模块包括:In an embodiment, the feature extraction module includes:
特征提取单元,用于提取所述训练数据的初始化特征数据。The feature extraction unit is used to extract the initialization feature data of the training data.
在一个实施例中,每一所述多粒度注意力模块包括:In an embodiment, each of the multi-granularity attention modules includes:
多尺度密集连接的特征融合单元,用于根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;The multi-scale densely connected feature fusion unit is used to perform feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps;
基于多粒度注意力机制的特征细化单元,用于通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;The feature refinement unit based on the multi-granularity attention mechanism is used to segment the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
融合图像单元,用于融合所有所述区域图像,得到特征细化后的特征图。The fusion image unit is used to fuse all the region images to obtain a feature map after feature refinement.
在一个实施例中,所述参数和欠采样掩膜更新模块包括:In an embodiment, the parameter and under-sampling mask update module includes:
梯度计算单元,用于根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;A gradient calculation unit, configured to reversely calculate a gradient according to the imaging data and the target tag to obtain a gradient matrix;
模型参数更新单元,用于根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域图像的注意力权重。The model parameter update unit is configured to update the attention weight given to the plurality of regional images by the multi-granularity attention mechanism according to the gradient matrix.
在一个实施例中,所述参数和欠采样掩膜更新模块还包括:In an embodiment, the parameter and under-sampling mask update module further includes:
欠采样掩膜更新单元,用于根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;An under-sampling mask updating unit, configured to generate a continuous mask according to the under-sampling mask, and add the continuous mask and the gradient matrix to obtain an updated continuous mask;
掩膜二值化单元,用于将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。The mask binarization unit is used to binarize the updated continuous mask to obtain an updated under-sampling mask.
第三方面,提供一种服务器,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现第一方面中快速成像模型的训练方法。In a third aspect, a server is provided, including: a memory, a processor, and a computer program stored in the memory and capable of being run on the processor. When the processor executes the computer program, the computer program in the first aspect is implemented. Training method of fast imaging model.
本申请实施例提供的一种快速成像模型的训练方法、装置及服务器的有益效果在于:通过在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;对融合后的特征图进行图像重建,输出成像数据;所述快速成像模型包括学习所述欠采样掩膜的神经网络层;根据所述成像数据与目标标签反向计算梯度,以通过所述梯度 更新所述快速成像模型的参数和所述欠采样掩膜;采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。通过将学习欠采样掩膜的神经网络嵌入快速成像模型中一起迭代训练,并根据成像数据与目标标签反向计算的梯度对应优化欠采样掩膜和模型参数,从而提高快速成像模型的成像速率。且快速成像模型中包括N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,充分利用图像的多粒度信息和区域注意力。增强成像数据中特征的表示,从而提高成像效果。The training method, device, and server of a fast imaging model provided by the embodiments of the application have the beneficial effect of: under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training to obtain training Data; input the training data into a fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multi-granularity attention modules The extracted feature map; N≥1; perform image reconstruction on the fused feature map, and output imaging data; the fast imaging model includes a neural network layer that learns the under-sampling mask; according to the imaging data and the target label Calculate the gradient backwards to update the parameters of the fast imaging model and the under-sampling mask through the gradient; use the updated parameters and the updated under-sampling mask to perform forward calculation to output the next Imaging data. By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model. And the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
发明的有益效果The beneficial effects of the invention
对附图的简要说明Brief description of the drawings
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments or exemplary technical descriptions. Obviously, the accompanying drawings in the following description are only of the present application. For some embodiments, those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1是本申请实施例一提供的快速成像模型的训练方法的流程示意图;FIG. 1 is a schematic flowchart of a method for training a fast imaging model provided in Embodiment 1 of the present application;
图2是本申请实施例一提供的快速成像模型的结构示意图;2 is a schematic structural diagram of a fast imaging model provided by Embodiment 1 of the present application;
图3是本申请实施例一提供的多粒度注意力模块的结构示意图;FIG. 3 is a schematic structural diagram of a multi-granularity attention module provided in Embodiment 1 of the present application;
图4是本申请实施例一提供的基于多粒度注意力机制的特征细化部分的结构示意图;4 is a schematic structural diagram of a feature refinement part based on a multi-granularity attention mechanism provided by Embodiment 1 of the present application;
图5是本申请实施例二提供的快速成像模型的训练方法的流程示意图;FIG. 5 is a schematic flowchart of a training method for a fast imaging model provided in Embodiment 2 of the present application;
图6是本申请实施例二提供的磁共振扫描成像过程的实施例示意图;6 is a schematic diagram of an embodiment of a magnetic resonance scanning imaging process provided in Embodiment 2 of the present application;
图7是本申请实施例三提供的快速成像模型的训练装置的结构示意图;FIG. 7 is a schematic structural diagram of a training device for a fast imaging model provided in Embodiment 3 of the present application;
图8是本申请实施例四提供的服务器的结构示意图。FIG. 8 is a schematic structural diagram of a server provided in Embodiment 4 of the present application.
发明实施例Invention embodiment
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以 解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, but not used to limit the application.
需说明的是,本申请的全文及上述附图中的术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含一系列步骤或单元的过程、方法或系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。术语“上”、“下”、“左”、“右”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。术语“第一”、“第二”仅用于便于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明技术特征的数量。“多个”的含义是两个或两个以上,除非另有明确具体的限定。It should be noted that the full text of the application and the above-mentioned drawings in the term "including" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes Other steps or units inherent in these processes, methods, products or equipment. The terms "upper", "lower", "left", "right", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for ease of description, and do not indicate or imply the device referred to. Or the element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation of the present application. For those of ordinary skill in the art, the specific meaning of the above terms can be understood according to specific conditions. The terms "first" and "second" are only used for ease of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features. The meaning of "plurality" means two or more than two, unless otherwise specifically defined.
为了说明本申请所述的技术方案,以下结合具体附图及实施例进行详细说明。In order to illustrate the technical solutions described in this application, detailed descriptions are given below in conjunction with specific drawings and embodiments.
实施例一Example one
如图1所示,是本申请实施例一提供的快速成像模型的训练方法的流程示意图。本实施例可适用于对磁共振扫描成像的应用场景,该方法可以由快速成像模型的训练装置执行,该装置可为服务器、智能终端、平板或PC等;在本申请实施例中以快速成像模型的训练装置作为执行主体进行说明,该方法具体包括如下步骤:As shown in FIG. 1, it is a schematic flowchart of a training method for a fast imaging model provided in Embodiment 1 of the present application. This embodiment can be applied to the application scenario of magnetic resonance scanning imaging. The method can be executed by a training device of a fast imaging model. The device can be a server, a smart terminal, a tablet or a PC, etc.; in this embodiment of the application, fast imaging is used. The training device of the model is explained as the main body of execution, and the method specifically includes the following steps:
S110、在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;S110: During each iteration of the model training, under-sampling the image scanned by the magnetic resonance according to the under-sampling mask to obtain training data;
在磁共振扫描成像过程中,获得扫描数据即全采样K空间数据。磁共振扫描仪需要以奈奎斯特采样频率对扫描数据进行采样生成图像,才能确保能够完全不失真地恢复数据。但以奈奎斯特采样频率对扫描数据进行采样这一过程缓慢,导致成像时间长。为加速上述数据采样过程以提高成像速度,可考虑只采集扫描数据中的部分数据,以低于奈奎斯特采样频率的采样率对数据进行采样即欠采样。在相关技术中存在多种欠采样方式,常用的方式有1D random(一维随机)方式,通过列数与K空间图像(扫描数据)相位编码方向长度一致的欠采样矩 阵即欠采样掩膜,与扫描数据相乘便能得到欠采样的图像。因此,可通过根据预设的欠采样掩膜对扫描数据进行欠采样得到成像所需的数据。During the MRI scan imaging process, the scan data, that is, the full sampling K-space data, is obtained. The magnetic resonance scanner needs to sample the scanned data at the Nyquist sampling frequency to generate images to ensure that the data can be restored without distortion. However, the process of sampling the scanned data at the Nyquist sampling frequency is slow, resulting in a long imaging time. In order to speed up the above-mentioned data sampling process and increase the imaging speed, it may be considered to collect only part of the scanned data, and sample the data at a sampling rate lower than the Nyquist sampling frequency, that is, under-sampling. There are many under-sampling methods in related technologies. The commonly used method is 1D random (one-dimensional random), which uses an under-sampling matrix whose number of columns is consistent with the length of the phase encoding direction of the K-space image (scan data), that is, the under-sampling mask. Multiply the scanned data to get an under-sampled image. Therefore, the data required for imaging can be obtained by under-sampling the scan data according to the preset under-sampling mask.
具体地,在某一次模型迭代训练时,若此次迭代训练过程为首次模型迭代训练过程,则根据欠采样掩膜的预设初始值对磁共振扫描到的图像进行欠采样,得到训练数据;若此次迭代训练过程不为首次模型迭代训练过程,则根据上一次迭代训练后更新的欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据。Specifically, during a certain iterative training of a model, if the iterative training process is the first model iterative training process, under-sampling the image scanned by magnetic resonance according to the preset initial value of the under-sampling mask to obtain training data; If this iterative training process is not the first model iterative training process, then the image scanned by the magnetic resonance is under-sampled according to the under-sampling mask updated after the previous iterative training to obtain training data.
S120、将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;S120. Input the training data into a fast imaging model, perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multi-granularity attention modules The extracted feature map; N≥1;
在一个实施示例中,如图2所示,为快速成像模型的结构示意图。该快速成像模型可为多粒度注意力网络,主要包括两个部分:特征提取部分21和重建部分22。在每一轮模型迭代训练过程中,将训练数据输入快速成像模型后,可先通过特征提取部分21中的一个卷积层提取训练数据的初始化特征数据。In an implementation example, as shown in FIG. 2, it is a schematic structural diagram of a fast imaging model. The fast imaging model can be a multi-granularity attention network, which mainly includes two parts: a feature extraction part 21 and a reconstruction part 22. In each iteration of the model training process, after the training data is input to the fast imaging model, the initial feature data of the training data can be extracted through a convolutional layer in the feature extraction part 21 first.
具体地,快速成像模型的特征提取部分还包括N个多粒度注意力模块23,N≥1;且每一多粒度注意力模块23中的参数有所不同,以添加更多的非线性运算,使结果更优化。可选的,N可为5。经由特征提取部分21中的一个卷积层提取到的初始化特征数据输入一个多粒度注意力模块23,根据图像的多尺度信息和注意力机制对所述初始化特征数据进行特征提取得到特征图像,然后将该特征图像输入至下一多粒度注意力模块23直至遍历N个多粒度注意力模块23。快速成像模型的特征提取部分还包括连接层,通过该连接层将每一所述多粒度注意力模块提取到的特征图融合在一起。由于每一所述多粒度注意力模块提取到的特征图产生了很多个通道的特征图,需由特征提取部分中的一个卷积层修改特征图的通道数量。通道数量修改后的特征图还需进行全局残差计算,防止由于模型网络层数过深而出现梯度消失,难以训练参数的问题。再将计算得到的特征图输入快速成像模型中的重建部分22以生成图像,增强了生成图像中特征的表示。Specifically, the feature extraction part of the fast imaging model also includes N multi-granularity attention modules 23, where N≥1; and the parameters in each multi-granularity attention module 23 are different to add more nonlinear operations. Make the result more optimized. Optionally, N can be 5. The initial feature data extracted through a convolutional layer in the feature extraction part 21 is input to a multi-granularity attention module 23, and the initial feature data is feature extracted according to the multi-scale information of the image and the attention mechanism to obtain the feature image, and then The feature image is input to the next multi-granularity attention module 23 until N multi-granularity attention modules 23 are traversed. The feature extraction part of the fast imaging model also includes a connection layer, through which the feature maps extracted by each of the multi-granularity attention modules are fused together. Since the feature maps extracted by each of the multi-granularity attention modules produce feature maps of many channels, one convolutional layer in the feature extraction part needs to modify the number of channels of the feature maps. The feature map after the number of channels is modified also needs to perform global residual calculation to prevent the problem of gradient disappearance due to too deep model network layers and difficulty in training parameters. The calculated feature map is then input into the reconstruction part 22 in the fast imaging model to generate an image, which enhances the representation of the features in the generated image.
在一个实施示例中,每一多粒度注意力模块根据图像的多尺度信息和注意力机 制对所述初始化特征数据进行特征提取的过程为:对于每一所述多粒度注意力模块,根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;融合所有所述区域图像,得到特征细化后的特征图。In an implementation example, the process for each multi-granularity attention module to perform feature extraction on the initial feature data according to the multi-scale information of the image and the attention mechanism is: for each of the multi-granularity attention modules, according to a preset Perform feature extraction on the initial feature data at several image scales, and fuse the extracted feature maps; divide the fused feature maps into several regional images with different attention weights through a multi-granularity attention mechanism; fuse all The area image is described, and the feature map after feature refinement is obtained.
具体地,每一多粒度注意力模块(multi-grained attention block)可包括两部分:基于多尺度密集连接的特征融合部分和基于多粒度注意力机制的特征细化部分;且每一多粒度注意力模块中都有一个本地残差连接。如图3所示,为多粒度注意力模块的结构示意图。由于不同尺度的视觉信息都会对成像有所帮助,基于多尺度密集连接的特征融合部分根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图。Specifically, each multi-grained attention block may include two parts: a feature fusion part based on multi-scale dense connection and a feature refinement part based on a multi-grained attention mechanism; and each multi-grained attention block There is a local residual connection in the force module. As shown in Figure 3, it is a schematic diagram of the structure of the multi-granularity attention module. Since visual information of different scales will be helpful for imaging, the feature fusion part based on multi-scale dense connection performs feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps.
在基于多尺度密集连接的特征融合部分中设有若干个单元,每一单元中具有两条路径,每一路径中均设有一个卷积层,根据预设的若干图像尺度对每一单元中的卷积层参数进行设置。可选的,基于多尺度密集连接的特征融合部分中设有3个单元,可分别采用卷积核为3x3的卷积层和卷积核为5X5的卷积层。初始化特征数据输入基于多尺度密集连接的特征融合部分后,经由一个单元中的两个卷积层对初始化特征数据进行卷积,然后通过连接层将两个卷积层的输出融合在一起,从而将包含不同尺度视觉信息的特征图综合在一起;融合得到的特征图像以密集连接的方式被输入到下一单元中继续进行卷积计算,直至遍历基于多尺度密集连接的特征融合部分中的3个单元。基于多尺度密集连接的特征融合部分融合提取到的若干特征图经由一个卷积核为1X1的卷积层卷积后输入基于多粒度注意力机制的特征细化部分。There are several units in the feature fusion part based on multi-scale dense connection, each unit has two paths, and each path is equipped with a convolutional layer. According to a number of preset image scales, each unit is The convolutional layer parameters are set. Optionally, there are 3 units in the feature fusion part based on multi-scale dense connection, and a convolution layer with a 3×3 convolution kernel and a convolution layer with a 5×5 convolution kernel may be used respectively. After the initial feature data is input based on the feature fusion part of multi-scale dense connection, the initial feature data is convolved through two convolutional layers in a unit, and then the outputs of the two convolutional layers are fused together through the connection layer, thus The feature maps containing visual information of different scales are integrated together; the feature images obtained by the fusion are input into the next unit in a densely connected manner to continue the convolution calculation, until traversing the 3 in the feature fusion part based on the multi-scale densely connected Units. Based on the feature fusion part of multi-scale dense connection, several feature maps extracted from the fusion are input into the feature refinement part based on the multi-granularity attention mechanism after convolution with a convolution kernel of 1X1.
具体地,基于多粒度注意力机制的特征细化部分可包括两个部分:挤压激励操作和多粒度注意力机制。如图4所示,为基于多粒度注意力机制的特征细化部分的结构示意图。输入基于多粒度注意力机制的特征细化部分的特征图通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像。多粒度注意力机制将输入的特征图分别以预设的多种不同的方式划分,每种划分方式形成对应数量的区域特征图。可选的,可预设三种不同的图像分割方式 ,分别为S=1、S=2和S=3。且被划分出来的区域图像均被赋予对应的注意力权重值,通过不同划分方式得到的区域图像之间的注意力权重值不相同。每一具有注意力权重的区域图像还需经过挤压激励操作,即经过对应的全局池化,然后经过两个带权重的卷积核为1X1的卷积层得到学习后的通道权重W 1和W 2;还需经过激活函数计算和一个点积操作,得到最后的注意力权重值。可选的,该激活函数可为Sigmoid激活函数。融合所有得到最后的注意力权重值的区域图像得到特征细化后的特征图。 Specifically, the feature refinement part based on the multi-granularity attention mechanism may include two parts: the squeeze excitation operation and the multi-granularity attention mechanism. As shown in Figure 4, it is a schematic diagram of the structure of the feature refinement part based on the multi-granularity attention mechanism. Input the feature map based on the feature refinement part of the multi-granularity attention mechanism through the multi-granular attention mechanism to divide the fused feature map into several regional images with different attention weights. The multi-granularity attention mechanism divides the input feature maps in a variety of preset ways, and each division way forms a corresponding number of regional feature maps. Optionally, three different image segmentation methods can be preset, which are S=1, S=2, and S=3, respectively. And the divided regional images are all given corresponding attention weight values, and the attention weight values of the regional images obtained by different division methods are not the same. Each regional image with attention weight also needs to go through the squeeze excitation operation, that is, go through the corresponding global pooling, and then go through two convolutional layers with weighted convolution kernels of 1X1 to obtain the learned channel weights W 1 and W 2 ; It also needs to go through activation function calculation and a dot product operation to get the final attention weight value. Optionally, the activation function may be a Sigmoid activation function. Fusion of all the regional images with the final attention weight value to obtain the feature map after feature refinement.
S130、对融合后的特征图进行图像重建,输出所述成像数据;S130: Perform image reconstruction on the fused feature map, and output the imaging data;
将训练数据输入快速成像模型的特征提取部分得到融合所有得到最后的注意力权重值的区域图像得到特征细化后的特征图后,快速成像模型的重建部分对特征细化后的特征图进行图像重建,输出所述成像数据。可选的,重建部分可由上采样层和卷积层组成。由于特征细化后的特征图与最终的真实图像(目标标签)维度大小并不一致,只有一半,特征细化后的特征图经由上采样层上采样将特征图恢复至与真实图像(目标标签)同样大小。上采样后的特征图再经过卷积层卷积得到成像数据。Input the training data into the feature extraction part of the fast imaging model to fuse all the regional images with the final attention weight value to obtain the feature map after feature refinement, and the reconstruction part of the fast imaging model to image the feature map after feature refinement Reconstruction, and output the imaging data. Optionally, the reconstruction part may be composed of an up-sampling layer and a convolutional layer. Since the feature map after feature refinement is inconsistent with the final real image (target label), there is only half of the dimension. The feature map after feature refinement is up-sampling through the upsampling layer to restore the feature map to the real image (target label) Same size. The up-sampled feature map is then convolved by the convolutional layer to obtain imaging data.
S140、根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;S140. Calculate the gradient in reverse according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient;
在每一轮模型迭代训练过程中,当获得快速成像模型对输入的训练数据进行成像计算输出的成像数据后,为根据此次模型训练输出的成像数据对快速成像模型的参数和欠采样掩膜进行优化,可根据此次模型训练输出的成像数据与预设的目标标签反向计算梯度,从而根据计算获得的梯度更新快速成像模型的参数和欠采样掩膜。In each round of model iterative training, when the fast imaging model performs imaging calculation on the input training data and the output imaging data, the parameters and under-sampling masks of the fast imaging model are determined based on the imaging data output from this model training. For optimization, the gradient can be calculated inversely based on the imaging data output from this model training and the preset target label, so as to update the parameters of the fast imaging model and the under-sampling mask according to the calculated gradient.
在一个实施示例中,根据所述成像数据与目标标签反向计算的梯度更新快速成像模型的参数的过程可为:根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域图像的注意力权重。In an implementation example, the process of updating the parameters of the fast imaging model according to the gradient calculated inversely between the imaging data and the target tag may be: calculating the gradient inversely according to the imaging data and the target tag to obtain a gradient matrix; The gradient matrix updates the attention weight given to the several regional images by the multi-granularity attention mechanism.
S150、采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。S150. Use the updated parameters and the updated under-sampling mask to perform forward calculation to output the next imaging data.
在每一轮模型迭代训练过程中,根据输出的成像数据与目标标签反向计算梯度更新快速成像模型的参数和欠采样掩膜后,完成此轮的模型迭代训练过程。采用更新后的参数和欠采样掩膜进行前向计算,以进行下一轮的模型迭代训练。In each round of model iterative training process, the parameters of the fast imaging model and the under-sampling mask are updated according to the output imaging data and the target label in reverse calculation of the gradient, and then the model iterative training process of this round is completed. The updated parameters and the under-sampling mask are used for forward calculation to perform the next round of model iterative training.
本申请实施例提供的一种快速成像模型的训练方法,通过在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;对融合后的特征图进行图像重建,输出成像数据;所述快速成像模型包括学习所述欠采样掩膜的神经网络层;根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。通过将学习欠采样掩膜的神经网络嵌入快速成像模型中一起迭代训练,并根据成像数据与目标标签反向计算的梯度对应优化欠采样掩膜和模型参数,从而提高快速成像模型的成像速率。且快速成像模型中包括N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,充分利用图像的多粒度信息和区域注意力。增强成像数据中特征的表示,从而提高成像效果。The training method of a fast imaging model provided by the embodiment of the application is to obtain training data by under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training; and input the training data The fast imaging model uses N multi-granularity attention modules to perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image, and fuse the feature maps extracted by each of the multi-granularity attention modules; N≥ 1; Perform image reconstruction on the fused feature map and output imaging data; the fast imaging model includes a neural network layer that learns the under-sampling mask; the gradient is calculated inversely according to the imaging data and the target label to pass all The gradient updates the parameters of the fast imaging model and the under-sampling mask; the updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data. By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model. And the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
实施例二Example two
如图5所示的是本申请实施例二提供的快速成像模型的训练方法的流程示意图。在实施例一的基础上,本实施例还提供了一种通过将学习欠采样掩膜的神经网络嵌入快速成像模型中一起迭代训练,实现欠采样掩膜的学习。该方法具体包括:FIG. 5 is a schematic flowchart of the training method of the fast imaging model provided in the second embodiment of the present application. On the basis of the first embodiment, this embodiment also provides a method of implementing the learning of the under-sampling mask by embedding the neural network for learning the under-sampling mask into the fast imaging model together with iterative training. The method specifically includes:
S210、在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;S210: During each iteration of the model training, under-sampling the image scanned by the magnetic resonance according to the under-sampling mask to obtain training data;
在相关技术中,可通过深度学习构建的快速成像模型根据欠采样得到的数据生成图像。若成像效果不佳,可通过多次迭代训练优化快速成像模型参数。但不论快速成像模型如何进行优化,输入模型的欠采样数据始终根据初始的欠采样掩膜进行欠采样获得,无法根据成像效果同时对欠采样掩膜进行优化。由于欠 采样掩膜与快速成像模型的成像速度有关,欠采样掩膜无法更新优化使得成像时间长。In related technologies, a fast imaging model that can be constructed through deep learning generates images based on data obtained by under-sampling. If the imaging effect is not good, the parameters of the fast imaging model can be optimized through multiple iteration training. However, no matter how the fast imaging model is optimized, the under-sampling data of the input model is always obtained by under-sampling according to the initial under-sampling mask, and the under-sampling mask cannot be optimized at the same time according to the imaging effect. Since the under-sampling mask is related to the imaging speed of the fast imaging model, the under-sampling mask cannot be updated and optimized, which makes the imaging time long.
为解决上述问题,快速成像模型中嵌入有学习欠采样掩膜的神经网络层,在每一次快速成像模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据。使得欠采样掩膜能够与快速成像模型都进行迭代训练,生成可学习的欠采样掩膜。In order to solve the above problems, the neural network layer that learns the under-sampling mask is embedded in the fast imaging model. When the fast imaging model is iteratively trained, the image scanned by magnetic resonance is under-sampled according to the under-sampling mask to obtain training data. . The under-sampling mask can be iteratively trained with the fast imaging model to generate a learnable under-sampling mask.
在一个实施示例中,快速成像模型包括学习欠采样掩膜的卷积层,该卷积层的卷积核和参数根据欠采样掩膜中包含的元素对应设置;欠采样掩膜的初始值包括预设数量的低频采样条和随机采样的高频采样条。在首次进行模型迭代训练时,可采用固定对扫描到的图像采样一定数量的中间部分,随机采样四周的一部分的欠采样方式,对应预设欠采样掩膜的初始值包括预设数量的低频采样条和随机采样的高频采样条。具体地,欠采样掩膜为二值化掩膜(即只包括0和1两种值),欠采样掩膜中采样条对应的元素为“1”,其余的元素为“0”。In an implementation example, the fast imaging model includes a convolutional layer that learns an under-sampling mask, and the convolution kernel and parameters of the convolutional layer are correspondingly set according to the elements contained in the under-sampling mask; the initial value of the under-sampling mask includes A preset number of low-frequency sampling strips and randomly sampled high-frequency sampling strips. When the model is iteratively trained for the first time, the under-sampling method of sampling a certain number of middle parts of the scanned image and randomly sampling a part of the surroundings can be adopted. The initial value corresponding to the preset under-sampling mask includes a preset number of low-frequency samples Strips and randomly sampled high-frequency sampling strips. Specifically, the under-sampling mask is a binarization mask (that is, only two values of 0 and 1 are included), the element corresponding to the sampling bar in the under-sampling mask is "1", and the remaining elements are "0".
在一个实施示例中,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据的具体过程可为:根据所述欠采样掩膜对磁共振扫描到的图像(全采样K空间数据)进行欠采样,得到欠采样K空间数据;对所述欠采样K空间数据进行傅里叶逆变换得到欠采样图像域数据,以作为所述训练数据。In an implementation example, the image scanned by magnetic resonance is under-sampled according to the under-sampling mask, and the specific process of obtaining training data may be: according to the under-sampling mask, the image scanned by magnetic resonance (full-sampled K-space Data) performing under-sampling to obtain under-sampled K-space data; performing inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data, which is used as the training data.
S220、将所述训练数据输入快速成像模型进行模型训练,得到成像数据;S220: Input the training data into a fast imaging model for model training, to obtain imaging data;
在每一轮模型迭代训练过程中,如图6所示为磁共振扫描成像过程的实施例示意图,根据欠采样掩膜对磁共振扫描到的图像进行欠采样得到训练数据后,将得到的训练数据输入快速成像模型进行模型训练得到成像数据,即根据训练数据进行成像计算生成重建图像。In each round of model iterative training process, as shown in Figure 6 is a schematic diagram of an embodiment of the magnetic resonance scanning imaging process. After under-sampling the image scanned by magnetic resonance according to the under-sampling mask, the training data will be obtained. Data is input to the fast imaging model for model training to obtain imaging data, that is, imaging calculations are performed according to the training data to generate reconstructed images.
S230、根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;S230. Calculate gradients inversely according to the imaging data and target tags, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradients;
在每一轮模型迭代训练过程中,当获得快速成像模型对输入的训练数据进行成像计算输出的成像数据后,为根据此次模型训练输出的成像数据对快速成像模型的参数和欠采样掩膜进行优化,可根据此次模型训练输出的成像数据与预设的目标标签反向计算梯度,从而根据计算获得的梯度更新快速成像模型的参数 和欠采样掩膜。In each round of model iterative training, when the fast imaging model performs imaging calculation on the input training data and the output imaging data, the parameters and under-sampling masks of the fast imaging model are determined based on the imaging data output from this model training. For optimization, the gradient can be calculated inversely based on the imaging data output from this model training and the preset target label, so as to update the parameters of the fast imaging model and the under-sampling mask according to the calculated gradient.
在一个实施示例中,根据模型训练输出的成像数据与预设的目标标签反向计算梯度,以更新欠采样掩膜的过程可为:根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。In an implementation example, the gradient is calculated backwards according to the imaging data output by the model training and the preset target label to update the under-sampling mask may be: the gradient is calculated backwards according to the imaging data and the target label, Obtain a gradient matrix; generate a continuous mask according to the under-sampling mask, add the continuous mask and the gradient matrix to obtain an updated continuous mask; combine the updated continuous mask Binarize to obtain the updated under-sampling mask.
可选的,可通过对磁共振扫描到的所述图像进行傅里叶逆变换得到全采样图像域数据,以作为预设的目标标签。根据目标标签与输出的成像数据的误差反向计算梯度得到梯度矩阵,然后根据梯度矩阵更新当前欠采样掩膜之前,还需根据当前欠采样掩膜生成连续型掩膜。若此次模型训练过程为首次模型迭代训练过程,则当前欠采样掩膜为初始值,可预设根据当前欠采样掩膜生成的连续型掩膜的采样条位置与当前欠采样掩膜一致,采样条位置的初始值来自一个均匀分布U(0.5,1),非采样条位置的初始值来自另外一个均匀分布U(0,0.5)。生成的连续型掩膜和计算得到的梯度矩阵大小相等,梯度矩阵中每一元素均为连续型掩膜中相应元素所需更新的梯度。之后采用生成的连续型掩膜与梯度矩阵相加得到更新后的连续型掩膜;将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜,从而可将更新后的欠采样掩膜用于下一轮快速成像模型训练过程。Optionally, the full-sampling image domain data can be obtained by performing inverse Fourier transform on the image scanned by magnetic resonance, which can be used as a preset target label. According to the error between the target label and the output imaging data, the gradient is calculated inversely to obtain the gradient matrix, and then the current undersampling mask needs to be generated according to the current undersampling mask before updating the current undersampling mask according to the gradient matrix. If this model training process is the first model iterative training process, the current under-sampling mask is the initial value, and the sampling strip position of the continuous mask generated according to the current under-sampling mask can be preset to be consistent with the current under-sampling mask. The initial value of the sampling strip position comes from a uniform distribution U(0.5, 1), and the initial value of the non-sampling strip position comes from another uniform distribution U(0, 0.5). The generated continuous mask and the calculated gradient matrix are equal in size, and each element in the gradient matrix is the gradient that the corresponding element in the continuous mask needs to update. After that, the generated continuous mask and the gradient matrix are added to obtain the updated continuous mask; the updated continuous mask is binarized to obtain the updated under-sampling mask, so that the updated continuous mask can be obtained. The under-sampling mask of is used in the next round of fast imaging model training process.
在一个实施示例中,将所述更新后的连续型掩膜二值化的规则为:当所述更新后的连续型掩膜中的任一元素大于预设阈值时设为1;当所述更新后的连续型掩膜中的任一元素小于所述预设阈值时设为0;其中,所述预设阈值为所述更新后的连续型掩膜中最大值的预设百分比;所述预设百分比根据成像加速倍数设置。In an implementation example, the rule for binarizing the updated continuous mask is: when any element in the updated continuous mask is greater than a preset threshold, set to 1; when the Any element in the updated continuous mask is set to 0 when it is less than the preset threshold; wherein, the preset threshold is a preset percentage of the maximum value in the updated continuous mask; The preset percentage is set according to the imaging acceleration multiple.
具体地,更新后的连续型掩膜按照上述规则进行二值化,将更新后的连续型掩膜中大于预设阈值的元素的值设为1;将更新后的连续型掩膜中小于预设阈值的元素的值设为0,从而得到更新后的欠采样掩膜。其中,所述预设阈值为更新后的连续型掩膜中最大值的预设百分比;且预设百分比根据成像加速倍数设置。可选的,成像加速倍数与百分比的对应关系可为加速倍数4对应25%,加速倍数8对应12.5%,加速倍数12对应8.3%,加速倍数16对应6.25%。从而通过更新优化 欠采样掩膜提高成像速度。Specifically, the updated continuous mask is binarized according to the above-mentioned rules, and the value of the element greater than the preset threshold in the updated continuous mask is set to 1, and the value of the updated continuous mask is smaller than the preset threshold. Set the value of the threshold element to 0 to obtain the updated under-sampling mask. Wherein, the preset threshold is a preset percentage of the maximum value in the continuous mask after the update; and the preset percentage is set according to the imaging acceleration multiple. Optionally, the corresponding relationship between the imaging acceleration factor and the percentage may be that acceleration factor 4 corresponds to 25%, acceleration factor 8 corresponds to 12.5%, acceleration factor 12 corresponds to 8.3%, and acceleration factor 16 corresponds to 6.25%. In order to improve the imaging speed by updating and optimizing the under-sampling mask.
S240、采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。S240: Perform forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
在每一轮模型迭代训练过程中,根据输出的成像数据与目标标签反向计算梯度更新快速成像模型的参数和欠采样掩膜后,完成此轮的模型迭代训练过程。采用更新后的参数和欠采样掩膜进行前向计算,以进行下一轮的模型迭代训练。In each round of model iterative training process, the parameters of the fast imaging model and the under-sampling mask are updated according to the output imaging data and the target label in reverse calculation of the gradient, and then the model iterative training process of this round is completed. The updated parameters and the under-sampling mask are used for forward calculation to perform the next round of model iterative training.
实施例三Example three
如图7所示的是本申请实施例三提供的快速成像模型的训练装置的结构示意图。在实施例一或二的基础上,本申请实施例还提供了一种训练装置7,该装置包括:FIG. 7 is a schematic structural diagram of a training device for a fast imaging model provided in Embodiment 3 of the present application. On the basis of Embodiment 1 or 2, an embodiment of the present application also provides a training device 7, which includes:
训练数据生成模块701,用于在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;The training data generation module 701 is used for under-sampling the image scanned by magnetic resonance according to the under-sampling mask during each iteration of the model training to obtain training data;
在一个实施示例中,在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据时,训练数据生成模块701包括:In an implementation example, during each model iteration training, the image scanned by the magnetic resonance is under-sampled according to the under-sampling mask, and when training data is obtained, the training data generation module 701 includes:
欠采样单元,用于根据所述欠采样掩膜对磁共振扫描到的图像进行欠采样,得到欠采样K空间数据;An under-sampling unit for under-sampling the image scanned by magnetic resonance according to the under-sampling mask to obtain under-sampled K-space data;
数据处理单元,用于对所述欠采样K空间数据进行傅里叶逆变换得到欠采样图像域数据,以作为所述训练数据;A data processing unit, configured to perform inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data as the training data;
目标标签生成单元,用于对磁共振扫描到的所述图像进行傅里叶逆变换得到全采样图像域数据,以作为所述目标标签。The target label generating unit is configured to perform inverse Fourier transform on the image scanned by magnetic resonance to obtain full-sampled image domain data, which is used as the target label.
特征提取模块702,用于将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The feature extraction module 702 is used to input the training data into a fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the training data. The feature map extracted by the multi-granularity attention module; N≥1;
图像融合模块703,用于对融合后的特征图进行图像重建,输出所述成像数据。The image fusion module 703 is configured to perform image reconstruction on the fused feature map, and output the imaging data.
在一个实施示例中,所述特征提取模块702包括:In an implementation example, the feature extraction module 702 includes:
特征提取单元,用于提取所述训练数据的初始化特征数据。The feature extraction unit is used to extract the initialization feature data of the training data.
在一个实施示例中,每一多粒度注意力模块包括:In an implementation example, each multi-granularity attention module includes:
多尺度密集连接的特征融合单元,用于根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;The multi-scale densely connected feature fusion unit is used to perform feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps;
基于多粒度注意力机制的特征细化单元,用于通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;The feature refinement unit based on the multi-granularity attention mechanism is used to segment the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
图像融合单元,用于融合所有所述区域图像,得到特征细化后的特征图。The image fusion unit is used to fuse all the regional images to obtain a feature map after feature refinement.
参数和欠采样掩膜更新模块704,用于根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;The parameter and under-sampling mask update module 704 is configured to calculate a gradient inversely according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient;
在一个实施示例中,根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜时,参数和欠采样掩膜更新模块704包括:In an implementation example, when the gradient is calculated inversely according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient, the parameter and under-sampling mask update module 704 include:
梯度计算单元,用于根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;A gradient calculation unit, configured to reversely calculate a gradient according to the imaging data and the target tag to obtain a gradient matrix;
模型参数更新单元,用于根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域图像的注意力权重。The model parameter update unit is configured to update the attention weight given to the plurality of regional images by the multi-granularity attention mechanism according to the gradient matrix.
欠采样掩膜更新单元,用于根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;An under-sampling mask updating unit, configured to generate a continuous mask according to the under-sampling mask, and add the continuous mask and the gradient matrix to obtain an updated continuous mask;
掩膜二值化单元,用于将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。The mask binarization unit is used to binarize the updated continuous mask to obtain an updated under-sampling mask.
前向计算模块705,用于采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The forward calculation module 705 is configured to use the updated parameter and the updated under-sampling mask to perform forward calculation to output the next imaging data.
本申请实施例提供的一种快速成像模型的训练装置,通过在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;对融合后的特征图进行图像重建,输出成像数据;所述快速成像模型包括学习所述欠采样掩膜的神经网络层;根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;采用更新后的参数和更新后的欠采样掩膜进行前向计算,以 输出下一所述成像数据。通过将学习欠采样掩膜的神经网络嵌入快速成像模型中一起迭代训练,并根据成像数据与目标标签反向计算的梯度对应优化欠采样掩膜和模型参数,从而提高快速成像模型的成像速率。且快速成像模型中包括N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,充分利用图像的多粒度信息和区域注意力。增强成像数据中特征的表示,从而提高成像效果。The training device for a fast imaging model provided by an embodiment of the present application obtains training data by under-sampling images scanned by magnetic resonance according to an under-sampling mask during each iteration of the model training; and inputting the training data The fast imaging model uses N multi-granularity attention modules to perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image, and fuse the feature maps extracted by each of the multi-granularity attention modules; N≥ 1; Perform image reconstruction on the fused feature map and output imaging data; the fast imaging model includes a neural network layer that learns the under-sampling mask; the gradient is calculated inversely according to the imaging data and the target label to pass all The gradient updates the parameters of the fast imaging model and the under-sampling mask; the updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data. By embedding the neural network that learns the under-sampling mask into the fast imaging model, iteratively trains together, and optimizes the under-sampling mask and model parameters according to the gradient of the imaging data and the target label inversely calculated, thereby improving the imaging rate of the fast imaging model. And the fast imaging model includes N multi-granularity attention modules to extract features of the training data according to the multi-scale information and attention mechanism of the image, and make full use of the multi-granularity information and regional attention of the image. Enhance the representation of features in the imaging data, thereby improving the imaging effect.
实施例四Example four
图8是本申请实施例四提供的服务器的结构示意图。该服务器包括:处理器1、存储器2以及存储在所述存储器2中并可在所述处理器1上运行的计算机程序3,例如快速成像模型的训练方法的程序。所述处理器1执行所述计算机程序3时实现上述快速成像模型的训练方法实施例中的步骤,例如图1所示的步骤S110至S150。FIG. 8 is a schematic structural diagram of a server provided in Embodiment 4 of the present application. The server includes: a processor 1, a memory 2, and a computer program 3 stored in the memory 2 and running on the processor 1, such as a program for a training method of a fast imaging model. When the processor 1 executes the computer program 3, the steps in the above-mentioned fast imaging model training method embodiment are implemented, for example, steps S110 to S150 shown in FIG. 1.
示例性的,所述计算机程序3可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器2中,并由所述处理器1执行,以完成本申请。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序3在所述服务器中的执行过程。例如,所述计算机程序3可以被分割成训练数据生成模块、特征提取模块、图像融合模块、参数和欠采样掩膜更新模块和前向计算模块,各模块具体功能如下:Exemplarily, the computer program 3 may be divided into one or more modules, and the one or more modules are stored in the memory 2 and executed by the processor 1 to complete the application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 3 in the server. For example, the computer program 3 can be divided into a training data generation module, a feature extraction module, an image fusion module, a parameter and under-sampling mask update module, and a forward calculation module. The specific functions of each module are as follows:
训练数据生成模块,用于在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;The training data generation module is used for under-sampling the image scanned by MRI according to the under-sampling mask during each iteration of the model training to obtain training data;
特征提取模块,用于将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The feature extraction module is used to input the training data into the fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multiple The feature map extracted by the granular attention module; N≥1;
图像融合模块,用于对融合后的特征图进行图像重建,输出成像数据;The image fusion module is used to reconstruct the image of the fused feature map and output the imaging data;
参数和欠采样掩膜更新模块,用于根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;The parameter and under-sampling mask update module is used to calculate a gradient inversely according to the imaging data and the target tag, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradient;
前向计算模块,用于采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The forward calculation module is used for forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
所述服务器可包括,但不仅限于,处理器1、存储器2以及存储在所述存储器2中的计算机程序3。本领域技术人员可以理解,图8仅仅是服务器的示例,并不构成对服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述服务器还可以包括输入输出设备、网络接入设备、总线等。The server may include, but is not limited to, a processor 1, a memory 2, and a computer program 3 stored in the memory 2. Those skilled in the art can understand that FIG. 8 is only an example of a server, and does not constitute a limitation on the server. It may include more or less components than those shown in the figure, or a combination of certain components, or different components, such as the The server may also include input and output devices, network access devices, buses, and so on.
所述处理器1可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 1 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器2可以是所述服务器的内部存储单元,例如服务器的硬盘或内存。所述存储器2也可以是外部存储设备,例如服务器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器2还可以既包括服务器的内部存储单元也包括外部存储设备。所述存储器2用于存储所述计算机程序以及快速成像模型的训练方法所需的其他程序和数据。所述存储器2还可以用于暂时地存储已经输出或者将要输出的数据。The storage 2 may be an internal storage unit of the server, such as a hard disk or memory of the server. The memory 2 may also be an external storage device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), etc. Further, the storage 2 may also include both an internal storage unit of the server and an external storage device. The memory 2 is used to store the computer program and other programs and data required by the fast imaging model training method. The memory 2 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only used to facilitate distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对 象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
以上仅为本申请的可选实施例而已,并不用于限制本申请。对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only optional embodiments of the application, and are not used to limit the application. For those skilled in the art, this application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.

Claims (14)

  1. 一种快速成像模型的训练方法,其特征在于,包括:A method for training a fast imaging model, which is characterized in that it includes:
    在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;In each iteration of the model training, under-sampling the image scanned by MRI according to the under-sampling mask to obtain training data;
    将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The training data is input into a fast imaging model, the training data is extracted according to the multi-scale information of the image and the attention mechanism through N multi-granularity attention modules, and each of the multi-granularity attention modules is merged to extract Characteristic map of; N≥1;
    对融合后的特征图进行图像重建,输出成像数据;Perform image reconstruction on the fused feature map and output imaging data;
    根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜;Reversely calculate gradients according to the imaging data and target tags, so as to update the parameters of the fast imaging model and the under-sampling mask through the gradients;
    采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The updated parameters and the updated under-sampling mask are used for forward calculation to output the next imaging data.
  2. 根据权利要求1所述的快速成像模型的训练方法,其特征在于,所述将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图,包括:The method for training a fast imaging model according to claim 1, wherein the training data is input to the fast imaging model, and the N multi-granularity attention modules are used to compare the training data according to the multi-scale information of the image and the attention mechanism. Perform feature extraction on the training data, and merge the feature maps extracted by each of the multi-granularity attention modules, including:
    提取所述训练数据的初始化特征数据;Extracting the initialization feature data of the training data;
    对于每一所述多粒度注意力模块,根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;For each of the multi-granularity attention modules, perform feature extraction on the initialization feature data according to preset image scales, and fuse the extracted feature maps;
    通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;Divide the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
    融合所有所述区域图像,得到特征细化后的特征图。Fusion of all the regional images to obtain a feature map after feature refinement.
  3. 根据权利要求2所述的快速成像模型的训练方法,其特征在于,所述根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜,包括:The method for training a fast imaging model according to claim 2, wherein the gradient is calculated inversely according to the imaging data and the target label, so as to update the parameters of the fast imaging model and the under-developed image through the gradient. Sampling mask, including:
    根据所述成像数据与所述目标标签反向计算梯度,得到梯度矩阵;Calculate gradients backwards according to the imaging data and the target tag to obtain a gradient matrix;
    根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域 图像的注意力权重。According to the gradient matrix, the attention weight given to the several regional images by the multi-granularity attention mechanism is updated.
  4. 根据权利要求3所述的快速成像模型的训练方法,其特征在于,所述根据所述成像数据与目标标签反向计算梯度,以通过所述梯度更新所述快速成像模型的参数和所述欠采样掩膜,还包括:The method for training a fast imaging model according to claim 3, wherein the gradient is calculated inversely according to the imaging data and the target label, so as to update the parameters of the fast imaging model and the under-developed image through the gradient. The sampling mask also includes:
    根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;Generating a continuous mask according to the under-sampling mask, and adding the continuous mask and the gradient matrix to obtain an updated continuous mask;
    将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。Binarize the updated continuous mask to obtain an updated under-sampling mask.
  5. 根据权利要求4所述的快速成像模型的训练方法,其特征在于,所述快速成像模型包括学习所述欠采样掩膜的卷积层,根据所述欠采样掩膜对应设置所述卷积层的卷积核和参数;所述欠采样掩膜的初始值包括预设数量的低频采样条和随机采样的高频采样条。The method for training a fast imaging model according to claim 4, wherein the fast imaging model comprises learning a convolutional layer of the under-sampling mask, and correspondingly setting the convolutional layer according to the under-sampling mask The convolution kernel and parameters; the initial value of the under-sampling mask includes a preset number of low-frequency sampling strips and randomly sampled high-frequency sampling strips.
  6. 根据权利要求4所述的快速成像模型的训练方法,其特征在于,所述将所述更新后的连续型掩膜二值化的规则为:当所述更新后的连续型掩膜中的任一元素大于预设阈值时设为1;当所述更新后的连续型掩膜中的任一元素小于所述预设阈值时设为0;其中,所述预设阈值为所述更新后的连续型掩膜中最大值的预设百分比;所述预设百分比根据成像加速倍数设置。The method for training a fast imaging model according to claim 4, wherein the rule for binarizing the updated continuous mask is: when any of the updated continuous masks When an element is greater than the preset threshold, set to 1; when any element in the updated continuous mask is less than the preset threshold, set to 0; wherein, the preset threshold is the updated The preset percentage of the maximum value in the continuous mask; the preset percentage is set according to the imaging acceleration multiple.
  7. 根据权利要求1至6任一项所述的快速成像模型的训练方法,其特征在于,所述根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据,包括:The method for training a fast imaging model according to any one of claims 1 to 6, wherein the under-sampling of the image scanned by magnetic resonance according to the under-sampling mask to obtain training data comprises:
    根据所述欠采样掩膜对磁共振扫描到的图像进行欠采样,得到欠采样K空间数据;Performing under-sampling on the image scanned by magnetic resonance according to the under-sampling mask to obtain under-sampled K-space data;
    对所述欠采样K空间数据进行傅里叶逆变换得到欠采样图像域数据,以作为所述训练数据。Performing an inverse Fourier transform on the under-sampled K-space data to obtain under-sampled image domain data as the training data.
  8. 根据权利要求7所述的快速成像模型的训练方法,其特征在于,对磁共振扫描到的所述图像进行傅里叶逆变换得到全采样图像域数据,以作为所述目标标签。The method for training a fast imaging model according to claim 7, wherein the inverse Fourier transform is performed on the image scanned by magnetic resonance to obtain fully sampled image domain data, which is used as the target label.
  9. 一种快速成像模型的训练装置,其特征在于,包括:A training device for a fast imaging model, which is characterized in that it comprises:
    训练数据生成模块,用于在每一次模型迭代训练时,根据欠采样掩膜对磁共振扫描到的图像进行欠采样,得到训练数据;The training data generation module is used for under-sampling the image scanned by MRI according to the under-sampling mask during each iteration of the model training to obtain training data;
    模型训练模块,用于将所述训练数据输入快速成像模型进行模型训练,得到成像数据;The model training module is used to input the training data into the fast imaging model for model training to obtain imaging data;
    特征提取模块,用于将所述训练数据输入快速成像模型,通过N个多粒度注意力模块根据图像的多尺度信息和注意力机制对所述训练数据进行特征提取,并融合每一所述多粒度注意力模块提取到的特征图;N≥1;The feature extraction module is used to input the training data into the fast imaging model, and perform feature extraction on the training data according to the multi-scale information and attention mechanism of the image through N multi-granularity attention modules, and fuse each of the multiple The feature map extracted by the granular attention module; N≥1;
    图像融合模块,用于对融合后的特征图进行图像重建,输出成像数据;The image fusion module is used to reconstruct the image of the fused feature map and output the imaging data;
    前向计算模块,用于采用更新后的参数和更新后的欠采样掩膜进行前向计算,以输出下一所述成像数据。The forward calculation module is used for forward calculation using the updated parameters and the updated under-sampling mask to output the next imaging data.
  10. 根据权利要求9所述的快速成像模型的训练装置,其特征在于,所述特征提取模块包括:The training device for a fast imaging model according to claim 9, wherein the feature extraction module comprises:
    特征提取单元,用于提取所述训练数据的初始化特征数据。The feature extraction unit is used to extract the initialization feature data of the training data.
  11. 根据权利要求10所述的快速成像模型的训练装置,其特征在于,每一所述多粒度注意力模块包括:The training device for a fast imaging model according to claim 10, wherein each of the multi-granularity attention modules comprises:
    多尺度密集连接的特征融合单元,用于根据预设的若干图像尺度对所述初始化特征数据进行特征提取,并融合提取到的若干特征图;The multi-scale densely connected feature fusion unit is used to perform feature extraction on the initial feature data according to several preset image scales, and fuse several extracted feature maps;
    基于多粒度注意力机制的特征细化单元,用于通过多粒度注意力机制将融合后的特征图分割为若干具有不同注意力权重的区域图像;The feature refinement unit based on the multi-granularity attention mechanism is used to segment the fused feature map into several regional images with different attention weights through the multi-granularity attention mechanism;
    融合图像单元,用于融合所有所述区域图像,得到特征细化后的特征图。The fusion image unit is used to fuse all the region images to obtain a feature map after feature refinement.
  12. 根据权利要求11所述的快速成像模型的训练装置,其特征在于,所述参数和欠采样掩膜更新模块包括:The fast imaging model training device according to claim 11, wherein the parameter and under-sampling mask update module comprises:
    梯度计算单元,用于根据所述成像数据与所述目标标签反向计算 梯度,得到梯度矩阵;A gradient calculation unit, configured to reversely calculate a gradient according to the imaging data and the target tag to obtain a gradient matrix;
    模型参数更新单元,用于根据所述梯度矩阵更新所述多粒度注意力机制赋予所述若干区域图像的注意力权重。The model parameter update unit is configured to update the attention weight given to the plurality of regional images by the multi-granularity attention mechanism according to the gradient matrix.
  13. 根据权利要求12所述的快速成像模型的训练装置,其特征在于,所述参数和欠采样掩膜更新模块还包括:The fast imaging model training device according to claim 12, wherein the parameter and under-sampling mask update module further comprises:
    欠采样掩膜更新单元,用于根据所述欠采样掩膜生成连续型掩膜,将所述连续型掩膜与所述梯度矩阵相加得到更新后的连续型掩膜;An under-sampling mask updating unit, configured to generate a continuous mask according to the under-sampling mask, and add the continuous mask and the gradient matrix to obtain an updated continuous mask;
    掩膜二值化单元,用于将所述更新后的连续型掩膜二值化,得到更新后的欠采样掩膜。The mask binarization unit is used to binarize the updated continuous mask to obtain an updated under-sampling mask.
  14. 一种服务器,其特征在于,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至8任一项所述快速成像模型的训练方法的步骤。A server, characterized in that it includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to achieve The steps of the training method of the fast imaging model described in any one of 1 to 8 are required.
PCT/CN2019/119097 2019-11-18 2019-11-18 Quick imaging model training method and apparatus, and server WO2021097594A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119097 WO2021097594A1 (en) 2019-11-18 2019-11-18 Quick imaging model training method and apparatus, and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119097 WO2021097594A1 (en) 2019-11-18 2019-11-18 Quick imaging model training method and apparatus, and server

Publications (1)

Publication Number Publication Date
WO2021097594A1 true WO2021097594A1 (en) 2021-05-27

Family

ID=75979955

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119097 WO2021097594A1 (en) 2019-11-18 2019-11-18 Quick imaging model training method and apparatus, and server

Country Status (1)

Country Link
WO (1) WO2021097594A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107182216A (en) * 2015-12-30 2017-09-19 中国科学院深圳先进技术研究院 A kind of rapid magnetic resonance imaging method and device based on depth convolutional neural networks
CN109584248A (en) * 2018-11-20 2019-04-05 西安电子科技大学 Infrared surface object instance dividing method based on Fusion Features and dense connection network
CN109636721A (en) * 2018-11-29 2019-04-16 武汉大学 Video super-resolution method based on confrontation study and attention mechanism
CN110415815A (en) * 2019-07-19 2019-11-05 银丰基因科技有限公司 The hereditary disease assistant diagnosis system of deep learning and face biological information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107182216A (en) * 2015-12-30 2017-09-19 中国科学院深圳先进技术研究院 A kind of rapid magnetic resonance imaging method and device based on depth convolutional neural networks
CN109584248A (en) * 2018-11-20 2019-04-05 西安电子科技大学 Infrared surface object instance dividing method based on Fusion Features and dense connection network
CN109636721A (en) * 2018-11-29 2019-04-16 武汉大学 Video super-resolution method based on confrontation study and attention mechanism
CN110415815A (en) * 2019-07-19 2019-11-05 银丰基因科技有限公司 The hereditary disease assistant diagnosis system of deep learning and face biological information

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WANG SHANSHAN, TAN SHA, GAO YUAN, LIU QIEGEN, YING LESLIE, XIAO TAOHUI, LIU YUANYUAN, LIU XIN, ZHENG HAIRONG, LIANG DONG: "Learning Joint-Sparse Codes for Calibration-Free Parallel MR Imaging", IEEE TRANSACTIONS ON MEDICAL IMAGING, IEEE SERVICE CENTER, PISCATAWAY, NJ., US, vol. 37, no. 1, 1 January 2018 (2018-01-01), US, pages 251 - 261, XP055812994, ISSN: 0278-0062, DOI: 10.1109/TMI.2017.2746086 *
ZHANG CHAOXIA: "Research on Optimal Angiographic Viewing Angles for the Segment of Interest and Arterial Motion Estimation based on MSCT", CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE, MEDICINE AND HEALTH SCIENCES, 1 December 2011 (2011-12-01), XP055813002 *

Similar Documents

Publication Publication Date Title
CN111091604B (en) Training method and device of rapid imaging model and server
CN111615702B (en) Method, device and equipment for extracting structured data from image
WO2019167884A1 (en) Machine learning method and device, program, learned model, and identification device
CN110598714A (en) Cartilage image segmentation method and device, readable storage medium and terminal equipment
CN109633502B (en) Magnetic resonance rapid parameter imaging method and device
CN110838085B (en) Super-resolution reconstruction method and device for image and electronic equipment
CN111091521A (en) Image processing method and device, electronic equipment and computer readable storage medium
JP6612486B1 (en) Learning device, classification device, learning method, classification method, learning program, and classification program
CN110738235A (en) Pulmonary tuberculosis determination method, pulmonary tuberculosis determination device, computer device, and storage medium
Muhammad et al. Multi-scale Xception based depthwise separable convolution for single image super-resolution
CN115272250B (en) Method, apparatus, computer device and storage medium for determining focus position
CN110084809B (en) Diabetic retinopathy data processing method and device and electronic equipment
CN111161386A (en) Ultrasonic image rendering method and device and ultrasonic equipment
Graham et al. Unsupervised 3d out-of-distribution detection with latent diffusion models
WO2019109410A1 (en) Fully convolutional network model training method for splitting abnormal signal region in mri image
Jobst et al. Efficient MPS representations and quantum circuits from the Fourier modes of classical image data
WO2021097594A1 (en) Quick imaging model training method and apparatus, and server
Bricman et al. CocoNet: A deep neural network for mapping pixel coordinates to color values
CN113723515B (en) Moire pattern recognition method, device, equipment and medium based on image recognition
Zhou et al. Directional relative total variation for structure–texture decomposition
CN113592724A (en) Target face image restoration method and device
CN117456562B (en) Attitude estimation method and device
Zhang et al. Salient detection network for lung nodule detection in 3D Thoracic MRI Images
KR102215902B1 (en) Method of correcting an image and apparatuses performing the same
CN115375626B (en) Medical image segmentation method, system, medium and device based on physical resolution

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19953566

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19953566

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 19953566

Country of ref document: EP

Kind code of ref document: A1