CN118397059B - Model training method and registration method for multimodal image enhancement and registration - Google Patents

Model training method and registration method for multimodal image enhancement and registration Download PDF

Info

Publication number
CN118397059B
CN118397059B CN202410840678.4A CN202410840678A CN118397059B CN 118397059 B CN118397059 B CN 118397059B CN 202410840678 A CN202410840678 A CN 202410840678A CN 118397059 B CN118397059 B CN 118397059B
Authority
CN
China
Prior art keywords
image
processed
matrix
feature matrix
images
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202410840678.4A
Other languages
Chinese (zh)
Other versions
CN118397059A (en
Inventor
商睿哲
董家铭
王新怀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN202410840678.4A priority Critical patent/CN118397059B/en
Publication of CN118397059A publication Critical patent/CN118397059A/en
Application granted granted Critical
Publication of CN118397059B publication Critical patent/CN118397059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/38Registration of image sequences
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10088Magnetic resonance imaging [MRI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明提供一种用于多模态影像增强与配准的模型训练方法及配准方法,训练方法包括:获取待处理的MR影像序列和待处理的CT影像序列,根据待处理MR影像和待处理CT影像的互信息得到M组匹配影像对,并选取若干组匹配影像对作为训练集;在训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型。本发明所得到的训练好的目标影像序列增强模型可以生成与CT影像匹配的MR影像,有利于提高影像三维重建的精度。

The present invention provides a model training method and a registration method for multimodal image enhancement and registration, the training method comprising: obtaining an MR image sequence to be processed and a CT image sequence to be processed, obtaining M groups of matching image pairs according to the mutual information of the MR image to be processed and the CT image to be processed, and selecting several groups of matching image pairs as training sets; selecting two MR images to be processed and one CT image to be processed in the training set, inputting the selected two MR images to be processed, one CT image to be processed and a Gaussian noise image into a target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained and obtain a trained target image sequence enhancement model. The trained target image sequence enhancement model obtained by the present invention can generate an MR image matching the CT image, which is conducive to improving the accuracy of three-dimensional reconstruction of the image.

Description

用于多模态影像增强与配准的模型训练方法及配准方法Model training method and registration method for multimodal image enhancement and registration

技术领域Technical Field

本发明属于图像处理技术领域,具体涉及一种用于多模态影像增强与配准的模型训练方法及配准方法。The present invention belongs to the technical field of image processing, and in particular relates to a model training method and a registration method for multimodal image enhancement and registration.

背景技术Background Art

计算机辅助与医学影像学技术早已成为骨肿瘤保肢手术领域的重要组成部分,能够帮助医生完成手术入路规划、个性化方案制定、术前模拟等工作,显著提高保肢成功率。目前普遍以手动或半自动标记肿瘤的方式分析影像,这耗费了外科医生大量的时间与精力,因此利用近年来快速发展的深度学习技术进行肿瘤分割研究势在必行。Computer-assisted and medical imaging technology has long been an important part of bone tumor limb-salvage surgery, helping doctors complete surgical approach planning, personalized plan formulation, preoperative simulation, and other tasks, significantly improving the success rate of limb-salvage. Currently, images are generally analyzed by manually or semi-automatically marking tumors, which consumes a lot of surgeons' time and energy. Therefore, it is imperative to use the rapidly developed deep learning technology in recent years to conduct tumor segmentation research.

在这一过程中,深度学习技术对训练数据量的较高要求与医学影像数量受限之间存在矛盾,尤其在利用多模态影像进行分析时,不同影像间数据量不匹配会导致可用数据量的进一步减少,从而加大后续操作的难度,影响肿瘤分割效果。同时,不同模态的影像数据也需要进行配准以提供有效信息。In this process, there is a contradiction between the high requirements of deep learning technology for the amount of training data and the limited number of medical images. Especially when using multimodal images for analysis, the mismatch of data between different images will lead to a further reduction in the amount of available data, thereby increasing the difficulty of subsequent operations and affecting the tumor segmentation effect. At the same time, image data of different modalities also need to be registered to provide effective information.

因此,如何合成可靠的MR(Magnetic Resonance,磁共振)影像并将其在CT(Computed Tomography,电子计算机断层扫描)影像序列中进行对应成为一个亟待解决的问题。Therefore, how to synthesize reliable MR (Magnetic Resonance) images and correspond them in CT (Computed Tomography) image sequences has become a problem that needs to be solved urgently.

发明内容Summary of the invention

本发明的目的在于针对上述现有技术的不足,提出一种用于多模态影像增强与配准的模型训练方法及配准方法。本发明要解决的技术问题通过以下技术方案实现:The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and to propose a model training method and a registration method for multimodal image enhancement and registration. The technical problem to be solved by the present invention is achieved through the following technical solutions:

本发明提供一种用于多模态影像增强与配准的模型训练方法,所述训练方法包括:The present invention provides a model training method for multimodal image enhancement and registration, the training method comprising:

获取待处理的MR影像序列和待处理的CT影像序列,其中,所述待处理的MR影像序列包括按顺序排列的M张待处理MR影像,所述待处理的CT影像序列包括按顺序排列的N张待处理CT影像,M和N均为大于0的整数;Acquire an MR image sequence to be processed and a CT image sequence to be processed, wherein the MR image sequence to be processed includes M MR images to be processed arranged in sequence, and the CT image sequence to be processed includes N CT images to be processed arranged in sequence, and both M and N are integers greater than 0;

根据所述待处理MR影像和所述待处理CT影像的互信息,得到M组匹配影像对,并从M组所述匹配影像对中选取若干组所述匹配影像对作为训练集,每组所述匹配影像对包括相互匹配的一张待处理MR影像和一张所述待处理CT影像;According to the mutual information between the MR image to be processed and the CT image to be processed, M groups of matching image pairs are obtained, and several groups of matching image pairs are selected from the M groups of matching image pairs as training sets, each group of matching image pairs including one MR image to be processed and one CT image to be processed that match each other;

在所述训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对所述待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型,所述训练好的目标影像序列增强模型用于对待配准CT影像进行匹配,得到配准的MR影像;其中,在所述训练集中选取的两张待处理MR影像与所选取的待处理CT影像均不匹配;目标影像序列增强模型为基于生成对抗网络的模型。Two MR images to be processed and one CT image to be processed are selected from the training set, and the selected two MR images to be processed, one CT image to be processed and a Gaussian noise image are input into the target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained and obtain a trained target image sequence enhancement model, and the trained target image sequence enhancement model is used to match the CT image to be registered to obtain a registered MR image; wherein, the two MR images to be processed selected from the training set do not match the selected CT image to be processed; and the target image sequence enhancement model is a model based on a generative adversarial network.

在本发明的一个实施例中,获取待处理的MR影像序列和待处理的CT影像序列,包括:In one embodiment of the present invention, obtaining a to-be-processed MR image sequence and a to-be-processed CT image sequence includes:

获取初始MR影像序列和初始CT影像序列,其中,所述初始MR影像序列包括M张初始MR影像,所述初始CT影像序列包括N张初始CT影像;Acquire an initial MR image sequence and an initial CT image sequence, wherein the initial MR image sequence includes M initial MR images, and the initial CT image sequence includes N initial CT images;

将所述初始MR影像和所述初始CT影像的亮度值均转化为灰度值,得到MR灰度影像和CT灰度影像;Converting the brightness values of the initial MR image and the initial CT image into grayscale values to obtain an MR grayscale image and a CT grayscale image;

采用直方图均衡化算法分别重新分配所述MR灰度影像和所述CT灰度影像的灰度值,使所述MR灰度影像和所述CT灰度影像的灰度值均在预设范围内均匀分布,得到MR均匀分布影像和CT均匀分布影像;A histogram equalization algorithm is used to redistribute the grayscale values of the MR grayscale image and the CT grayscale image, respectively, so that the grayscale values of the MR grayscale image and the CT grayscale image are uniformly distributed within a preset range, thereby obtaining an MR uniformly distributed image and a CT uniformly distributed image;

分别将所述MR均匀分布影像和所述CT均匀分布影像的灰度值均一化至[0,255]区间,得到所述待处理MR影像和所述待处理CT影像,由所有所述待处理MR影像组成所述待处理的MR影像序列,由所有所述待处理CT影像组成所述待处理的CT影像序列。The grayscale values of the MR uniform distribution image and the CT uniform distribution image are respectively normalized to the interval of [0, 255] to obtain the MR image to be processed and the CT image to be processed. All the MR images to be processed form the MR image sequence to be processed, and all the CT images to be processed form the CT image sequence to be processed.

在本发明的一个实施例中,根据所述待处理MR影像和所述待处理CT影像的互信息,得到M组匹配影像对,包括:In one embodiment of the present invention, obtaining M groups of matching image pairs according to the mutual information between the MR image to be processed and the CT image to be processed includes:

获取所述待处理的MR影像序列中第一张待处理MR影像;Acquire the first MR image to be processed in the MR image sequence to be processed;

基于所述第一张待处理MR影像与所述待处理CT影像的互信息,在所述待处理的CT影像序列中选取与所述第一张待处理MR影像之间的互信息最大的待处理CT影像,组成第一组匹配影像对;Based on the mutual information between the first MR image to be processed and the CT image to be processed, selecting a CT image to be processed having the largest mutual information with the first MR image to be processed in the CT image sequence to be processed to form a first group of matching image pairs;

基于预设步长,从所述待处理的CT影像序列中分别为第二张待处理MR影像至第M张待处理MR影像选取相匹配的待处理CT影像,得到M-1组匹配影像对。Based on the preset step size, matching CT images to be processed are selected from the second MR image to be processed to the Mth MR image to be processed in the CT image sequence to be processed, to obtain M-1 groups of matching image pairs.

在本发明的一个实施例中,基于预设步长,从所述待处理的CT影像序列中分别为第二张待处理MR影像至第M张待处理MR影像选取相匹配的待处理CT影像,得到M-1组匹配影像对,包括:In one embodiment of the present invention, based on a preset step size, matching CT images to be processed are selected from the second MR image to be processed to the Mth MR image to be processed in the CT image sequence to be processed, to obtain M-1 groups of matching image pairs, including:

对于第m+1张待处理MR影像,判断n+λ是否为整数,若是整数,则从所述待处理的CT影像序列中选取第n+λ张待处理CT影像作为待匹配影像,若是非整数,则选取与所述第n+λ张待处理CT影像相邻的两张待处理CT影像中与所述第m+1张待处理MR影像的互信息更大的待处理CT影像作为待匹配影像,其中,第m张待处理MR影像与第n张待处理CT影像组成第m组匹配影像对,λ为预设步长,λ=Sm/Sc,Sm为待处理的MR影像序列的层间间隔,Sc为待处理的CT影像序列的层间间隔,1≤m≤M,1≤n≤N;For the m+1th MR image to be processed, determine whether n+λ is an integer. If it is an integer, select the n+λth CT image to be processed from the CT image sequence to be processed as the image to be matched. If it is a non-integer, select the CT image to be processed that has a larger mutual information with the m+1th MR image to be processed from the two adjacent CT images to be processed that are adjacent to the n+λth CT image to be processed as the image to be matched, wherein the mth MR image to be processed and the nth CT image to be processed form the mth group of matching image pairs, λ is a preset step size, λ=Sm/Sc, Sm is the inter-layer interval of the MR image sequence to be processed, Sc is the inter-layer interval of the CT image sequence to be processed, 1≤m≤M, 1≤n≤N;

判断作为待匹配影像的待处理CT影像和所述第m+1张待处理MR影像之间的互信息是否大于或者等于预设阈值,若是,则将作为待匹配影像的待处理CT影像与所述第m+1张待处理MR影像组成第m+1组匹配影像对,若否,则在所述待处理的CT影像序列中选取与所述第m+1张待处理MR影像之间的互信息最大的待处理CT影像,组成第m+1组匹配影像对。Determine whether the mutual information between the CT image to be processed as the image to be matched and the m+1th MR image to be processed is greater than or equal to a preset threshold; if so, the CT image to be processed as the image to be matched and the m+1th MR image to be processed form the m+1th group of matching image pairs; if not, select the CT image to be processed with the largest mutual information with the m+1th MR image to be processed in the CT image sequence to be processed to form the m+1th group of matching image pairs.

在本发明的一个实施例中,所述目标影像序列增强模型包括生成器和判别器,所述生成器包括编码器、特征提取单元和解码器;In one embodiment of the present invention, the target image sequence enhancement model includes a generator and a discriminator, and the generator includes an encoder, a feature extraction unit and a decoder;

在所述训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对所述待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型,包括:Selecting two MR images to be processed and one CT image to be processed from the training set, inputting the selected two MR images to be processed, one CT image to be processed and a Gaussian noise image into the target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained, and obtaining a trained target image sequence enhancement model, including:

在所述训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像输入至所述编码器,得到所述高斯噪声影像对应的第一特征矩阵、两张所述待处理MR影像分别对应的第二特征矩阵、第三特征矩阵和所述待处理CT影像对应的第四特征矩阵;Selecting two MR images to be processed and one CT image to be processed from the training set, inputting the selected two MR images to be processed, one CT image to be processed and one Gaussian noise image into the encoder, and obtaining a first feature matrix corresponding to the Gaussian noise image, a second feature matrix and a third feature matrix respectively corresponding to the two MR images to be processed, and a fourth feature matrix corresponding to the CT image to be processed;

将所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵输入至所述特征提取单元,得到待解码特征矩阵;Inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the feature extraction unit to obtain a feature matrix to be decoded;

将所述待解码特征矩阵输入至所述解码器,得到第一MR增强影像;Inputting the feature matrix to be decoded into the decoder to obtain a first MR enhanced image;

基于所述第一MR增强影像和待配准的待处理MR影像构建的动态差分损失函数,以反向传播方式调整所述待训练的目标影像序列增强模型的参数,得到初步训练好的目标影像序列增强模型,并得到所述初步训练好的目标影像序列增强模型输出的第二MR增强影像;其中,所述待配准的待处理MR影像为从所述训练集中选取的,且处于输入至所述待训练的目标影像序列增强模型的两张待处理MR影像之间,输入至所述待训练的目标影像序列增强模型的待处理CT影像与待配准的待处理MR影像处于同一组所述匹配影像对中;Based on the dynamic differential loss function constructed by the first MR enhanced image and the MR image to be processed to be registered, the parameters of the target image sequence enhancement model to be trained are adjusted in a back-propagation manner to obtain a preliminarily trained target image sequence enhancement model, and a second MR enhanced image output by the preliminarily trained target image sequence enhancement model is obtained; wherein the MR image to be processed to be registered is selected from the training set and is between the two MR images to be processed input to the target image sequence enhancement model to be trained, and the CT image to be processed input to the target image sequence enhancement model to be trained and the MR image to be processed to be registered are in the same group of matching image pairs;

将所述第二MR增强影像输入至所述判别器,以根据所述判别器的判别结果得到所述训练好的目标影像序列增强模型。The second MR enhanced image is input into the discriminator to obtain the trained target image sequence enhancement model according to the discrimination result of the discriminator.

在本发明的一个实施例中,所述特征提取单元包括图注意力模块、通道注意力模块和残差结构;In one embodiment of the present invention, the feature extraction unit includes a graph attention module, a channel attention module and a residual structure;

将所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵输入至所述特征提取单元,得到待解码特征矩阵,包括:Inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the feature extraction unit to obtain a feature matrix to be decoded, comprising:

将所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵输入至所述图注意力模块,所述图注意力模块通过捕捉特征间的相似性,得到所述高斯噪声影像对应的第五特征矩阵、两张所述待处理MR影像分别对应的第六特征矩阵、第七特征矩阵和所述待处理CT影像对应的第八特征矩阵;The first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix are input into the graph attention module, and the graph attention module obtains a fifth feature matrix corresponding to the Gaussian noise image, a sixth feature matrix and a seventh feature matrix corresponding to the two MR images to be processed, and an eighth feature matrix corresponding to the CT image to be processed by capturing similarities between the features;

将所述第五特征矩阵、所述第六特征矩阵、所述第七特征矩阵和所述第八特征矩阵输入至所述通道注意力模块,所述通道注意力模块通过卷积操作,得到所述第五特征矩阵的第一权重、所述第六特征矩阵的第二权重、所述第七特征矩阵的第三权重、所述第八特征矩阵的第四权重,分别将所述第一权重与所述第五特征矩阵相乘、所述第二权重与所述第六特征矩阵相乘、所述第三权重与所述第七特征矩阵相乘、所述第四权重与所述第八特征矩阵相乘,并将所有相乘结果相加得到第九特征矩阵;The fifth feature matrix, the sixth feature matrix, the seventh feature matrix and the eighth feature matrix are input into the channel attention module, and the channel attention module obtains the first weight of the fifth feature matrix, the second weight of the sixth feature matrix, the third weight of the seventh feature matrix, and the fourth weight of the eighth feature matrix through convolution operation, and respectively multiplies the first weight by the fifth feature matrix, the second weight by the sixth feature matrix, the third weight by the seventh feature matrix, and the fourth weight by the eighth feature matrix, and adds all the multiplication results to obtain a ninth feature matrix;

将所述第九特征矩阵输入至所述残差结构,并经卷积操作后,得到所述待解码特征矩阵。The ninth feature matrix is input into the residual structure, and after a convolution operation, the feature matrix to be decoded is obtained.

在本发明的一个实施例中,将所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵输入至所述图注意力模块,所述图注意力模块通过捕捉特征间的相似性,得到所述高斯噪声影像对应的第五特征矩阵、两张所述待处理MR影像分别对应的第六特征矩阵、第七特征矩阵和所述待处理CT影像对应的第八特征矩阵,包括:In one embodiment of the present invention, the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix are input into the graph attention module, and the graph attention module obtains a fifth feature matrix corresponding to the Gaussian noise image, a sixth feature matrix and a seventh feature matrix corresponding to the two MR images to be processed, and an eighth feature matrix corresponding to the CT image to be processed by capturing similarities between the features, including:

步骤3.211、将所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵输入至所述图注意力模块,之后将所述第一特征矩阵划分为若干第一矩阵块;Step 3.211, inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the graph attention module, and then dividing the first feature matrix into a plurality of first matrix blocks;

步骤3.212、按顺序选取一个所述第一矩阵块,分别在所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵中选取与该所述第一矩阵块位置相同的第二矩阵块、第三矩阵块和第四矩阵块;Step 3.212, sequentially select one of the first matrix blocks, and respectively select a second matrix block, a third matrix block and a fourth matrix block in the second characteristic matrix, the third characteristic matrix and the fourth characteristic matrix which have the same position as the first matrix block;

步骤3.213、将所述第一矩阵块、所述第二矩阵块、所述第三矩阵块和所述第四矩阵块组合成为组合矩阵;Step 3.213, combining the first matrix block, the second matrix block, the third matrix block and the fourth matrix block into a combined matrix;

步骤3.214、选取与所述第一矩阵块相邻的若干像素点,得到像素矩阵;Step 3.214, selecting a number of pixel points adjacent to the first matrix block to obtain a pixel matrix;

步骤3.215、将所述组合矩阵和所述像素矩阵组合成为拼接矩阵;Step 3.215, combining the combination matrix and the pixel matrix into a splicing matrix;

步骤3.216、根据所述第一矩阵块、所述第二矩阵块、所述第三矩阵块和所述第四矩阵块相互之间的连接关系,对所述拼接矩阵中的第一矩阵块、第二矩阵块、第三矩阵块和第四矩阵块分别进行加权求和处理,分别对应得到第五矩阵块、第六矩阵块、第七矩阵块和第八矩阵块;Step 3.216: According to the connection relationship between the first matrix block, the second matrix block, the third matrix block and the fourth matrix block, weighted summation processing is performed on the first matrix block, the second matrix block, the third matrix block and the fourth matrix block in the spliced matrix to obtain a fifth matrix block, a sixth matrix block, a seventh matrix block and an eighth matrix block respectively;

步骤3.217、利用所述第五矩阵块、所述第六矩阵块、所述第七矩阵块和所述第八矩阵块对应替换所述第一特征矩阵的第一矩阵块、所述第二特征矩阵的第二矩阵块、所述第三特征矩阵的第三矩阵块和所述第四特征矩阵的第四矩阵块;Step 3.217, using the fifth matrix block, the sixth matrix block, the seventh matrix block and the eighth matrix block to correspondingly replace the first matrix block of the first characteristic matrix, the second matrix block of the second characteristic matrix, the third matrix block of the third characteristic matrix and the fourth matrix block of the fourth characteristic matrix;

步骤3.218、重复执行所述步骤3.212至所述步骤3.217,直至所述第一特征矩阵、所述第二特征矩阵、所述第三特征矩阵和所述第四特征矩阵中所有的矩阵块均替换完成,对应得到所述第五特征矩阵、所述第六特征矩阵、所述第七特征矩阵和所述第八特征矩阵。Step 3.218, repeat steps 3.212 to 3.217 until all matrix blocks in the first characteristic matrix, the second characteristic matrix, the third characteristic matrix and the fourth characteristic matrix are replaced, and the fifth characteristic matrix, the sixth characteristic matrix, the seventh characteristic matrix and the eighth characteristic matrix are obtained accordingly.

在本发明的一个实施例中,所述动态差分损失函数表示为:In one embodiment of the present invention, the dynamic differential loss function is expressed as:

;

其中,表示动态差分损失函数,表示待配准的待处理MR影像,表示第一MR增强影像,表示生成器的目标是从的映射,表示对第一MR增强影像中的第个像素点进行期望操作,表示第一MR增强影像的概率分布,表示待配准的待处理MR影像中像素点的数量,表示生成器将待配准的待处理MR影像中的第个像素点映射到第一MR增强影像后的结果的差异,表示所有的平均值。in, represents the dynamic difference loss function, represents the MR image to be registered. represents the first MR enhanced image, Indicates that the goal of the generator is to arrive The mapping of Indicates the first MR enhanced image Pixels to perform the desired operation, represents the probability distribution of the first MR enhanced image, represents the number of pixels in the MR image to be processed to be registered, Indicates that the generator will register the first The difference in the results after the pixels are mapped to the first MR enhanced image, Indicates all The average value of .

在本发明的一个实施例中,将所述第二MR增强影像输入至所述判别器,以根据所述判别器的判别结果得到所述训练好的目标影像序列增强模型,包括:In one embodiment of the present invention, the second MR enhanced image is input to the discriminator to obtain the trained target image sequence enhancement model according to the discrimination result of the discriminator, including:

将所述第二MR增强影像输入至所述判别器,得到判别值;inputting the second MR enhanced image into the discriminator to obtain a discriminant value;

判断所述判别值与判别阈值的关系,若所述判别值大于所述判别阈值,所述判别结果为假,则根据峰度损失函数得到的损失值更新所述判别阈值,并继续对所述初步训练好的目标影像序列增强模型进行训练,直至所述判别值小于或者等于最新的判别阈值,得到所述训练好的目标影像序列增强模型,若所述判别值小于或者等于所述判别阈值,所述判别结果为真,则将所述初步训练好的目标影像序列增强模型作为所述训练好的目标影像序列增强模型。Determine the relationship between the discrimination value and the discrimination threshold; if the discrimination value is greater than the discrimination threshold and the discrimination result is false, then update the discrimination threshold according to the loss value obtained by the kurtosis loss function, and continue to train the preliminarily trained target image sequence enhancement model until the discrimination value is less than or equal to the latest discrimination threshold, and obtain the trained target image sequence enhancement model; if the discrimination value is less than or equal to the discrimination threshold and the discrimination result is true, then use the preliminarily trained target image sequence enhancement model as the trained target image sequence enhancement model.

本发明还提供一种多模态影像的配准方法,包括:The present invention also provides a multi-modal image registration method, comprising:

获取待配准CT影像;Acquire the CT image to be registered;

将所述待配准CT影像输入上述任一项实施例所述的训练好的目标影像序列增强模型中,得到配准的MR影像。The CT image to be registered is input into the trained target image sequence enhancement model described in any one of the above embodiments to obtain a registered MR image.

本发明的有益效果:Beneficial effects of the present invention:

本发明首先获取了待处理的MR影像序列和待处理的CT影像序列,并根据待处理MR影像和待处理CT影像的互信息得到M组匹配影像对,并从M组匹配影像对中选取若干组匹配影像对作为训练集,且每组匹配影像对包括相互匹配的一张待处理MR影像和一张待处理CT影像,之后在训练集中选取两张待处理MR影像、一张待处理CT影像,并将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型,所得到的训练好的目标影像序列增强模型便可以对待配准CT影像进行匹配,得到配准的MR影像。由此,本发明所得到的训练好的目标影像序列增强模型可以生成与CT影像匹配的MR影像,有利于提高影像三维重建的精度,为医学影像处理领域提供基础技术支撑作用。The present invention first obtains the MR image sequence to be processed and the CT image sequence to be processed, and obtains M groups of matching image pairs according to the mutual information of the MR image to be processed and the CT image to be processed, and selects several groups of matching image pairs from the M groups of matching image pairs as training sets, and each group of matching image pairs includes a mutually matching MR image to be processed and a CT image to be processed, and then selects two MR images to be processed and a CT image to be processed in the training set, and the selected two MR images to be processed, one CT image to be processed and a Gaussian noise image are input into the target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained, and obtain a trained target image sequence enhancement model, and the obtained trained target image sequence enhancement model can match the CT image to be registered, and obtain a registered MR image. Therefore, the trained target image sequence enhancement model obtained by the present invention can generate an MR image matching the CT image, which is conducive to improving the accuracy of image three-dimensional reconstruction and providing basic technical support for the field of medical image processing.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例提供的一种用于多模态影像增强与配准的模型的训练方法的流程示意图;FIG1 is a flow chart of a training method for a model for multimodal image enhancement and registration provided by an embodiment of the present invention;

图2是本发明实施例提供的一种目标影像序列增强模型的示意图。FIG. 2 is a schematic diagram of a target image sequence enhancement model provided by an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面结合具体实施例对本发明做进一步详细的描述,但本发明的实施方式不限于此。The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

实施例一Embodiment 1

请参见图1,图1是本发明实施例提供的一种用于多模态影像增强与配准的模型的训练方法的流程示意图,本发明实施例提供一种用于多模态影像增强与配准的模型的训练方法,该训练方法包括:Please refer to FIG. 1 , which is a flow chart of a training method for a model for multimodal image enhancement and registration provided by an embodiment of the present invention. The embodiment of the present invention provides a training method for a model for multimodal image enhancement and registration, and the training method includes:

步骤1、获取待处理的MR影像序列和待处理的CT影像序列,其中,待处理的MR影像序列包括按顺序排列的M张待处理MR影像,待处理的CT影像序列包括按顺序排列的N张待处理CT影像,M和N均为大于0的整数。Step 1: Obtain an MR image sequence to be processed and a CT image sequence to be processed, wherein the MR image sequence to be processed includes M MR images to be processed arranged in sequence, and the CT image sequence to be processed includes N CT images to be processed arranged in sequence, and both M and N are integers greater than 0.

这里,待处理的MR影像序列和待处理的CT影像序列均采集于同一个人的同一部位。例如,M为30,N为300。Here, the MR image sequence to be processed and the CT image sequence to be processed are both acquired from the same part of the same person. For example, M is 30 and N is 300.

可选地,M张待处理MR影像和N张待处理CT影像均是按空间顺序进行排列的。Optionally, the M MR images to be processed and the N CT images to be processed are arranged in spatial order.

在一个可选的实施例中,步骤1具体可以包括:In an optional embodiment, step 1 may specifically include:

步骤1.1、获取初始MR影像序列和初始CT影像序列,其中,初始MR影像序列包括M张初始MR影像,初始CT影像序列包括N张初始CT影像。Step 1.1, obtaining an initial MR image sequence and an initial CT image sequence, wherein the initial MR image sequence includes M initial MR images, and the initial CT image sequence includes N initial CT images.

这里,初始MR影像序列和初始CT影像序列均采集于同一个人的同一部位。例如,采集于大腿根部至小腿中段。Here, the initial MR image sequence and the initial CT image sequence are both acquired from the same part of the same person, for example, from the thigh root to the middle of the calf.

可选地,M张初始MR影像和N张初始CT影像均按照空间顺序由先到后排列。Optionally, the M initial MR images and the N initial CT images are arranged in a spatial order from earliest to latest.

步骤1.2、将初始MR影像和初始CT影像的亮度值均转化为灰度值,得到MR灰度影像和CT灰度影像。Step 1.2: Convert the brightness values of the initial MR image and the initial CT image into grayscale values to obtain an MR grayscale image and a CT grayscale image.

步骤1.3、采用直方图均衡化算法分别重新分配MR灰度影像和CT灰度影像的灰度值,使MR灰度影像和CT灰度影像的灰度值均在预设范围内均匀分布,得到MR均匀分布影像和CT均匀分布影像。Step 1.3: Use a histogram equalization algorithm to redistribute the grayscale values of the MR grayscale image and the CT grayscale image, respectively, so that the grayscale values of the MR grayscale image and the CT grayscale image are evenly distributed within a preset range, thereby obtaining an MR evenly distributed image and a CT evenly distributed image.

具体地,采用直方图均衡化算法分别对MR灰度影像和CT灰度影像的灰度值进行重新分配,即在预设范围内均匀划分多个区间,使得每个区间内的像素点的数量平均分配,由此得到MR均匀分布影像和CT均匀分布影像,例如,将预设范围划分为5个区间,平均分配至每个区间的像素点为10个,而MR灰度影像中有7个像素点落入第1个区间,则可以按照从小到大的顺序从第2个区间中选取灰度值较小的3个像素点放入第1个区间,例如从第2个区间中选取的3个像素点的灰度值分别为51、55、60,则将所选取的每个像素点的灰度值分别与A1/A2相乘,A1为第1个区间中最大的灰度值,A2为从第2个区间中所选取的像素点中最大的灰度值,例如将51、55、60全部与50/60相乘,将相乘的结果放入第1个区间,其他情况以此类推。Specifically, the histogram equalization algorithm is used to redistribute the grayscale values of the MR grayscale image and the CT grayscale image, that is, multiple intervals are evenly divided within the preset range, so that the number of pixels in each interval is evenly distributed, thereby obtaining an MR uniform distribution image and a CT uniform distribution image. For example, the preset range is divided into 5 intervals, and the number of pixels evenly distributed to each interval is 10. If 7 pixels in the MR grayscale image fall into the first interval, then 3 pixels with smaller grayscale values can be selected from the second interval in ascending order and placed in the first interval. For example, the grayscale values of the 3 pixels selected from the second interval are 51, 55, and 60, respectively. Then, the grayscale value of each selected pixel is multiplied by A1/A2, where A1 is the largest grayscale value in the first interval, and A2 is the largest grayscale value of the pixels selected from the second interval. For example, 51, 55, and 60 are all multiplied by 50/60, and the multiplication result is placed in the first interval, and so on for other cases.

这里,MR灰度影像的预设范围为由MR灰度影像的最小灰度值和最大灰度值组成的范围,CT灰度影像的预设范围为由CT灰度影像的最小灰度值和最大灰度值组成的范围。Here, the preset range of the MR grayscale image is a range consisting of the minimum grayscale value and the maximum grayscale value of the MR grayscale image, and the preset range of the CT grayscale image is a range consisting of the minimum grayscale value and the maximum grayscale value of the CT grayscale image.

步骤1.4、分别将MR均匀分布影像和CT均匀分布影像的灰度值均一化至[0,255]区间,得到待处理MR影像和待处理CT影像,由所有待处理MR影像组成待处理的MR影像序列,由所有待处理CT影像组成待处理的CT影像序列。Step 1.4, respectively normalize the grayscale values of the MR uniform distribution image and the CT uniform distribution image to the interval [0, 255] to obtain the MR image to be processed and the CT image to be processed. All the MR images to be processed constitute the MR image sequence to be processed, and all the CT images to be processed constitute the CT image sequence to be processed.

在本实施例中,均一化的公式为:In this embodiment, the normalization formula is:

;

其中,为归一化后的灰度值,为归一化前的灰度值,为MR均匀分布影像或CT均匀分布影像的最小灰度值,为MR均匀分布影像或CT均匀分布影像的最大灰度值。in, is the normalized grayscale value, is the gray value before normalization, is the minimum gray value of MR uniform distribution image or CT uniform distribution image, It is the maximum gray value of MR uniform distribution image or CT uniform distribution image.

步骤2、根据待处理MR影像和待处理CT影像的互信息,得到M组匹配影像对,并从M组匹配影像对中选取若干组匹配影像对作为训练集,每组匹配影像对包括相互匹配的一张待处理MR影像和一张待处理CT影像。Step 2: According to the mutual information between the MR image to be processed and the CT image to be processed, M groups of matching image pairs are obtained, and several groups of matching image pairs are selected from the M groups of matching image pairs as training sets, each group of matching image pairs includes one MR image to be processed and one CT image to be processed that match each other.

具体地,本实施例通过待处理MR影像和待处理CT影像的互信息,对待处理MR影像和待处理CT影像进行匹配处理,从而得到由M组相互匹配的待处理MR影像和待处理CT影像组成的匹配影像对,然后从中选取若干组匹配影像对作为训练集,其余的匹配影像对则作为测试集。Specifically, this embodiment performs matching processing on the MR image to be processed and the CT image to be processed through the mutual information between the MR image to be processed and the CT image to be processed, thereby obtaining matching image pairs consisting of M groups of mutually matching MR images to be processed and CT images to be processed, and then selects several groups of matching image pairs as training sets, and the remaining matching image pairs are used as test sets.

例如,随机选取80%的匹配影像对作为训练集,其余的20%则作为测试集。For example, 80% of the matching image pairs are randomly selected as the training set, and the remaining 20% are used as the test set.

在一个可选的实施例中,步骤2具体可以包括:In an optional embodiment, step 2 may specifically include:

步骤2.1、获取待处理的MR影像序列中第一张待处理MR影像。Step 2.1, obtaining the first MR image to be processed in the MR image sequence to be processed.

步骤2.2、基于第一张待处理MR影像与待处理CT影像的互信息,在待处理的CT影像序列中选取与第一张待处理MR影像之间的互信息最大的待处理CT影像,组成第一组匹配影像对。Step 2.2: Based on the mutual information between the first MR image to be processed and the CT image to be processed, select the CT image to be processed with the largest mutual information with the first MR image to be processed in the CT image sequence to be processed to form a first group of matching image pairs.

在本实施例中,两张影像的互信息的计算公式为:In this embodiment, the calculation formula of the mutual information of two images is:

;

其中,为待处理MR影像,为待处理CT影像,为待处理MR影像和待处理CT影像之间的互信息,为待处理MR影像的边缘概率分布,为待处理MR影像中灰度值为a的数量,为待处理MR影像中像素点的数量,为待处理CT影像的边缘概率分布,为待处理CT影像中灰度值为的数量,为待处理CT影像中像素点的数量,in, is the MR image to be processed, is the CT image to be processed, is the mutual information between the MR image to be processed and the CT image to be processed, is the marginal probability distribution of the MR image to be processed, , is the number of gray values a in the MR image to be processed, is the number of pixels in the MR image to be processed, is the marginal probability distribution of the CT image to be processed, , is the gray value of the CT image to be processed The number of is the number of pixels in the CT image to be processed, .

步骤2.3、基于预设步长,从待处理的CT影像序列中分别为第二张待处理MR影像至第M张待处理MR影像选取相匹配的待处理CT影像,得到M-1组匹配影像对。Step 2.3: Based on the preset step size, select matching CT images to be processed from the second MR image to be processed to the Mth MR image to be processed in the CT image sequence to be processed, and obtain M-1 groups of matching image pairs.

步骤2.31、对于第m+1张待处理MR影像,判断n+λ是否为整数,若是整数,则从待处理的CT影像序列中选取第n+λ张待处理CT影像作为待匹配影像,若是非整数,则选取与第n+λ张待处理CT影像相邻的两张待处理CT影像中与第m+1张待处理MR影像的互信息更大的待处理CT影像作为待匹配影像,其中,第m张待处理MR影像与第n张待处理CT影像组成第m组匹配影像对,λ为预设步长,λ=Sm/Sc,Sm为待处理的MR影像序列的层间间隔,Sc为待处理的CT影像序列的层间间隔,1≤m≤M,1≤n≤N。Step 2.31. For the m+1th MR image to be processed, determine whether n+λ is an integer. If it is an integer, select the n+λth CT image to be processed from the CT image sequence to be processed as the image to be matched. If it is a non-integer, select the two adjacent CT images to be processed that have a larger mutual information with the m+1th MR image to be processed as the image to be matched, where the mth MR image to be processed and the nth CT image to be processed constitute the mth group of matching image pairs, λ is the preset step size, λ=Sm/Sc, Sm is the inter-layer interval of the MR image sequence to be processed, Sc is the inter-layer interval of the CT image sequence to be processed, 1≤m≤M, 1≤n≤N.

具体地,假设第m张待处理MR影像与第n张待处理CT影像相互匹配,组成了第m组匹配影像对,那么接下来首先需要确定n+λ是否为整数,如果n+λ是整数,则可以直接选取第n+λ张待处理CT影像作为第m+1张待处理MR影像的待匹配影像,如果n+λ不是整数,则需要选取与n+λ最相近的前后两张待处理CT影像,例如,n+λ为6.5,则选取第六张待处理CT影像和第七张待处理CT影像,然后再从所选取的两张待处理CT影像中选择与第m+1张待处理MR影像的互信息更大的待处理CT影像作为待匹配影像。这里,层间间隔为相邻两张影像之间的距离。Specifically, assuming that the mth MR image to be processed matches the nth CT image to be processed, forming the mth set of matching image pairs, then first determine whether n+λ is an integer. If n+λ is an integer, the n+λth CT image to be processed can be directly selected as the image to be matched for the m+1th MR image to be processed. If n+λ is not an integer, it is necessary to select the two CT images to be processed that are closest to n+λ. For example, if n+λ is 6.5, the sixth CT image to be processed and the seventh CT image to be processed are selected, and then the CT image to be processed with greater mutual information with the m+1th MR image to be processed is selected from the two selected CT images to be processed as the image to be matched. Here, the inter-layer interval is the distance between two adjacent images.

步骤2.32、判断作为待匹配影像的待处理CT影像和第m+1张待处理MR影像之间的互信息是否大于或者等于预设阈值,若是,则将作为待匹配影像的待处理CT影像与第m+1张待处理MR影像组成第m+1组匹配影像对,若否,则在待处理的CT影像序列中选取与第m+1张待处理MR影像之间的互信息最大的待处理CT影像,组成第m+1组匹配影像对。Step 2.32, determine whether the mutual information between the CT image to be processed as the image to be matched and the m+1th MR image to be processed is greater than or equal to a preset threshold; if so, the CT image to be processed as the image to be matched and the m+1th MR image to be processed are combined into the m+1th matching image pair; if not, the CT image to be processed with the largest mutual information with the m+1th MR image to be processed is selected from the CT image sequence to be processed to form the m+1th matching image pair.

在本实施例中,对于其他待处理MR影像则按照步骤2.31的方式继续寻找与其相匹配的待处理CT影像,直至得到所有匹配影像对。In this embodiment, for other MR images to be processed, the search for matching CT images to be processed is continued in the manner of step 2.31 until all matching image pairs are obtained.

需要说明的是,本实施例不对预设阈值的具体数值进行限定,本领域技术人员可以根据具体需求设定,例如,预设阈值为1.05。It should be noted that this embodiment does not limit the specific value of the preset threshold, and those skilled in the art can set it according to specific requirements. For example, the preset threshold is 1.05.

步骤3、在训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型,训练好的目标影像序列增强模型用于对待配准CT影像进行匹配,得到配准的MR影像;其中,在训练集中选取的两张待处理MR影像与所选取的待处理CT影像均不匹配;目标影像序列增强模型为基于生成对抗网络的模型。Step 3, select two MR images to be processed and one CT image to be processed in the training set, and input the selected two MR images to be processed, one CT image to be processed and a Gaussian noise image into the target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained and obtain a trained target image sequence enhancement model, and the trained target image sequence enhancement model is used to match the CT image to be registered to obtain a registered MR image; wherein, the two MR images to be processed selected in the training set do not match the selected CT image to be processed; the target image sequence enhancement model is a model based on a generative adversarial network.

具体地,首先在训练集中选取三张待处理MR影像、一张待处理CT影像,优选地为空间上连续的三张待处理MR影像,三张待处理MR影像分别记为MR1、MR2和MR3,MR2在空间上处于MR1和MR3之间,在训练集中所选取的待处理CT影像与MR2组成一组匹配影像对,然后再随机生成一张高斯噪声影像,由此便可以将MR1、MR3、与MR2匹配的待处理CT影像以及高斯噪声影像共同输入至待训练的目标影像序列增强模型中,以对待训练的目标影像序列增强模型进行训练,得到训练好的目标影像序列增强模型。Specifically, firstly, three MR images to be processed and one CT image to be processed are selected in the training set, preferably three spatially continuous MR images to be processed, the three MR images to be processed are respectively recorded as MR1, MR2 and MR3, MR2 is spatially located between MR1 and MR3, the CT image to be processed selected in the training set and MR2 form a group of matching image pairs, and then a Gaussian noise image is randomly generated, thereby MR1, MR3, the CT image to be processed matching MR2 and the Gaussian noise image can be input into the target image sequence enhancement model to be trained, so as to train the target image sequence enhancement model to be trained and obtain the trained target image sequence enhancement model.

在本实施例中,目标影像序列增强模型是一种基于生成对抗网络的模型,请参见图2,目标影像序列增强模型包括生成器和判别器,生成器包括编码器、特征提取单元和解码器。In this embodiment, the target image sequence enhancement model is a model based on a generative adversarial network, see Figure 2, the target image sequence enhancement model includes a generator and a discriminator, and the generator includes an encoder, a feature extraction unit and a decoder.

在一个可选的实施例中,步骤3具体可以包括:In an optional embodiment, step 3 may specifically include:

步骤3.1、在训练集中选取两张待处理MR影像、一张待处理CT影像,将所选取的两张待处理MR影像、一张待处理CT影像以及一张高斯噪声影像输入至编码器,得到高斯噪声影像对应的第一特征矩阵、两张待处理MR影像分别对应的第二特征矩阵、第三特征矩阵和待处理CT影像对应的第四特征矩阵。Step 3.1. Select two MR images to be processed and one CT image to be processed in the training set, input the selected two MR images to be processed, one CT image to be processed and one Gaussian noise image into the encoder, and obtain the first feature matrix corresponding to the Gaussian noise image, the second feature matrix corresponding to the two MR images to be processed, the third feature matrix and the fourth feature matrix corresponding to the CT image to be processed.

可选地,对于需要输入至编码器的影像,可以先在这些影像的四周填充一圈灰度值为0的像素点,再将这些影像输入至编码器中。Optionally, for images that need to be input into the encoder, a circle of pixels with a gray value of 0 may be filled around these images before these images are input into the encoder.

可选地,编码器具有多层依次连接的图像特征提取层,所有图像特征提取层的结构均相同,图像特征提取层包括依次连接的卷积层、池化层、归一化层和激活层,因此,高斯噪声影像经过多层图像特征提取层的处理后,得到第一特征矩阵,两张待处理MR影像分别经过多层图像特征提取层的处理后,对应得到第二特征矩阵和第三特征矩阵,待处理CT影像经过多层图像特征提取层的处理后得到第四特征矩阵。例如,编码器包括4层依次连接的图像特征提取层。Optionally, the encoder has multiple layers of image feature extraction layers connected in sequence, and the structures of all image feature extraction layers are the same. The image feature extraction layers include convolution layers, pooling layers, normalization layers, and activation layers connected in sequence. Therefore, after the Gaussian noise image is processed by the multiple layers of image feature extraction layers, a first feature matrix is obtained. After the two MR images to be processed are processed by the multiple layers of image feature extraction layers, a second feature matrix and a third feature matrix are obtained respectively. After the CT images to be processed are processed by the multiple layers of image feature extraction layers, a fourth feature matrix is obtained. For example, the encoder includes 4 layers of image feature extraction layers connected in sequence.

步骤3.2、将第一特征矩阵、第二特征矩阵、第三特征矩阵和第四特征矩阵输入至特征提取单元,得到待解码特征矩阵。Step 3.2: Input the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into a feature extraction unit to obtain a feature matrix to be decoded.

在本实施例中,特征提取单元包括图注意力模块、通道注意力模块和残差结构。In this embodiment, the feature extraction unit includes a graph attention module, a channel attention module and a residual structure.

步骤3.21、将第一特征矩阵、第二特征矩阵、第三特征矩阵和第四特征矩阵输入至图注意力模块,图注意力模块通过捕捉特征间的相似性,得到高斯噪声影像对应的第五特征矩阵、两张待处理MR影像分别对应的第六特征矩阵、第七特征矩阵和待处理CT影像对应的第八特征矩阵。Step 3.21, input the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the graph attention module. The graph attention module captures the similarity between the features to obtain the fifth feature matrix corresponding to the Gaussian noise image, the sixth feature matrix and the seventh feature matrix corresponding to the two MR images to be processed, and the eighth feature matrix corresponding to the CT image to be processed.

步骤3.211、将第一特征矩阵、第二特征矩阵、第三特征矩阵和第四特征矩阵输入至图注意力模块,之后将第一特征矩阵划分为若干第一矩阵块。Step 3.211, input the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the graph attention module, and then divide the first feature matrix into a plurality of first matrix blocks.

例如,第一矩阵块的大小为I行1列,I例如为4。For example, the size of the first matrix block is I rows and 1 column, where I is 4, for example.

步骤3.212、按顺序选取一个第一矩阵块,分别在第二特征矩阵、第三特征矩阵和第四特征矩阵中选取与该第一矩阵块位置相同的第二矩阵块、第三矩阵块和第四矩阵块。Step 3.212, select a first matrix block in sequence, and select a second matrix block, a third matrix block and a fourth matrix block having the same position as the first matrix block from the second characteristic matrix, the third characteristic matrix and the fourth characteristic matrix respectively.

具体地,可以按照先从左到右,再从上到下的顺序依次选取第一矩阵块,对于当前选取的第一矩阵块而言,在第二特征矩阵中选取与该第一矩阵块位置相同的第二矩阵块,在第三特征矩阵中选取与该第一矩阵块位置相同的第三矩阵块,以及在第四特征矩阵中选取与该第一矩阵块位置相同的第四矩阵块。Specifically, the first matrix blocks can be selected in sequence from left to right and then from top to bottom. For the currently selected first matrix block, the second matrix block with the same position as the first matrix block is selected in the second characteristic matrix, the third matrix block with the same position as the first matrix block is selected in the third characteristic matrix, and the fourth matrix block with the same position as the first matrix block is selected in the fourth characteristic matrix.

步骤3.213、将第一矩阵块、第二矩阵块、第三矩阵块和第四矩阵块组合成为组合矩阵。Step 3.213, combine the first matrix block, the second matrix block, the third matrix block and the fourth matrix block into a combined matrix.

具体地,按照从左到右依次排列的顺序,将第一矩阵块、第二矩阵块、第三矩阵块和第四矩阵块组合成为组合矩阵。组合矩阵的大小例如为4行4列。Specifically, in order of arrangement from left to right, the first matrix block, the second matrix block, the third matrix block and the fourth matrix block are combined into a combined matrix. The size of the combined matrix is, for example, 4 rows and 4 columns.

步骤3.214、选取与第一矩阵块相邻的若干像素点,得到像素矩阵。Step 3.214, select a number of pixel points adjacent to the first matrix block to obtain a pixel matrix.

具体地,在第一特征矩阵中选取与第一矩阵块最相邻的所有像素点,然后随机从这些像素点中选取若干个像素点,组合成为像素矩阵,例如选取8个像素点组成4行2列的像素矩阵。Specifically, all the pixels that are most adjacent to the first matrix block are selected in the first feature matrix, and then a number of pixels are randomly selected from these pixels to form a pixel matrix. For example, 8 pixels are selected to form a pixel matrix of 4 rows and 2 columns.

步骤3.215、将组合矩阵和像素矩阵组合成为拼接矩阵。Step 3.215, combine the combination matrix and the pixel matrix into a stitching matrix.

具体地,将组合矩阵和像素矩阵进行拼接,从而得到拼接矩阵。拼接矩阵的大小例如为4行6列。Specifically, the combination matrix and the pixel matrix are spliced to obtain a spliced matrix. The size of the spliced matrix is, for example, 4 rows and 6 columns.

步骤3.216、根据第一矩阵块、第二矩阵块、第三矩阵块和第四矩阵块相互之间的连接关系,对拼接矩阵中的第一矩阵块、第二矩阵块、第三矩阵块和第四矩阵块分别进行加权处理,分别对应得到第五矩阵块、第六矩阵块、第七矩阵块和第八矩阵块。Step 3.216: According to the connection relationship between the first matrix block, the second matrix block, the third matrix block and the fourth matrix block, weighted processing is performed on the first matrix block, the second matrix block, the third matrix block and the fourth matrix block in the spliced matrix, respectively, to obtain a fifth matrix block, a sixth matrix block, a seventh matrix block and an eighth matrix block respectively.

具体地,对于拼接矩阵中的第一矩阵块而言,先从第二矩阵块、第三矩阵块和第四矩阵块中选取与第一矩阵块有连接关系的矩阵块,然后再将第一矩阵块以及与第一矩阵块具有连接关系的矩阵块、像素矩阵中的每列元素进行加权求和处理,从而得到第五矩阵块,例如第二矩阵块和第三矩阵块均与第一矩阵块具有连接关系,第四矩阵块则与第一矩阵块没有连接关系,因此将第二矩阵块和第三矩阵块分别乘以一个系数,将像素矩阵中的每列元素也分别乘以一个系数,然后再将他们相乘之后的结果进行相加,再将相加结果与第一矩阵块相加得到第五矩阵块,其中,每个系数的取值范围为0-1,且所有系数之和为1。Specifically, for the first matrix block in the spliced matrix, a matrix block connected to the first matrix block is first selected from the second matrix block, the third matrix block and the fourth matrix block, and then the first matrix block, the matrix block connected to the first matrix block, and each column element in the pixel matrix are weighted summed to obtain the fifth matrix block. For example, the second matrix block and the third matrix block are both connected to the first matrix block, and the fourth matrix block is not connected to the first matrix block. Therefore, the second matrix block and the third matrix block are multiplied by a coefficient respectively, and each column element in the pixel matrix is also multiplied by a coefficient respectively, and then the results of their multiplication are added, and then the added result is added to the first matrix block to obtain the fifth matrix block, wherein the value range of each coefficient is 0-1, and the sum of all coefficients is 1.

对于拼接矩阵中的第二矩阵块而言,先从第一矩阵块、第三矩阵块和第四矩阵块中选取与第二矩阵块有连接关系的矩阵块,然后再将第二矩阵块以及与第二矩阵块具有连接关系的矩阵块进行加权求和处理,即将与第二矩阵块具有连接关系的矩阵块分别乘以一个系数,然后再将他们相乘之后的结果进行相加,再将相加结果与第二矩阵块相加,得到第六矩阵块。对于拼接矩阵中的第三矩阵块而言,先从第一矩阵块、第二矩阵块和第四矩阵块中选取与第三矩阵块有连接关系的矩阵块,然后再将第三矩阵块以及与第三矩阵块具有连接关系的矩阵块进行加权求和处理,即将与第三矩阵块具有连接关系的矩阵块分别乘以一个系数,然后再将他们相乘之后的结果进行相加,再将相加结果与第三矩阵块相加,得到第七矩阵块。对于拼接矩阵中的第四矩阵块而言,先从第一矩阵块、第二矩阵块和第三矩阵块中选取与第四矩阵块有连接关系的矩阵块,然后再将第四矩阵块以及与第四矩阵块具有连接关系的矩阵块进行加权求和处理,即将与第四矩阵块具有连接关系的矩阵块分别乘以一个系数,然后再将他们相乘之后的结果进行相加,再将相加结果与第四矩阵块相加,得到第八矩阵块。For the second matrix block in the spliced matrix, first select a matrix block connected to the second matrix block from the first matrix block, the third matrix block and the fourth matrix block, and then perform weighted summation on the second matrix block and the matrix block connected to the second matrix block, that is, multiply the matrix blocks connected to the second matrix block by a coefficient respectively, and then add the results of their multiplication, and then add the added result to the second matrix block to obtain a sixth matrix block. For the third matrix block in the spliced matrix, first select a matrix block connected to the third matrix block from the first matrix block, the second matrix block and the fourth matrix block, and then perform weighted summation on the third matrix block and the matrix block connected to the third matrix block, that is, multiply the matrix blocks connected to the third matrix block by a coefficient respectively, and then add the results of their multiplication, and then add the added result to the third matrix block to obtain a seventh matrix block. For the fourth matrix block in the spliced matrix, a matrix block connected to the fourth matrix block is first selected from the first matrix block, the second matrix block and the third matrix block, and then the fourth matrix block and the matrix blocks connected to the fourth matrix block are weighted summed, that is, the matrix blocks connected to the fourth matrix block are multiplied by a coefficient respectively, and then the results of their multiplication are added, and then the added result is added to the fourth matrix block to obtain an eighth matrix block.

步骤3.217、利用第五矩阵块、第六矩阵块、第七矩阵块和第八矩阵块对应替换第一特征矩阵的第一矩阵块、第二特征矩阵的第二矩阵块、第三特征矩阵的第三矩阵块和第四特征矩阵的第四矩阵块。Step 3.217, use the fifth matrix block, the sixth matrix block, the seventh matrix block and the eighth matrix block to correspondingly replace the first matrix block of the first characteristic matrix, the second matrix block of the second characteristic matrix, the third matrix block of the third characteristic matrix and the fourth matrix block of the fourth characteristic matrix.

具体地,将当前处理的第一特征矩阵的第一矩阵块替换为第五矩阵块,将当前处理的第二特征矩阵的第二矩阵块替换为第六矩阵块,将当前处理的第三特征矩阵的第三矩阵块替换为第七矩阵块,将当前处理的第四特征矩阵的第四矩阵块替换为第八矩阵块。Specifically, the first matrix block of the first characteristic matrix currently being processed is replaced by the fifth matrix block, the second matrix block of the second characteristic matrix currently being processed is replaced by the sixth matrix block, the third matrix block of the third characteristic matrix currently being processed is replaced by the seventh matrix block, and the fourth matrix block of the fourth characteristic matrix currently being processed is replaced by the eighth matrix block.

步骤3.218、重复执行步骤3.212至步骤3.217,直至第一特征矩阵、第二特征矩阵、第三特征矩阵和第四特征矩阵中所有的矩阵块均替换完成,得到第五特征矩阵、第六特征矩阵、第七特征矩阵和第八特征矩阵。Step 3.218, repeat steps 3.212 to 3.217 until all matrix blocks in the first characteristic matrix, the second characteristic matrix, the third characteristic matrix and the fourth characteristic matrix are replaced, to obtain the fifth characteristic matrix, the sixth characteristic matrix, the seventh characteristic matrix and the eighth characteristic matrix.

具体地,重复执行步骤3.212至步骤3.217,按照上述步骤将第一特征矩阵中所有的第一矩阵块均替换成第五矩阵块得到第五特征矩阵,将第二特征矩阵中所有的第二矩阵块均替换成第六矩阵块得到第六特征矩阵,将第三特征矩阵中所有的第三矩阵块均替换成第七矩阵块得到第七特征矩阵,将第四特征矩阵中所有的第四矩阵块均替换成第八矩阵块得到第八特征矩阵。Specifically, repeat steps 3.212 to 3.217, and according to the above steps, replace all the first matrix blocks in the first characteristic matrix with the fifth matrix block to obtain the fifth characteristic matrix, replace all the second matrix blocks in the second characteristic matrix with the sixth matrix block to obtain the sixth characteristic matrix, replace all the third matrix blocks in the third characteristic matrix with the seventh matrix block to obtain the seventh characteristic matrix, and replace all the fourth matrix blocks in the fourth characteristic matrix with the eighth matrix block to obtain the eighth characteristic matrix.

步骤3.22、将第五特征矩阵、第六特征矩阵、第七特征矩阵和第八特征矩阵输入至通道注意力模块,通道注意力模块通过卷积操作,得到第五特征矩阵的第一权重、第六特征矩阵的第二权重、第七特征矩阵的第三权重、第八特征矩阵的第四权重,分别将第一权重与第五特征矩阵相乘、第二权重与第六特征矩阵相乘、第三权重与第七特征矩阵相乘、第四权重与第八特征矩阵相乘,并将所有相乘结果相加得到第九特征矩阵。Step 3.22: Input the fifth feature matrix, the sixth feature matrix, the seventh feature matrix, and the eighth feature matrix into the channel attention module. The channel attention module obtains the first weight of the fifth feature matrix, the second weight of the sixth feature matrix, the third weight of the seventh feature matrix, and the fourth weight of the eighth feature matrix through convolution operation. The first weight is multiplied by the fifth feature matrix, the second weight is multiplied by the sixth feature matrix, the third weight is multiplied by the seventh feature matrix, and the fourth weight is multiplied by the eighth feature matrix. All the multiplication results are added together to obtain the ninth feature matrix.

具体地,通道注意力模块通过卷积核分别对第五特征矩阵、第六特征矩阵、第七特征矩阵和第八特征矩阵进行卷积操作,从而对应得到第一权重、第二权重、第三权重和第四权重,之后将第一权重与第五特征矩阵相乘、第二权重与第六特征矩阵相乘、第三权重与第七特征矩阵相乘、第四权重与第八特征矩阵相乘,最后再将所有相乘得到的结果对应相加,便可以得到第九特征矩阵。由此可以在尽可能的融合各特征矩阵的同时又能适当保存原有特征。Specifically, the channel attention module performs convolution operations on the fifth feature matrix, the sixth feature matrix, the seventh feature matrix, and the eighth feature matrix through the convolution kernel, thereby obtaining the first weight, the second weight, the third weight, and the fourth weight, and then multiplies the first weight with the fifth feature matrix, the second weight with the sixth feature matrix, the third weight with the seventh feature matrix, and the fourth weight with the eighth feature matrix. Finally, all the multiplication results are added together to obtain the ninth feature matrix. In this way, the feature matrices can be integrated as much as possible while appropriately preserving the original features.

步骤3.23、将第九特征矩阵输入至残差结构,并经卷积操作后,得到待解码特征矩阵。Step 3.23: Input the ninth feature matrix into the residual structure, and after convolution operation, obtain the feature matrix to be decoded.

具体地,将第九特征矩阵输入至残差结构,之后利用卷积核对第九特征矩阵进行卷积操作,以将通道数恢复为原有通道数,从而得到待解码特征矩阵,并将待解码特征矩阵输出至解码器。通过残差结构可以保证影像的正向效果。Specifically, the ninth feature matrix is input into the residual structure, and then the convolution kernel is used to perform a convolution operation on the ninth feature matrix to restore the number of channels to the original number of channels, thereby obtaining a feature matrix to be decoded, and the feature matrix to be decoded is output to the decoder. The residual structure can ensure the positive effect of the image.

步骤3.3、将待解码特征矩阵输入至解码器,得到第一MR增强影像。Step 3.3: Input the feature matrix to be decoded into the decoder to obtain the first MR enhanced image.

可选地,解码器具有多层依次连接的图像特征重建层,图像特征重建层和图像特征提取层的数量相同,所有图像特征重建层的结构均相同,图像特征重建层包括依次连接的卷积层、反卷积层、归一化层和激活层。通过解码器加强对影像特征的感知和提取。Optionally, the decoder has multiple image feature reconstruction layers connected in sequence, the number of image feature reconstruction layers and image feature extraction layers is the same, the structure of all image feature reconstruction layers is the same, and the image feature reconstruction layers include sequentially connected convolution layers, deconvolution layers, normalization layers and activation layers. The decoder is used to enhance the perception and extraction of image features.

步骤3.4、基于第一MR增强影像和待配准的待处理MR影像构建的动态差分损失函数,以反向传播方式调整待训练的目标影像序列增强模型的参数,得到初步训练好的目标影像序列增强模型,并得到初步训练好的目标影像序列增强模型输出的第二MR增强影像;其中,待配准的待处理MR影像为从训练集中选取的,且处于输入至待训练的目标影像序列增强模型的两张待处理MR影像之间,输入至待训练的目标影像序列增强模型的待处理CT影像与待配准的待处理MR影像处于同一组匹配影像对中。Step 3.4, based on the dynamic differential loss function constructed based on the first MR enhanced image and the processed MR image to be registered, adjust the parameters of the target image sequence enhancement model to be trained by back propagation to obtain the preliminarily trained target image sequence enhancement model, and obtain the second MR enhanced image output by the preliminarily trained target image sequence enhancement model; wherein, the processed MR image to be registered is selected from the training set and is between the two processed MR images input to the target image sequence enhancement model to be trained, and the processed CT image input to the target image sequence enhancement model to be trained and the processed MR image to be registered are in the same group of matching image pairs.

具体地,利用第一MR增强影像和待配准的待处理MR影像构建动态差分损失函数,以通过动态差分损失函数得到损失值,再以反向传播方式调整待训练的目标影像序列增强模型的参数,直至损失值达到最小或者训练达到最大训练次数,从而得到初步训练好的目标影像序列增强模型,此时初步训练好的目标影像序列增强模型的输出即为第二MR增强影像。Specifically, a dynamic differential loss function is constructed using the first MR enhanced image and the MR image to be processed to be registered, so as to obtain a loss value through the dynamic differential loss function, and then the parameters of the target image sequence enhancement model to be trained are adjusted by back propagation until the loss value reaches a minimum or the training reaches a maximum number of training times, thereby obtaining a preliminarily trained target image sequence enhancement model. At this time, the output of the preliminarily trained target image sequence enhancement model is the second MR enhanced image.

这里,待配准的待处理MR影像在空间上处于输入至待训练的目标影像序列增强模型的两张待处理MR影像之间,且与输入至待训练的目标影像序列增强模型的待处理CT影像相匹配。Here, the MR image to be registered is spatially located between the two MR images to be processed input to the target image sequence enhancement model to be trained, and matches the CT image to be processed input to the target image sequence enhancement model to be trained.

可选地,动态差分损失函数表示为:Alternatively, the dynamic differential loss function is expressed as:

;

其中,表示动态差分损失函数,表示待配准的待处理MR影像,表示第一MR增强影像,表示生成器的目标是从的映射,表示对第一MR增强影像中的第个像素点进行期望操作,表示第一MR增强影像的概率分布,表示待配准的待处理MR影像中像素点的数量,表示生成器将待配准的待处理MR影像中的第个像素点映射到第一MR增强影像后的结果的差异,表示所有的平均值。in, represents the dynamic difference loss function, represents the MR image to be registered. represents the first MR enhanced image, Indicates that the goal of the generator is to arrive The mapping of Indicates the first MR enhanced image Pixels to perform the desired operation, represents the probability distribution of the first MR enhanced image, represents the number of pixels in the MR image to be processed to be registered, Indicates that the generator will register the first The difference in the results after the pixels are mapped to the first MR enhanced image, Indicates all The average value of .

步骤3.5、将第二MR增强影像输入至判别器,以根据判别器的判别结果得到训练好的目标影像序列增强模型。Step 3.5: input the second MR enhanced image into the discriminator to obtain a trained target image sequence enhancement model according to the discrimination result of the discriminator.

步骤3.51、将第二MR增强影像输入至判别器,得到判别值。Step 3.51: Input the second MR enhanced image into the discriminator to obtain a discriminant value.

步骤3.52、判断判别值与判别阈值的关系,若判别值大于判别阈值,判别结果为假,则根据峰度损失函数得到的损失值更新判别阈值,并继续对初步训练好的目标影像序列增强模型进行训练(即按照上述训练步骤继续对初步训练好的目标影像序列增强模型进行训练),直至判别值小于或者等于最新的判别阈值,得到训练好的目标影像序列增强模型,若判别值小于或者等于判别阈值,判别结果为真,则将初步训练好的目标影像序列增强模型作为训练好的目标影像序列增强模型。Step 3.52, determine the relationship between the discriminant value and the discriminant threshold. If the discriminant value is greater than the discriminant threshold and the discrimination result is false, then update the discriminant threshold according to the loss value obtained by the kurtosis loss function, and continue to train the preliminarily trained target image sequence enhancement model (that is, continue to train the preliminarily trained target image sequence enhancement model according to the above training steps) until the discriminant value is less than or equal to the latest discriminant threshold, and obtain the trained target image sequence enhancement model. If the discriminant value is less than or equal to the discriminant threshold and the discrimination result is true, then the preliminarily trained target image sequence enhancement model is used as the trained target image sequence enhancement model.

在本实施例中,判别阈值的更新方式为:利用峰度损失函数得到的损失值与未更新的判别阈值相乘,得到更新后的判别阈值。In this embodiment, the updating method of the discrimination threshold is: multiplying the loss value obtained by using the kurtosis loss function by the unupdated discrimination threshold to obtain the updated discrimination threshold.

可选地,峰度损失函数表示为:Alternatively, the kurtosis loss function is expressed as:

;

其中,表示峰度损失函数,表示第二MR增强影像,表示生成器的目标是从的映射,表示对第二MR增强影像中的第个像素点进行期望操作,表示第二MR增强影像的概率分布,表示第二MR增强影像中像素点的数量,表示第二MR增强影像中第个像素点,表示第二MR增强影像中所有像素点的均值,表示第二MR增强影像的标准差,表示待配准的待处理MR影像中第个像素点,表示待配准的待处理MR影像中所有像素点的均值,表示待配准的待处理MR影像的标准差。in, represents the kurtosis loss function, represents the second MR enhanced image, Indicates that the goal of the generator is to arrive The mapping of Indicates the second MR enhanced image Pixels to perform the desired operation, represents the probability distribution of the second MR enhanced image, represents the number of pixels in the second MR enhanced image, Indicates the second MR enhanced image pixels, represents the mean value of all pixels in the second MR enhanced image, represents the standard deviation of the second MR enhanced image, Indicates the first pixels, represents the mean value of all pixels in the MR image to be processed to be registered, Represents the standard deviation of the MR images to be registered.

可选地,判别器包括4个大小从16×16至4×4不等的且依次连接的卷积层,在4个卷积层之后还包括归一化层、激活函数层及全连接层。Optionally, the discriminator includes 4 convolutional layers with sizes ranging from 16×16 to 4×4 and connected in sequence, and also includes a normalization layer, an activation function layer and a fully connected layer after the 4 convolutional layers.

另外,同时由于MR影像数据集较小,容易导致梯度消失或过拟合问题,因此可以在判别器后添加针对影像梯度的范数正则化,以改善训练效果,获得更稳定的判定结果。In addition, since the MR image data set is small, it is easy to cause gradient vanishing or overfitting problems. Therefore, norm regularization for image gradients can be added after the discriminator to improve the training effect and obtain more stable judgment results.

在一个具体的实施例中,在得到训练好的目标影像序列增强模型之后,还可以利用测试集对训练好的目标影像序列增强模型进行测试,可以将上述所获得的未作为训练集的其余若干组匹配影像对作为测试集。以通过测试集对训练好的目标影像序列增强模型进行测试,以确定训练好的目标影像序列增强模型的效果。In a specific embodiment, after obtaining the trained target image sequence enhancement model, the trained target image sequence enhancement model can also be tested using a test set, and the remaining several groups of matching image pairs obtained above that are not used as training sets can be used as test sets. The trained target image sequence enhancement model can be tested using the test set to determine the effect of the trained target image sequence enhancement model.

本发明基于互信息与层间间隔信息相结合进行序列配准;通过在生成器中引入多通道输入与特征提取单元,生成可用于影像融合与自动分割模型训练的MR增强影像,有力缓解了后续融合分割模型训练中的数据缺乏问题,并有利于提高影像三维重建的精度,为医学影像处理领域提供基础技术支撑作用。The present invention performs sequence registration based on the combination of mutual information and inter-layer spacing information; by introducing a multi-channel input and feature extraction unit in the generator, MR enhanced images that can be used for image fusion and automatic segmentation model training are generated, which effectively alleviates the problem of data shortage in subsequent fusion and segmentation model training, and is beneficial to improving the accuracy of image three-dimensional reconstruction, providing basic technical support for the field of medical image processing.

本发明所得到的训练好的目标影像序列增强模型,可以生成MR增强影像,可以用于后续融合分割模型的训练,有助于解决医学影像数据缺乏的问题。其中采用的图注意力模块可以捕捉影像间的相似性信息,优化局部特征的细节;通道注意力模块可以调整特征提取过程中各层输入信息的权重值,共同作用使生成的MR增强影像更为真实,能够为后续训练以及其他应用提供有效的数据。The trained target image sequence enhancement model obtained by the present invention can generate MR enhanced images, which can be used for the training of subsequent fusion segmentation models, and help solve the problem of lack of medical image data. The graph attention module used can capture the similarity information between images and optimize the details of local features; the channel attention module can adjust the weight value of each layer of input information in the feature extraction process, and work together to make the generated MR enhanced images more realistic, which can provide effective data for subsequent training and other applications.

实施例二Embodiment 2

本发明在实施例一的基础上还提供一种多模态影像的配准方法,该多模态影像的配准方法包括:The present invention further provides a multimodal image registration method based on the first embodiment, and the multimodal image registration method includes:

获取待配准CT影像;Acquire the CT image to be registered;

将待配准CT影像输入实施例一所述的训练好的目标影像序列增强模型中,得到配准的MR影像。The CT image to be registered is input into the trained target image sequence enhancement model described in the first embodiment to obtain a registered MR image.

具体地,在实施例一得到训练好的目标影像序列增强模型的基础上,可以将实际需要进行配准的CT影像(即待配准CT影像)输入至训练好的目标影像序列增强模型,训练好的目标影像序列增强模型的生成器便会输出配准的MR影像。Specifically, based on the trained target image sequence enhancement model obtained in Example 1, the CT image that actually needs to be registered (i.e., the CT image to be registered) can be input into the trained target image sequence enhancement model, and the generator of the trained target image sequence enhancement model will output the registered MR image.

本实施例提供的多模态影像的配准方法,其实现原理和技术效果与实施例一提供的多模态影像增强与配准方法类似,在此不再赘述。The implementation principle and technical effect of the multimodal image registration method provided in this embodiment are similar to those of the multimodal image enhancement and registration method provided in Embodiment 1, and will not be described in detail here.

在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。此外,本领域的技术人员可以将本说明书中描述的不同实施例或示例进行结合和组合。In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.

以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims (8)

1. A training method for a model for multi-modal image enhancement and registration, the training method comprising:
Acquiring an MR image sequence to be processed and a CT image sequence to be processed, wherein the MR image sequence to be processed comprises M MR images to be processed which are arranged in sequence, the CT image sequence to be processed comprises N CT images to be processed which are arranged in sequence, and M and N are integers larger than 0;
Obtaining M groups of matched image pairs according to mutual information of the MR image to be processed and the CT image to be processed, and selecting a plurality of groups of matched image pairs from the M groups of matched image pairs as a training set, wherein each group of matched image pairs comprises one MR image to be processed and one CT image to be processed which are matched with each other;
Selecting two MR images to be processed and one CT image to be processed in the training set, inputting the two MR images to be processed, the CT image to be processed and the Gaussian noise image to be processed into a target image sequence enhancement model to be trained together so as to train the target image sequence enhancement model to be trained, and obtaining a trained target image sequence enhancement model, wherein the trained target image sequence enhancement model is used for matching CT images to be registered to obtain registered MR images; wherein, the two MR images to be processed selected in the training set are not matched with the CT images to be processed selected; the target image sequence enhancement model is a model based on generating an countermeasure network, wherein,
The target image sequence enhancement model comprises a generator and a discriminator, wherein the generator comprises an encoder, a feature extraction unit and a decoder;
Selecting two MR images to be processed and one CT image to be processed in the training set, inputting the two selected MR images to be processed, one CT image to be processed and one Gaussian noise image into a target image sequence enhancement model to be trained together so as to train the target image sequence enhancement model to be trained, and obtaining a trained target image sequence enhancement model, wherein the method comprises the following steps:
Selecting two MR images to be processed and one CT image to be processed in the training set, and inputting the two MR images to be processed, the one CT image to be processed and the one Gaussian noise image to the encoder to obtain a first feature matrix corresponding to the Gaussian noise image, a second feature matrix, a third feature matrix and a fourth feature matrix corresponding to the two MR images to be processed respectively;
Inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix to the feature extraction unit to obtain a feature matrix to be decoded;
inputting the feature matrix to be decoded to the decoder to obtain a first MR enhanced image;
Based on the dynamic differential loss function constructed by the first MR enhanced image and the MR image to be processed to be registered, adjusting parameters of the target image sequence enhanced model to be trained in a counter-propagation mode to obtain a primarily trained target image sequence enhanced model, and obtaining a second MR enhanced image output by the primarily trained target image sequence enhanced model; the to-be-registered to-be-processed MR images are selected from the training set and are positioned between two to-be-processed MR images input to the to-be-trained target image sequence enhancement model, and the to-be-processed CT images input to the to-be-trained target image sequence enhancement model and the to-be-registered to-be-processed MR images are positioned in the same group of matched image pairs;
Inputting the second MR enhanced image to the discriminator so as to obtain the trained target image sequence enhanced model according to the discrimination result of the discriminator;
wherein the dynamic differential loss function is expressed as:
Wherein, Representing a dynamic differential loss function,Representing the MR images to be processed to be registered,A first MR enhanced image is represented,The goal of the representation generator is to slaveTo the point ofIs used for the mapping of (a),Representing the first MR-enhanced imageThe desired operation is performed by the individual pixels,Representing the probability distribution of the first MR enhanced image,Representing the number of pixels in the MR image to be processed to be registered,The representation generator registers the first MR image to be processedThe difference in the results of the mapping of the individual pixels to the first MR enhanced image,Representing allAverage value of (2).
2. Training method according to claim 1, characterized in that acquiring an MR image sequence to be processed and a CT image sequence to be processed comprises:
acquiring an initial MR image sequence and an initial CT image sequence, wherein the initial MR image sequence comprises M Zhang Chushi MR images, and the initial CT image sequence comprises N initial CT images;
Converting the brightness values of the initial MR image and the initial CT image into gray values to obtain an MR gray image and a CT gray image;
Respectively reassigning the gray values of the MR gray scale image and the CT gray scale image by adopting a histogram equalization algorithm, so that the gray values of the MR gray scale image and the CT gray scale image are uniformly distributed within a preset range, and an MR uniform distribution image and a CT uniform distribution image are obtained;
And respectively homogenizing the gray values of the MR uniform distribution image and the CT uniform distribution image to the interval of [0, 255] to obtain the MR image to be processed and the CT image to be processed, wherein all the MR images to be processed form the MR image sequence to be processed, and all the CT images to be processed form the CT image sequence to be processed.
3. Training method according to claim 1, characterized in that obtaining M sets of matching image pairs from mutual information of the MR image to be processed and the CT image to be processed comprises:
Acquiring a first MR image to be processed in the MR image sequence to be processed;
Selecting a CT image to be processed with the maximum mutual information between the CT image to be processed and the first MR image to be processed from the CT image sequence to be processed based on the mutual information between the first MR image to be processed and the CT image to be processed, and forming a first group of matched image pairs;
And based on a preset step length, selecting matched CT images to be processed from the second MR image to be processed to the M th MR image to be processed in the CT image sequence to be processed, and obtaining M-1 group matching image pairs.
4. A training method according to claim 3, wherein selecting the matched CT images from the CT image sequences to be processed for the second MR image to be processed to the mth MR image to be processed based on a preset step length, to obtain M-1 group of matched image pairs, comprises:
For the (m+1) th to-be-processed MR image, judging whether n+lambda is an integer, if so, selecting the (n+lambda) th to-be-processed CT image from the to-be-processed CT image sequence as an to-be-matched image, if not, selecting the to-be-processed CT image with larger mutual information with the (m+1) th to-be-processed MR image from two to-be-processed CT images adjacent to the (n+lambda) th to-be-processed CT image as the to-be-matched image, wherein the (M) th to-be-processed MR image and the (N) th to-be-processed CT image form an (M) th to-be-matched image pair, lambda is a preset step length, lambda=Sm/Sc, sm is an interlayer interval of the to-be-processed MR image sequence, sc is an interlayer interval of the to-be-processed CT image sequence, M is more than or equal to 1 and M is less than or equal to 1 and N is less than or equal to N;
Judging whether mutual information between the CT image to be matched and the (m+1) th MR image to be processed is larger than or equal to a preset threshold value, if so, forming the CT image to be matched and the (m+1) th MR image to be processed into an (m+1) th group matching image pair, and if not, selecting the CT image to be processed with the largest mutual information between the CT image to be matched and the (m+1) th MR image to be processed from the CT image sequence to be processed, and forming the (m+1) th group matching image pair.
5. The training method of claim 1, wherein the feature extraction unit comprises a graph attention module, a channel attention module, and a residual structure;
Inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix to the feature extraction unit to obtain a feature matrix to be decoded, including:
Inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix into the drawing attention module, wherein the drawing attention module obtains a fifth feature matrix corresponding to the Gaussian noise image, a sixth feature matrix, a seventh feature matrix and an eighth feature matrix corresponding to the MR image to be processed, wherein the sixth feature matrix, the seventh feature matrix and the eighth feature matrix correspond to the CT image to be processed are respectively corresponding to the two MR images to be processed through capturing the similarity among features;
Inputting the fifth feature matrix, the sixth feature matrix, the seventh feature matrix and the eighth feature matrix into the channel attention module, wherein the channel attention module obtains a first weight of the fifth feature matrix, a second weight of the sixth feature matrix, a third weight of the seventh feature matrix and a fourth weight of the eighth feature matrix through convolution operation, multiplies the first weight by the fifth feature matrix, the second weight by the sixth feature matrix, the third weight by the seventh feature matrix, the fourth weight by the eighth feature matrix, and adds all multiplication results to obtain a ninth feature matrix;
And inputting the ninth feature matrix into the residual structure, and obtaining the feature matrix to be decoded after convolution operation.
6. The training method of claim 5, wherein inputting the first feature matrix, the second feature matrix, the third feature matrix, and the fourth feature matrix to the attention module, the attention module obtaining a fifth feature matrix corresponding to the gaussian noise image, a sixth feature matrix corresponding to the two MR images to be processed, a seventh feature matrix, and an eighth feature matrix corresponding to the CT image to be processed by capturing similarities between features, comprises:
step 3.211, inputting the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix to the drawing force module, and then dividing the first feature matrix into a plurality of first matrix blocks;
Step 3.212, sequentially selecting one first matrix block, and respectively selecting a second matrix block, a third matrix block and a fourth matrix block which are the same as the first matrix block in position from the second feature matrix, the third feature matrix and the fourth feature matrix;
Step 3.213, combining the first matrix block, the second matrix block, the third matrix block and the fourth matrix block into a combined matrix;
step 3.214, selecting a plurality of pixel points adjacent to the first matrix block to obtain a pixel matrix;
Step 3.215, combining the combination matrix and the pixel matrix into a splicing matrix;
Step 3.216, respectively performing weighted summation processing on the first matrix block, the second matrix block, the third matrix block and the fourth matrix block in the spliced matrix according to the connection relationship among the first matrix block, the second matrix block, the third matrix block and the fourth matrix block, so as to respectively and correspondingly obtain a fifth matrix block, a sixth matrix block, a seventh matrix block and an eighth matrix block;
Step 3.217, replacing the first matrix block of the first feature matrix, the second matrix block of the second feature matrix, the third matrix block of the third feature matrix, and the fourth matrix block of the fourth feature matrix with the fifth matrix block, the sixth matrix block, the seventh matrix block, and the eighth matrix block;
and step 3.218, repeating the steps 3.212 to 3.217 until all matrix blocks in the first feature matrix, the second feature matrix, the third feature matrix and the fourth feature matrix are replaced, and correspondingly obtaining the fifth feature matrix, the sixth feature matrix, the seventh feature matrix and the eighth feature matrix.
7. The training method of claim 1, wherein inputting the second MR enhanced image to the arbiter to obtain the trained target image sequence enhancement model based on the discrimination result of the arbiter comprises:
Inputting the second MR enhanced image to the discriminator to obtain a discrimination value;
Judging the relation between the judging value and the judging threshold value, if the judging value is larger than the judging threshold value and the judging result is false, updating the judging threshold value according to the loss value obtained by the kurtosis loss function, continuing training the primarily trained target image sequence enhancement model until the judging value is smaller than or equal to the latest judging threshold value, obtaining the trained target image sequence enhancement model, and if the judging value is smaller than or equal to the judging threshold value and the judging result is true, taking the primarily trained target image sequence enhancement model as the trained target image sequence enhancement model.
8. A method for registration of multi-modal images, comprising:
Acquiring CT images to be registered;
Inputting the CT image to be registered into the trained target image sequence enhancement model according to any one of claims 1 to 7, and obtaining a registered MR image.
CN202410840678.4A 2024-06-27 2024-06-27 Model training method and registration method for multimodal image enhancement and registration Active CN118397059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410840678.4A CN118397059B (en) 2024-06-27 2024-06-27 Model training method and registration method for multimodal image enhancement and registration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410840678.4A CN118397059B (en) 2024-06-27 2024-06-27 Model training method and registration method for multimodal image enhancement and registration

Publications (2)

Publication Number Publication Date
CN118397059A CN118397059A (en) 2024-07-26
CN118397059B true CN118397059B (en) 2024-09-17

Family

ID=91996007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410840678.4A Active CN118397059B (en) 2024-06-27 2024-06-27 Model training method and registration method for multimodal image enhancement and registration

Country Status (1)

Country Link
CN (1) CN118397059B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906720A (en) * 2021-03-19 2021-06-04 河北工业大学 Multi-label image identification method based on graph attention network
CN114882051A (en) * 2022-04-25 2022-08-09 大连理工大学 Automatic segmentation and three-dimensional reconstruction method for pelvic bone tumor based on multi-modal image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7583857B2 (en) * 2005-08-24 2009-09-01 Siemens Medical Solutions Usa, Inc. System and method for salient region feature based 3D multi modality registration of medical images
CN113506334B (en) * 2021-06-07 2023-12-15 刘星宇 Multi-mode medical image fusion method and system based on deep learning
CN116402865B (en) * 2023-06-06 2023-09-15 之江实验室 A multi-modal image registration method, device and medium using diffusion model
CN116823613A (en) * 2023-06-30 2023-09-29 复旦大学 Multimodal MR image super-resolution method based on gradient enhanced attention

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906720A (en) * 2021-03-19 2021-06-04 河北工业大学 Multi-label image identification method based on graph attention network
CN114882051A (en) * 2022-04-25 2022-08-09 大连理工大学 Automatic segmentation and three-dimensional reconstruction method for pelvic bone tumor based on multi-modal image

Also Published As

Publication number Publication date
CN118397059A (en) 2024-07-26

Similar Documents

Publication Publication Date Title
Prajapati et al. Classification of dental diseases using CNN and transfer learning
Torosdagli et al. Deep geodesic learning for segmentation and anatomical landmarking
Miki et al. Classification of teeth in cone-beam CT using deep convolutional neural network
CN106373109B (en) A kind of medical image mode synthetic method
Men et al. Cascaded atrous convolution and spatial pyramid pooling for more accurate tumor target segmentation for rectal cancer radiotherapy
TW202040585A (en) Method and apparatus for automated target and tissue segmentation using multi-modal imaging and ensemble machine learning models
CN110246580B (en) Cranial image analysis method and system based on neural network and random forest
WO2022178997A1 (en) Medical image registration method and apparatus, computer device, and storage medium
US20240412335A1 (en) Method and apparatus for training artifact removal model, device, medium, and program product
Lv et al. Automatic segmentation of temporal bone structures from clinical conventional CT using a CNN approach
Wang et al. Functional and anatomical image fusion based on gradient enhanced decomposition model
Chen et al. Detection of various dental conditions on dental panoramic radiography using Faster R-CNN
Khazaei et al. Sex determination from lateral cephalometric radiographs using an automated deep learning convolutional neural network
CN116563533A (en) Medical image segmentation method and system based on prior information of target position
CN114066798B (en) Brain tumor nuclear magnetic resonance image data synthesis method based on deep learning
Zhu et al. 3D pyramid pooling network for abdominal MRI series classification
CN111192334B (en) Trainable Compressed Sensing Module and an Image Segmentation Method
CN116091412A (en) Method for segmenting tumor from PET/CT image
Yang et al. Automatic segmentation in fetal ultrasound images based on improved U-net
Zakirov et al. Dental pathology detection in 3D cone-beam CT
CN118397059B (en) Model training method and registration method for multimodal image enhancement and registration
WO2021052150A1 (en) Radiation therapy plan recommendation method and apparatus, electronic device, and storage medium
CN112862801A (en) Method for segmenting complex blood vessel based on neural network
CN118470043A (en) Automatic medical image segmentation method based on cognitive deep learning
CN111612762A (en) MRI brain tumor image generation method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant