Image segmentation method and system in multi-task learning network

A multi-task learning network with attention modules enhances lung lobe segmentation in CT images by optimizing feature extraction and reducing network complexity, achieving accurate and efficient segmentation.

JP2024143991AInactive Publication Date: 2024-10-11ZHEJIANG LAB

Patent Information

Application Number
JP2023131794
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-29
Filing Date
2023-08-14
Publication Date
2024-10-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Conventional lung lobe segmentation methods in CT images require multiple training processes, increasing deployment cost and network complexity, and often erroneously segment non-lung regions.

Method used

A multi-task learning network with a channel attention module and sharpening spatial attention module is used to enhance feature extraction and segmentation accuracy, optimizing the network for lung lobe and parenchyma segmentation in CT images.

Benefits of technology

The method achieves fast and accurate segmentation of lung lobes in CT images by adaptively weighting tasks and reducing the complexity of network training, while minimizing errors in non-lung region segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024143991000001_ABST
    Figure 2024143991000001_ABST
Patent Text Reader

Abstract

SOLUTION: The invention discloses an image segmentation method and system combined with attention under a multi-task network. According to the method, a first segmentation task for a first segmentation object is used as a main task, a second segmentation task for a second segmentation object is used as an auxiliary task, the first segmentation task and the second segmentation task are subjected to parallel calculation; and a channel attention module and a sharpening space attention module are inserted into the network. The channel attention module can strengthen channel feature information, the sharpening space attention module can strengthen edge information, and the network can adaptively balance different tasks and optimize a multi-task network; and finally, the segmentation model obtained by training can realize rapid and accurate segmentation of the three-dimensional image.EFFECT: The segmentation performance for the first segmentation object of the deep network is improved.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of medical image processing, and more particularly to an image segmentation method and system, especially combining attention in multi-task learning networks. [Background technology]

[0002] The lung parenchyma is a large, low-gray scale connected region on a computed tomography (CT) image. In image segmentation, the mainstream of lung parenchyma segmentation is to separate the lung parenchyma from other structures of the thoracic cavity using a threshold, obtain the connected left and right lungs based on region growing, remove the main trachea and the main bronchi extending to the lungs, and further fill the holes formed by blood vessels, nodules, etc. in the parenchyma to obtain the complete lung tissue. The human lung is divided into five functional regions, which are called lobes. Each of the five lobes is functionally independent and has its own bronchial and vascular system. Identification of these lobes has important applications in disease assessment and treatment planning. Many lung diseases act at the lobe level. Measuring lung diseases at the lobe level has important clinical significance in assessing disease phenotypes and their severity. Lobe segmentation has further applications in surgical treatment planning. Determining the location, shape and volume of lung lobes is very important in planning investigations and surgical operations. Traditional lung lobe segmentation methods generally use lung parenchyma segmentation as a preprocessing means to reduce the possibility of erroneously segmenting non-lung areas during lobe segmentation, but such methods require the training process to be divided into multiple stages, which increases the deployment cost of the segmentation model and the operational complexity of network training. Therefore, we choose a multi-task learning method in which lung lobe segmentation is the main task and lung parenchyma segmentation is the auxiliary task, and train the two task networks in parallel, and adaptively adjust the weights of the multi-tasks to realize the optimization of the learning network. As deep learning advances, researchers have begun to use deep learning to realize automatic segmentation of lung lobes in CT images. A neural network system based on convolutional operations, i.e., convolutional neural network, is one of the most commonly used methods in deep learning.

[0003] Convolutional Neural Networks (CNNs) are feedforward neural networks that have excellent performance in image processing, especially large-scale image processing, due to the characteristics of their network configuration, and are therefore used on a large scale in applications such as image recognition and object detection. Convolutional neural networks are widely used because they require significantly more computational power than other network structures.

[0004] Generative Adversarial Network (GAN) is an important generative model in the field of deep learning, i.e., two networks (generator and discriminator) are trained simultaneously and compete with the minimax algorithm (minimax). This adversarial method avoids some difficulties in the practical application of some traditional generative models, and successfully approximates some unsolvable loss functions by adversarial learning, and has been widely applied in the generation of data such as images, videos, natural language, and music. Semantic segmentation models based on adversarial networks have been shown to be more efficient in exploiting the mismatch between generated images and target segmented images. How to design the generator of the adversarial network to better obtain context space information to complete an effective image codec task is an important step in utilizing semantic segmentation models based on adversarial networks. Therefore, an efficient image segmentation method in multi-task learning networks is required. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the objective of the present invention is to provide an image segmentation method and system that combines attention in a multi-task learning network. [Means for solving the problem]

[0006] The technical solutions adopted in the present invention are specifically as follows: The present invention provides an image segmentation method combining attention in a multi-task learning network, the method comprising: inputting the 3D CT image to be segmented into a segmentation model to obtain a predicted segmented image; The decomposition model is composed of an encoder and a first decoder in a pre-trained multi-task learning network, and a method for training the multi-task learning network includes: constructing a training dataset, each sample of the training dataset including a 3D CT image including a designated organ, and a first label and a second label corresponding to a first segmentation target and a second segmentation target in the designated organ, respectively; constructing a multi-task learning network including an encoder, a first decoder, and a second decoder; the encoder is used to perform feature extraction on an input 3D CT image, the first decoder is used to decode the features extracted by the encoder to obtain a predicted first segmented image, the second decoder is used to decode the features extracted by the encoder to obtain a predicted second segmented image, the first segmented image is used to indicate a region of the first segmentation target in the 3D CT image, and the second segmented image is used to indicate a region of the second segmentation target in the 3D CT image; inserting a channel attention module into at least one of the downsampling blocks of the encoder and / or at least one of the upsampling blocks of the first decoder and at least one of the upsampling blocks of the second decoder, such that each block having the channel attention module models channel information to highlight important features before a convolution operation; and inserting a sharpening spatial attention module into at least one of the downsampling blocks of the encoder, such that each downsampling block having the sharpening spatial attention module performs an image sharpening operation on the output image before output. The method includes a step of using each sample of the training dataset as an input of the multi-task learning network, training the network with the goal of minimizing an error between the predicted first segmented image and the predicted second segmented image and a label, optimizing parameters of the multi-task learning network, and obtaining a trained multi-task learning network.

[0007] Further, the channel attention module includes a pooling layer, a first 2D convolution layer, a 1D convolution layer, a second 2D convolution layer and an activation function layer connected in sequence, where the pooling layer is used to obtain global spatial information of an input image, the first 2D convolution layer is used to compress the number of channels for the global spatial information obtained by the pooling layer, the 1D convolution layer is used to perform convolution on the global spatial information with the compressed number of channels output by the first 2D convolution layer, and enhance the modeling ability of the channel information, the second 2D convolution layer is used to perform convolution on the output of the 1D convolution layer, and the activation function layer is used to map the output of the second 2D convolution layer to obtain feature channel weights, and selectively emphasize features containing useful information for the input image of the channel attention module and suppress unnecessary features based on the feature channel weights, so as to obtain the output of the channel attention module.

[0008] Furthermore, the sharpened spatial attention module includes an average pooling layer, a max pooling layer, a sharpening filter module, a convolution kernel and an activation function layer, in which the average pooling layer and the max pooling layer are used for pooling the input feature maps of the sharpened spatial attention module respectively and concatenating the pooled feature maps to obtain a two-channel feature map, the sharpening filter module is used for sharpening feature edge information of the two-channel feature map by performing an image sharpening process on the two-channel feature map, the convolution kernel is used for merging the sharpened two-channel feature map into a one-layer feature map, and the activation function layer is used for mapping the merged one-layer feature map to obtain feature weights, and element-wise multiplying the feature weights and the input feature map of the sharpened spatial attention module in a spatial dimension to obtain an output of the sharpened spatial attention module.

[0009] Furthermore, the objective function having the objective of minimizing the error between the predicted first segmented image and the predicted second segmented image and the label is

number

number

[0010] Furthermore, the multi-task learning network further includes a classifier, which, together with a generator consisting of an encoder and a first decoder, constitutes a generative adversarial network model, and the generative adversarial network model is trained to optimize parameters of the multi-task learning network by constructing a loss function of the predicted first segmented image and the first label.

[0011] Furthermore, the loss function of the predicted first segmented image and the first label is The loss function of the classifier and the loss function of the generator are included, where the loss function of the classifier is a distribution p z and the first label distribution p real The loss function of the generator is loss G =BCE[G(x),Real]-E x~pz [D(x)], Here, BCE[G(x),Real] denotes the binary cross entropy loss between the predicted first segmented image G(x) output by the generator G and the first label Real, D(x) denotes the output of the discriminator, E denotes expectation, and x denotes the 3D CT image.

[0012] Furthermore, the designated organ is a lung, the first segmentation object is a lung lobe, and the second segmentation object is a lung parenchyma.

[0013] The present invention further provides an image segmentation system combining attention in a multi-task learning network, the system comprising: a data acquisition module for acquiring a 3D CT image to be segmented; a segmentation module for inputting the 3D CT image to be segmented into a segmentation model and obtaining a predicted segmented image; a training module for training the multi-task learning network; The split model is composed of an encoder and a first decoder in a pre-trained multi-task learning network; The training module includes: constructing a training dataset, where each sample of the training dataset includes a 3D CT image including a designated organ, and a first label and a second label corresponding to a first segmentation target and a second segmentation target in the designated organ, respectively; Construct a multi-task learning network including an encoder, a first decoder, and a second decoder, where: the encoder is used to perform feature extraction on an input 3D CT image, the first decoder is used to decode the features extracted by the encoder to obtain a predicted first segmented image, the second decoder is used to decode the features extracted by the encoder to obtain a predicted second segmented image, the first segmented image is used to indicate a region of the first segmentation target in the 3D CT image, and the second segmented image is used to indicate a region of the second segmentation target in the 3D CT image; A channel attention module is inserted into at least one of the downsampling blocks of the encoder, and / or at least one of the upsampling blocks of the first decoder, and at least one of the upsampling blocks of the second decoder, so that each block having the channel attention module models channel information to enhance important features before a convolution operation; a sharpening spatial attention module is inserted into at least one of the downsampling blocks of the encoder, so that each downsampling block having the sharpening spatial attention module performs an image sharpening operation on an output image before output; Each sample of the training dataset is used as an input to the multi-task learning network, training is performed with the goal of minimizing the error between the predicted first segmented image and the predicted second segmented image and the label, and parameters of the multi-task learning network are optimized to obtain a trained multi-task learning network.

[0014] Furthermore, the sharpened spatial attention module includes an average pooling layer, a maximum pooling layer, a sharpening filter module, a convolution kernel and an activation function layer, in which the average pooling layer and the maximum pooling layer are used for pooling the input feature maps of the sharpened spatial attention module respectively and concatenating the pooled feature maps to obtain a two-channel feature map, the sharpening filter module is used for sharpening feature edge information of the two-channel feature map by performing an image sharpening process on the two-channel feature map, the convolution kernel is used for merging the sharpened two-channel feature map into a one-layer feature map, and the activation function layer is used for mapping the merged one-layer feature map to obtain feature weights, and element-wise multiplying the feature weights and the input feature map of the sharpened spatial attention module in the spatial dimension to obtain an output of the sharpened spatial attention module.

[0015] The present invention further provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable by the processor, the processor, when executing the computer program, implementing an image segmentation method for combining attention in the multi-task learning network.

[0016] The present invention further provides a storage medium containing computer-executable instructions which, when executed by a computer processor, perform the image segmentation method for combining attention in a multi-task learning network. Effect of the Invention

[0017] The beneficial effects of the present invention are as follows. The present invention discloses an image segmentation method and system combining attention in a multi-task network. The present invention takes a first segmentation task for a first segmentation object as a main task, and a second segmentation task for a second segmentation object as an auxiliary task, and calculates the first segmentation task and the second segmentation task in parallel, and inserts a channel attention module and a sharpening spatial attention module into the network. The channel attention module can emphasize channel feature information, and the sharpening spatial attention module can emphasize edge information, and the network adaptively weights different tasks and optimizes the multi-task network, and finally the segmentation model obtained by training can realize fast and accurate segmentation of a 3D image. The present invention can effectively use a neural network to learn shared features between multiple tasks, which is expected to extract more comprehensive features, strengthen the performance of the main task segmentation network, and improve the segmentation ability of the deep network for the first segmentation object without increasing the complexity of the deep network in practical use. [Brief description of the drawings]

[0018] [Figure 1] FIG. 1 is a structural diagram of an image segmentation network based on the generative adversarial network (GAN) model of the present invention. [Diagram 2] This is a diagram of the architecture of the U-Net fully convolutional neural network. [Diagram 3] FIG. 2 is a schematic diagram of a connection structure of an encoder, a first decoder, and a second decoder. [Figure 4] FIG. 2 is a structural diagram of the sharpening spatial attention module of the present invention; [Diagram 5] FIG. 1 is a structural diagram of an image segmentation system that combines attention in a multi-task learning network of the present invention. [Figure 6] FIG. 2 is a structural diagram of an electronic device according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] The image segmentation method combining attention in a multi-task learning network provided by the present invention will be described in more detail below with reference to the drawings and specific embodiments. The advantages and features of the present invention will be more apparent from the following description. Note that the drawings are all very simplified and use inaccurate proportions, only for the purpose of conveniently and clearly assisting in explaining the embodiments of the present invention.

[0020] An embodiment of the present invention provides an image segmentation method combining attention in a multi-task learning network, where attention refers to inserting a channel attention module into U-Net to improve the spatial information modeling ability of the generator network to obtain more important channel information, and a sharpening spatial attention module to enhance edge information, so as to better obtain contextual spatial information to achieve effective image codec work.

[0021] The image segmentation method combining attention in a multi-task learning network provided by the embodiment of the present invention may be executed on a computer device having a certain computing capability, such as a terminal, a server, etc. The method includes the steps of inputting a 3D CT image to be segmented into a segmentation model and obtaining a predicted segmented image, where the segmentation model is composed of an encoder and a first decoder in a pre-trained multi-task learning network, and the training method of the multi-task learning network includes the following steps 1 to 3.

[0022] In step 1, a training dataset is constructed. Each sample of the training dataset includes a 3D CT image including a designated organ, and a first label and a second label corresponding to a first segmentation target and a second segmentation target in the designated organ, respectively.

[0023] In step 2, a multi-task learning network is constructed, which includes an encoder, a first decoder and a second decoder.

[0024] Here, the encoder is used to perform feature extraction on the input 3D CT image, the first decoder is used to decode the features extracted by the encoder to obtain a predicted first segmented image, the second decoder is used to decode the features extracted by the encoder to obtain a predicted second segmented image, the first segmented image is used to indicate a region of a first segmentation target in the 3D CT image, and the second segmented image is used to indicate a region of a second segmentation target in the 3D CT image. A channel attention module is inserted into at least one of the multiple downsampling blocks of the encoder and / or at least one of the multiple upsampling blocks of the first decoder and at least one of the multiple upsampling blocks of the second decoder, so that each block having the channel attention module models channel information prior to the convolution operation to highlight important features, and a sharpening spatial attention module is inserted into at least one of the multiple downsampling blocks of the encoder, so that each downsampling block having the sharpening spatial attention module performs an image sharpening process on the output image before output.

[0025] In step 3, each sample in the training dataset is used as the input of the multi-task learning network, and training is performed with the goal of minimizing the error between the predicted first segmented image and the predicted second segmented image and the label, and the parameters of the multi-task learning network are optimized to obtain a trained multi-task learning network.

[0026] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are hereinafter described in detail using an example in which the designated organ is lung, the first segmentation object is pulmonary lobe, and the second segmentation object is pulmonary parenchyma.

[0027] In one embodiment of the present application, the image segmentation method combining attention in the above multi-task learning network specifically includes the steps of inputting a 3D CT image to be segmented into a segmentation model and obtaining a predicted lung lobe segmentation image.

[0028] Here, the segmentation model is composed of an encoder and a first decoder in a pre-trained multi-task learning network. The multi-task learning network is a network constructed under a multi-task learning framework, which can jointly learn similar and related tasks based on input data. Each task shares the same underlying network, and weights are trained to be optimal for all functions. Since a chest 3D CT image includes surrounding organs and lung regions, and key information is located in the lungs, the first task of lung lobe segmentation is lung parenchyma segmentation. Based on the above characteristics, in the multi-task learning network constructed by the present invention, the main task is lung lobe segmentation, the auxiliary task is lung parenchyma segmentation, and the auxiliary task aims to prevent regions other than the lungs from being mistakenly treated as lung lobe regions. The main task and the auxiliary task are two tasks that are parallel and have no order. The main task and the auxiliary task complement each other so that all functions become optimal models through training. Specifically, the training process may include steps S1 to S3.

[0029] In step S1, a training dataset is constructed, and each sample of the training dataset includes a 3D CT image and a corresponding lung lobe label and lung parenchyma label.

[0030] A CT image is a three-dimensional scanned image, which may be considered to be composed of a stack of multiple two-dimensional images, where a two-dimensional image can be defined as a slice. In a CT image, a single CT slice is similar to a grayscale image in a natural image and belongs to a single-channel image. Generally, the image size of a single slice in all CT images is consistent, for example, all are 512*512, and there is no need to perform pre-processing cropping. There is a slight difference in the number of slices in different CT images, but this does not have a significant impact on the experimental results. The corresponding lung lobe labels and lung parenchyma labels are lung lobe masks and lung parenchyma masks. An annotation file is established to store image classification data, and the training set and validation set can be divided at a certain ratio as necessary.

[0031] In step S2, a multi-task learning network is constructed, including an encoder, a first decoder and a second decoder, in which the encoder is used to perform feature extraction on the input 3D CT image, the first decoder is used to complete the main task of decoding the features extracted by the encoder to obtain a predicted lung lobe segmentation image, and the second decoder is used to complete the auxiliary task of decoding the features extracted by the encoder to obtain a predicted lung parenchyma segmentation image.

[0032] FIG. 3 shows a schematic diagram of the connection structure of the encoder, the first decoder and the second decoder, where the input terminals of the first decoder and the second decoder are both connected to the output terminal of the encoder, and the encoder and the first decoder, the encoder and the second decoder may all adopt the U-Net structure, that is, the U-Net fully convolutional neural network is the two-dimensional image classification network of the main task and the auxiliary task. Based on the U-Net structure, the first and second decoder networks are established based on the representation obtained from the encoder network, and have the transpose architecture of the encoder network. FIG. 2 shows the structure diagram of the U-Net fully convolutional neural network, where the U-Net is divided into a contracting path and an expansive path. Here, the contracting path is the encoder, and the expansive path is the decoder. As an alternative embodiment, the compression path (encoder) shown in FIG. 2 and FIG. 3 consists of four down-sampling blocks, each of which uses multiple valid convolutions and one Max Pooling Layer, and the valid convolutions consist of a Convolution Layer, a Batch Normalization Layer, and a ReLu (Rectified Linear Unit) function. Some blocks have two valid convolutions, and some have three valid convolutions, so the number of feature maps is doubled after each downsampling. The expansion path (decoder) consists of four up-sampling blocks, each of which includes a Max Unpooling Layer and multiple valid convolutions.Before upsampling begins, the upsampling block doubles the size of the feature maps by deconvolution and halves their number (the last upsampling block is slightly different), then it combines the feature maps output by the upsampling block of the right augmented path with the feature maps output by the downsampling block of the symmetric left compression path. Because the feature maps of the left compression path and the right augmented path are different in size, U-Net crops and normalizes the feature maps of the compressed path to the same size as the feature maps of the augmented path (i.e., the black arrows in Figure 2), which is called the concatenation operation. The last upsampling block uses a SoftMax function to output a spatial resolution with dimensions equal to the input CT image, and the number of channels is equal to the number of split classes. The last upsampling block of the auxiliary task consists of two channels, which are lung and non-lung. The last upsampling block of the main task consists of five lung lobes and six channels, which are background.

[0033] In an embodiment of the present invention, a channel attention module is inserted into at least one of the downsampling blocks of the encoder and / or at least one of the upsampling blocks of the first decoder and at least one of the upsampling blocks of the second decoder, so that each block having the channel attention module models channel information before the convolution operation to emphasize important features. By adding an attention mechanism in a convolution network, the network can be guided to analyze which information is important and which information is secondary, and assign weights (also called scoring) to the information so as to increase the weight of the important information and decrease the weight of the secondary information. The squeeze-and-excitation (SE) attention mechanism improves the network's ability to represent channel information by modeling the dependency between channels, and can adjust features for each channel so that the network learns global information to selectively emphasize features containing useful information and suppress unnecessary features. As an example, by inserting a channel attention module into each block of the encoder and decoder, each block models channel information before the convolution operation to emphasize important features. As an alternative embodiment, the structure of the channel attention module is similar to that of the SE block, and one 1D convolution layer is added between the two fully connected layers of the SE block to enhance the modeling ability for channel information, and the fully connected layers in the SE block are replaced with 2D convolution layers. That is, the channel attention module includes a pooling layer, a first 2D convolution layer, a 1D convolution layer, a second 2D convolution layer and an activation function layer, which are connected in sequence. The feature map X of the input image of the channel attention module is X∈R. N×C×H×W where N is the batch size, C is the number of channels, H, W are the height and width of the input image, respectively, and R N×C×H×Wdenotes a real vector space with dimensions N × C × H × W. First, we use a pooling layer to obtain global spatial information, and then obtain the output X1 after inputting X into the pooling layer.

number

[0034] Here, i, j are height and width indices, and Avgpool() is an average pooling operation. Then, the number of channels of X1 is compressed, and the number of channels is compressed according to the proportionality r to X1 using the first 2D convolution layer K1 with a convolution kernel of 1×1, and the element rearrangement (Reshape) operation is used to rearrange X1 to obtain the output X2 after inputting X1 into the first 2D convolution layer K1.

number

[0035] Reshape() indicates the element rearrangement operation. In order to enhance the modeling ability for channel information, X2 is fed into a 1D convolution layer K2 with a convolution kernel of 3, and then the Reshape operation is used to restore the size, and the output X3 is obtained after X2 is input into the 1D convolution layer K2.

number

[0036] X3 is fed into a second 2D convolutional layer K3 with a convolution kernel of 1×1 and a sigmoid activation function layer to obtain the feature channel weights X4. X4=δ(K3*X3),X4∈R N×C×1×1 Here, δ represents a Sigmoid function.

[0037] Finally, for the inter-channel dependencies obtained by modeling the above steps, we selectively emphasize features containing useful information and suppress unnecessary features, and obtain the output X O get.

number

[0038] A sharpening spatial attention module is inserted into at least one of the downsampling blocks of the encoder, so that each downsampling block with the sharpening spatial attention module performs image sharpening processing on the output image before output. In the field of image processing, image sharpening is a common edge information enhancement method, which is used to enhance the edge details of objects in an image. Introducing the image sharpening method into the spatial attention module, i.e., the sharpening spatial attention, aims to enhance the edge information of the detection target in the intermediate feature map. Preferably, a sharpening spatial attention module is inserted into each downsampling block of the encoder to comprehensively enhance the spatial localization ability of the network for the target object and to enhance the edge information of the detection target. Figure 4 shows a structural schematic diagram of the sharpening spatial attention module, which includes an average pooling layer, a maximum pooling layer, a sharpening filter module, a convolution kernel and an activation function layer, and is specifically as follows:

[0039] The average pooling layer and the max pooling layer respectively process and extract the input feature map of the sharpening spatial attention module to obtain a two-channel feature map, i.e., combine average pooling and max pooling to obtain sufficient feature information in the spatial dimension. The sharpening filter module then performs image sharpening processing on the two-channel feature map obtained by the average pooling and max pooling methods, and in this process, an edge detection operator needs to be introduced to sharpen the feature edge information of the two-channel feature map. Then, the sharpened two-channel feature map is merged into a one-layer feature map using a 1×2×1×1 convolution kernel to output, where 1×2×1×1 indicates the number of convolution kernels×channels of the convolution kernel×width of the convolution kernel×height of the convolution kernel. The output boundary is further restricted by a Sigmoid function to obtain feature weights, and the feature weights are element-wise multiplied by the original feature map (i.e., the input feature map of the sharpening spatial attention module) in the spatial dimension to increase the weights of the feature edges, and obtain the feature map processed by the sharpening spatial attention module.

[0040] The equation for the sharpening spatial attention module is expressed as follows:

number

[0041] In step S3, each sample of the training dataset is used as an input to the multi-task learning network, and training is performed with the goal of minimizing the error between the predicted lung lobe segmentation image and the predicted lung parenchyma segmentation image and the label, and the parameters of the multi-task learning network are optimized to obtain a trained multi-task learning network.

[0042] Through the above step S3, the multi-task learning network can simultaneously perform the lung lobe segmentation task and the lung parenchyma segmentation task, adaptively adjust the weights between different tasks, train and optimize the parameters of the multi-task learning network, and finally obtain a more effective lung lobe segmentation image.

[0043] The multi-task learning network is mainly constructed based on the regularization framework, and its objective function is

number

number

number

number

[0044] Furthermore, the training of the main task in the multi-task learning network is trained in a generative adversarial manner, that is, the multi-task learning network further includes a classifier, which together with a generator composed of an encoder and a first decoder constitutes a generative adversarial network model, and a loss function between the predicted lobe segmentation image and the lobe label is constructed to train the generative adversarial network model, thereby optimizing the parameters of the multi-task learning network. The technical solution is a multi-task learning lobe segmentation method that integrates a generative adversarial network model and an attention mechanism, in which an end-to-end segmentation network U-Net is used to construct a generator in the generative adversarial network model, and a generative adversarial network model is constructed together with the classifier to further improve the overall performance. Figure 1 shows a structural diagram of a lobe segmentation network based on a generative adversarial network (GAN) model of the present invention. First, the adversarial generative network model is mainly composed of two networks, a generator G and a discriminator D. The purpose of the generator G is to package one noise into one true sample, and the discriminator D needs to judge whether the input sample is a true sample or a fake sample, that is, it is a joint process. As the discriminator D's discrimination ability for the sample continues to increase, the generator G's counterfeiting ability also continues to increase. The optimization of the adversarial generative network model is a minimax game, and the ultimate goal is to make it difficult to judge whether the output of the generator is given to the discriminator, that is, to maximize the discriminator D's judgment ability and minimize the probability that the discriminator D judges the output to be false.

[0045] For example, in the lobe segmentation method, a generator network first predicts a lobe mask, and then a discriminator judges whether an input sample is true or false, i.e., outputs the probability that the input is from a true sample or from the generator network. If the discriminator network can well discriminate whether the input is a true sample or not, it can explain in a gradient manner what input is more similar to the true sample, and adjust the generator network based on this information. Therefore, the generator needs to make its output as similar to the true sample as possible, while the discriminator discriminates cases that are not true samples as much as possible. In this way, the performance of the lobe segmentation network is optimized to generate a lobe mask with higher accuracy. In addition, the combination of the channel attention module and the sharpening spatial attention module with the U-Net enhances the modeling ability of the lobe segmentation network for channel information, and also emphasizes edge information, emphasizes learning for important features, and weakens learning for unimportant features. In addition, to solve the problems of the high cost of configuration of segmentation model and the high operational complexity of network training due to the multi-stage method used in the conventional lung lobe segmentation, multi-task learning is adopted, which on the one hand makes the whole network frame more integrated and reduces the operational complexity, and on the other hand can specify the segmentation area as the lung parenchyma area, thereby reducing the possibility of erroneously segmenting the area other than the lung as the lung lobe during the lung lobe segmentation.

[0046] In the present invention, the CT image is generated as one predicted image through a generator network, and the discriminator judges whether the generated predicted image is a true image. By continuously training the model, the generator is gradually optimized to generate a predicted image closer to the true label. Here, the loss of the generator G can be modified by adding a binary cross-entropy (BCE) loss, which calculates the cross entropy between the predicted lung mask generated by the generator G and the ground-truth lung mask. The loss of the generator is expressed as follows: lossG =BCE[G(x),Real]-E x~pz [D(x)] Here, p z is the distribution learned by the generator G from the ground-truth mask. BCE[G(x),Real] denotes the binary cross entropy loss between the predicted image G(x) output by the generator G and the true image Real, D(x) denotes the output of the discriminator, and E denotes the expectation. For the training loss of the discriminator D, different designs of the discriminator network may have different training loss functions. Based on the Wasserstein GAN (WGAN), the discriminator can select the Earth mover's distance (EM distance) to evaluate the difference between the generated predicted lobe segmentation image and the true label image, and minimize the distance between the two distributions. The training loss of the discriminator D is expressed as follows: Loss D = E x~pz [D(G(x))]-E x~preal [D(x)] p real is the distribution of true lobe labels.

[0047] If the original sample images are also provided as additional information, the classifier network may make a more accurate estimate.

[0048] In the above embodiment, the present invention constructs a multi-task learning network that is easy to operate, and the network can simultaneously learn a lobe segmentation task and a lung parenchyma segmentation task, adaptively adjust the task weights to reduce the possibility of erroneously segmenting areas other than the lungs during lobe segmentation, optimize the structure of the entire network, and obtain a segmentation model with excellent segmentation effect. The present invention can improve the spatial information modeling ability of the generator network by inserting a channel attention module and a sharpening spatial attention module into the U-Net, so as to obtain more important channel information and emphasize edge information. In addition, the context spatial information can be better obtained to complete an effective image codec task. The present invention can effectively use a neural network to learn shared features between multiple tasks, and is expected to extract more comprehensive features, thereby enhancing the performance of the main task lobe segmentation network, and improving the segmentation ability of the deep network for lobes without increasing the complexity of the deep network in actual use.

[0049] Corresponding to the embodiment of the image segmentation method combining attention in a multi-task learning network described above, the present invention further provides an embodiment of an image segmentation system combining attention in a multi-task learning network.

[0050] Referring to FIG. 5, the image segmentation system combining attention in multi-task learning network provided by an embodiment of the present invention includes a data acquisition module, a segmentation module, and a training module (not shown). The data acquisition module is used to acquire the 3D CT images to be segmented; The segmentation module is used to input the 3D CT image to be segmented into the segmentation model to obtain a predicted segmented image; The training module is used to train the multi-task learning network.

[0051] The embodiment of the image segmentation system combining attention in a multi-task learning network of the present invention may be applied to any device with data processing capabilities, such as a computer or other device. The embodiment of the system basically corresponds to the embodiment of the method, so the relevant parts may refer to the description of the embodiment of the method. The above-described embodiment of the system is merely illustrative, and the units described as separate components therein may or may not be physically separated, and the components displayed as units may or may not be physical units, i.e., they may be located in one place or distributed among multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present invention. Those skilled in the art can understand and implement it without creative labor.

[0052] An embodiment of the present invention further provides an electronic device including one or more processors, adapted to implement the image segmentation method combining attention in a multi-task learning network of the above embodiment.

[0053] FIG. 6 shows a hardware structure diagram of the electronic device of the present invention. In addition to the processor, internal memory, network interface, and non-volatile memory shown in FIG. 6, the device of the present invention may further include other hardware based on the actual functions of the device having any of the data processing capabilities, and the description thereof will be omitted.

[0054] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the image segmentation method for combining attention in a multi-task learning network of the above embodiment.

[0055] The computer-readable storage medium may be an internal storage unit of a device having any of the data processing capabilities described in any of the above embodiments, such as a hard disk or an internal memory. The computer-readable storage medium may be a device having any of the data processing capabilities, such as a plug-in hard disk, a SmartMedia (registered trademark) Card (SMC), an SD card, or a flash memory card, which is provided in the device. Furthermore, the computer-readable storage medium may further include an internal storage unit of a device having any of the data processing capabilities and an external storage device. The computer-readable storage medium may be used to store a computer program and other programs and data required for the device having any of the data processing capabilities, and may also be used to temporarily store data that has already been output or is to be output.

[0056] The above embodiments do not limit the present invention, and the present invention is not limited to the above embodiments. As long as they meet the requirements of the present invention, they are within the protection scope of the present invention.

[0057] Anything not described in detail herein is conventional technology known to those skilled in the art.

Claims

1. 1. An image segmentation method combining attention in a multi-task learning network, comprising: inputting a 3D CT image to be segmented into a segmentation model to obtain a predicted segmented image; The decomposition model is composed of an encoder and a first decoder in a pre-trained multi-task learning network, and a method for training the multi-task learning network includes: constructing a training dataset, each sample of the training dataset including a 3D CT image including a designated organ, and a first label and a second label corresponding to a first segmentation target and a second segmentation target in the designated organ, respectively; constructing a multi-task learning network including an encoder, a first decoder, and a second decoder; the encoder is used to perform feature extraction on an input 3D CT image, the first decoder is used to decode the features extracted by the encoder to obtain a predicted first segmented image, the second decoder is used to decode the features extracted by the encoder to obtain a predicted second segmented image, the first segmented image is used to indicate a region of the first segmentation target in the 3D CT image, and the second segmented image is used to indicate a region of the second segmentation target in the 3D CT image; inserting a channel attention module into at least one of the downsampling blocks of the encoder and / or at least one of the upsampling blocks of the first decoder and at least one of the upsampling blocks of the second decoder, such that each block having the channel attention module models channel information to highlight important features before a convolution operation; and inserting a sharpening spatial attention module into at least one of the downsampling blocks of the encoder, such that each downsampling block having the sharpening spatial attention module performs an image sharpening operation on the output image before output. and training the multi-task learning network with each sample of the training dataset as an input, with the goal of minimizing an error between the predicted first segmented image and the predicted second segmented image and a label, optimizing parameters of the multi-task learning network, and obtaining a trained multi-task learning network. An image segmentation method that combines attention in a multi-task learning network, comprising:

2. The channel attention module includes a pooling layer, a first 2D convolution layer, a 1D convolution layer, a second 2D convolution layer, and an activation function layer, which are connected in series; Here, the pooling layer is used to acquire global spatial information of an input image, the first 2D convolution layer is used to compress the number of channels for the global spatial information acquired by the pooling layer, the 1D convolution layer is used to perform convolution on the global spatial information with the compressed number of channels output by the first 2D convolution layer, and to enhance the modeling ability of channel information, the second 2D convolution layer is used to perform convolution on the output of the 1D convolution layer, and the activation function layer is used to map the output of the second 2D convolution layer to obtain feature channel weights, and selectively emphasize features containing useful information for the input image of the channel attention module and suppress unnecessary features based on the feature channel weights, to obtain the output of the channel attention module.

2. The method of claim 1 .

3. The sharpening spatial attention module includes an average pooling layer, a max pooling layer, a sharpening filter module, a convolution kernel and an activation function layer; Wherein, the average pooling layer and the max pooling layer are used for pooling the input feature maps of the sharpened spatial attention module respectively, and concatenating the pooled feature maps to obtain a two-channel feature map; the sharpening filter module is used for sharpening feature edge information of the two-channel feature map by performing an image sharpening process on the two-channel feature map; the convolution kernel is used for merging the sharpened two-channel feature map into a one-layer feature map; and the activation function layer is used for mapping the merged one-layer feature map to obtain feature weights, and element-wise multiplying the feature weights and the input feature map of the sharpened spatial attention module in a spatial dimension to obtain an output of the sharpened spatial attention module.

2. The method of claim 1 .

4. The objective function for minimizing the error between the predicted first segmented image and the predicted second segmented image and the label is [0010] where: [0025] m is the number of tasks in the multi-task learning network, and includes a main task in which a first decoder decodes the features extracted by the encoder to obtain a predicted first segmented image, and an auxiliary task in which a second decoder decodes the features extracted by the encoder to obtain a predicted second segmented image, and n i is the number of training samples, xij denotes the 3D CT image of sample j in task i, yij is the label of sample j in task i, l(.,.) is the loss function, and b = (b 1 , ...b m ) T denotes the offset compensation of m tasks, λ is the regularization parameter, tr(.) is the trace matrix, and W i is the weight parameter of task i, and the D matrix is ​​a positive semidefinite matrix.

2. The method of claim 1 .

5. The multi-task learning network further includes a classifier, and the classifier configures a generative adversarial network model together with a generator configured with the encoder and the first decoder, and the generative adversarial network model is trained to optimize parameters of the multi-task learning network by constructing a loss function of the predicted first segmented image and the first label.

2. The method of claim 1 .

6. The loss function of the predicted first segmented image and the first label is The loss function of the classifier and the loss function of the generator, where the loss function of the classifier is a function of the distribution p z and the first label distribution p real The loss function of the generator is loss G =BCE[G(x),Real]-E x~pz [D(x)], where BCE[G(x),Real] denotes the binary cross entropy loss between the predicted first segmented image G(x) output by the generator G and the first label Real, D(x) denotes the output of the discriminator, E denotes expectation, and x denotes a 3D CT image.

6. The method of claim 5 .

7. the designated organ is a lung, the first segmentation object is a lung lobe, and the second segmentation object is a lung parenchyma; 2. The method of claim 1 .

8. 1. An image segmentation system that combines attention in a multi-task learning network, comprising: a data acquisition module for acquiring a 3D CT image to be segmented; a segmentation module for inputting the 3D CT image to be segmented into a segmentation model to obtain a predicted segmented image; a training module for training the multi-task learning network; the split model is composed of an encoder and a first decoder in a pre-trained multi-task learning network; The training module includes: constructing a training dataset, where each sample of the training dataset includes a 3D CT image including a designated organ, and a first label and a second label corresponding to a first segmentation target and a second segmentation target in the designated organ, respectively; Construct a multi-task learning network including an encoder, a first decoder, and a second decoder, where: the encoder is used to perform feature extraction on an input 3D CT image, the first decoder is used to decode the features extracted by the encoder to obtain a predicted first segmented image, the second decoder is used to decode the features extracted by the encoder to obtain a predicted second segmented image, the first segmented image is used to indicate a region of the first segmentation target in the 3D CT image, and the second segmented image is used to indicate a region of the second segmentation target in the 3D CT image; A channel attention module is inserted into at least one of the downsampling blocks of the encoder and / or at least one of the upsampling blocks of the first decoder and at least one of the upsampling blocks of the second decoder, so that each block having the channel attention module models channel information to enhance important features before a convolution operation; a sharpening spatial attention module is inserted into at least one of the downsampling blocks of the encoder, so that each downsampling block having the sharpening spatial attention module performs an image sharpening process on an output image before output; Each sample of the training data set is used as an input to the multi-task learning network, and training is performed with a goal of minimizing an error between the predicted first segmented image and the predicted second segmented image and a label, and parameters of the multi-task learning network are optimized to obtain a trained multi-task learning network. An image segmentation system combining attention in a multitask learning network, characterized by:

9. An electronic device comprising: a memory; a processor; and a computer program stored in the memory and executable by the processor, the processor, when executing the computer program, performs the image segmentation method for combining attention in a multi-task learning network according to any one of claims 1 to 7.

1. An electronic device comprising:

10. A storage medium containing computer-executable instructions, which, when executed by a computer processor, performs the image segmentation method for combining attention in a multi-task learning network according to any one of claims 1 to 7. A storage medium comprising:

Citation Information

Patent Citations

  • Uterus squamous epithelium lesion area image segmentation method based on DSA-Double UNet model

    CN115170556A

  • Liver image segmentation method based on multi-scale feature fusion and grid attention mechanism

    CN115170582A

  • Deep learning model based on attention mechanism

    CN115240049A

  • Attention-based sequence-to-sequence neural network

    JP2020506466A

  • Image recognition device and training device using neural network

    JP2021022368A

Cited By

  • Monocular 3D target detection method and device fusing attention mechanism

    CN118968043A

  • A monocular 3D target detection method and device incorporating attention mechanism

    CN118968043B

  • Soybean pod identification method based on U-Net multi-module fusion

    CN119107556A

  • Three-dimensional multi-mode nuclear magnetic resonance image reconstruction method

    CN119152125A

  • Spacecraft component identification method and system

    CN119152222A