Colon polyp segmentation method based on improved U-Net model

By introducing residual connections, channel attention and feature enhancement into the U-Net model, combined with data enhancement and IoUBCELoss loss function, the problems of gradient disappearance and high computing resources in colon polyp segmentation in the existing technology are solved, and a higher level of performance is achieved. segmentation accuracy and robustness.

CN118552733APending Publication Date: 2024-08-27ANHUI UNIV OF SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410765759.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing colon polyp segmentation methods suffer from gradient disappearance and gradient explosion problems in image segmentation tasks, and the training of deep learning models requires a large amount of computing resources and time, making it difficult to effectively capture the boundary information of polyps and their surrounding mucosa.

Method used

Using the improved U-Net model, by introducing residual connections, channel attention and feature enhancement, combined with data enhancement and IoUBCELoss loss function, the receptive field and robustness of the model are enhanced, and the accuracy of polyp segmentation is improved.

Benefits of technology

Significantly improves the precision and accuracy of colon polyp segmentation, enhances the model's sensitivity to polyp features, reduces the impact of interference factors, and balances local pixel level and global information, improving the model's robustness and training stability .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552733A
    Figure CN118552733A
Patent Text Reader

Abstract

The invention discloses a colon polyp segmentation method based on an improved U-Net model. The method comprises the following steps: S1, performing data enhancement on an initial colon polyp data set through modes of random rotation, random cutting, random brightness and contrast change and the like; s2, residual connection is added to four layers of an encoder of the U-Net model, global information of each channel is obtained through channel attention enhancement important feature channels in a jump connection part of the model, and attention weight is multiplied by an original feature map to obtain a weighted feature map; an FEM feature enhancement module is added to a down-sampling part of the U-Net model, wherein the FEM feature enhancement module comprises 3 * 3 and 1 * 1 convolution layers; and S3, training the model to complete a colon polyp segmentation task. According to the method, the semantic information of the initial image is supplemented by using residual connection, the global information of the image is acquired by introducing channel attention, and the convex polyp texture is enhanced in combination with features, so that the accuracy of colon polyp segmentation is improved, and technical support is provided for the image segmentation aspect of the colon polyp.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to a colon polyp segmentation method based on an improved U-Net model. Background Art

[0002] According to the latest global cancer data for 2020 released by the World Health Organization's International Agency for Research on Cancer (IARC), the incidence and mortality of colorectal cancer rank third and second among malignant tumors worldwide, respectively. Colon cancer is a common digestive tract malignancy that occurs in the colon. Its occurrence and development are closely related to colon polyps, which are small lumps on the colon mucosa and are usually precursor lesions of colon cancer. Early detection and timely treatment of colon polyps are crucial to reducing the incidence of colon cancer and improving the survival rate of patients.

[0003] A lot of research has been done on colon polyp segmentation. Most of the early research was based on handcrafted methods, using low-level features such as color, shape, and texture, or analyzing images by combining these features. With the successful application of convolutional neural networks (CNN), deep learning-based methods have made significant breakthroughs in medical image segmentation. For example, segmentation networks such as FCN and Res-Unet are used for semantic segmentation, aiming to solve the gradient vanishing and gradient exploding problems in deep network training and improve the performance of image segmentation tasks, but their complex network structures require more computing resources and time to train.

[0004] Therefore, it is necessary to improve such an algorithm to overcome the above defects. Summary of the invention

[0005] The purpose of the present invention is to provide a colon polyp segmentation method based on an improved U-Net model. By introducing residual connections, channel attention and feature enhancement, the relationship information between channels and context information can be fully utilized to capture important features in the input data, increase the receptive field, clarify the boundary between the polyp and its surrounding mucosa, and improve the accuracy of polyp segmentation.

[0006] The present invention adopts the following technical solutions to achieve the purpose of the invention:

[0007] A colon polyp segmentation method based on an improved U-Net model comprises the following steps:

[0008] Step 1: Obtain an initial dataset of colon polyps from endoscopic gastrointestinal images.

[0009] Step 2: Perform data augmentation on the initial colon polyp dataset to increase the number of initial datasets and obtain an expanded dataset.

[0010] Step 3: Introduce residual connections in the encoder part of the U-Net network to build a shortcut for processing the initial image, thereby supplementing the semantic information of the initial image.

[0011] Step 4: Use channel attention in the skip connection part of the network to make full use of the relationship information between channels and context information to capture important features in the input data.

[0012] Step 5: Combine the feature enhancement method with the downsampling of the U-Net network to expand the receptive field without reducing the image resolution and improve the accuracy of polyp segmentation.

[0013] Step 6: Use the IoUBCELoss loss function for the network to better focus on local pixel-level accuracy and global information.

[0014] Step 7: Input the expanded data set into the improved U-Net model and set the corresponding number of training times. As the number of training times increases, the loss function curve of the U-Net model gradually converges.

[0015] Step 8: Use the improved U-Net model to segment colon polyps, separate the polyps from the image and label them.

[0016] The further improvement of the technical solution of the present invention is:

[0017] Among them, in step 2, data enhancement is performed by random rotation, random cropping, random brightness and contrast changes, etc. The specific process is as follows:

[0018] Random rotation is to randomly rotate the image within a certain angle range; random cropping is to randomly select a starting point and the size of the cropping area in the image to crop the image; random brightness change is to randomly select a brightness change factor within a predetermined range, multiply each pixel value of the image by the brightness change factor, thereby adjusting the overall brightness of the image; contrast change is to randomly select a contrast change factor within a predetermined range, convert the image to a floating-point type, center it and multiply it by the contrast change factor, and finally restore the image to its original range. The above method is used to perform 3 transformations on each image in the initial data set, and finally expanded to 3,000 images.

[0019] In step 3, residual connections are added to the four layers of the U-Net network encoder.

[0020] The specific formula is: x l =C(C(x f ))+F(C(F(C(x f )))) Among them, x frepresents the initial image, C represents the convolution operation, F represents batch normalization and relu activation function, x l Represents the resulting image after processing. The residual connection first accepts an initial input tensor, which is batched after passing through a convolutional layer, and then learned through the Relu function. The output of the activation function passes through the second convolutional layer again to further extract features, and then the output of the second convolutional layer is added to the output generated by the U-Net convolutional layer to better retain the original input information.

[0021] In step 4, channel attention is used in the jump connection part of the network.

[0022] The specific process is as follows: the input feature map is compressed into a C-dimensional vector with a width and height of 1×1 through global average pooling to reduce the size of the feature map, while the number of channels remains unchanged. Then, the global information vector is mapped to a weight vector through a small fully connected network, and the weight vector is normalized to ensure that their sum is equal to 1. In this way, a normalized weight vector is obtained to represent the importance distribution of each channel. The obtained channel weight vector is then used for weighting, so that the model pays more attention to features that help distinguish polyps from surrounding mucosa, especially when the edges are unclear. Finally, the feature weight map and the input feature map are multiplied on the channel. Channel attention can compress global information and perform feature learning in the channel dimension to form the importance of each channel, thereby adapting to different data distributions. It can not only capture important features in the input data, but also increase the receptive field, and help the model automatically learn and focus on channels related to polyp features, and suppress channels that are not related to the task.

[0023] Wherein, in step 5, a feature enhancement method is combined with the downsampling of the U-Net network.

[0024] The specific process is as follows: the feature enhancement part contains four dilated convolution blocks with dilation factors of 1, 6, 12, and 18. The input tensor is processed and connected using attention after dilated convolution to capture the relationship between the image feature channels. The output is added to the initial tensor through a 3×3 convolution layer and a 1×1 layer. The output is then passed through spatial attention to suppress irrelevant areas and capture important area features to obtain the output features. Feature enhancement is helpful for processing polyps with complex textures and color changes, and can highlight the shape and texture of polyps and improve the accuracy of the model.

[0025] Wherein, the step 6 uses the IoUBCELoss loss function for the network.

[0026] The specific calculation formula is: Among them, P represents the predicted image, Q represents the true label, y represents the true label of the sample, and p is the predicted output of the model. Combining the IoU loss function with the binary cross entropy loss function can train a segmentation model with better performance. This is because the IoU loss function mainly focuses on the accuracy of the local pixel level and is used to measure the accuracy of the segmentation results, while the binary cross entropy loss function focuses on the global information at the category level, which can help the model better handle pixel-level classification problems. The combination of the two can balance global information and local information in the model, improve the robustness of the model, and if one loss has problems during training, the other loss can play a complementary role to maintain the stability of the training.

[0027] Among them, the training process in step 7.

[0028] The specific process is: input the expanded data set into the improved U-Net model, set the corresponding number of training times to 200 times, and as the number of training times increases, the loss function curve of the U-Net model gradually converges.

[0029] Among them, the polyp segmentation network of the improved U-Net model in step 8 is composed of an encoder and a decoder, and a segmentation result image of the input image size is generated after the segmentation is completed.

[0030] The present invention provides a colon polyp segmentation method based on an improved U-Net model, which has the following advantages:

[0031] 1. The present invention provides a colon polyp segmentation method based on an improved U-Net model, which helps to capture various features of colorectal polyps, including color, texture, and shape. At the same time, the model's sensitivity to polyp features is improved, and the influence of interference factors on segmentation is reduced. In addition, this model is helpful for processing polyps with complex textures and color changes, and can highlight the shape and texture of polyps, which improves the accuracy of polyp segmentation to a certain extent;

[0032] 2. The present invention introduces residual connections, which can build a shortcut for processing the initial image, so that the output of the shallow layer can directly participate in the input of the deep layer, which not only avoids the gradient vanishing problem, but also supplements the semantic information of the initial image, so that the model can share information across layers. The introduction of channel attention makes full use of the relationship information between channels to capture important features in the input data, helping the model to automatically learn and focus on channels related to polyp features, and suppress channels that are not related to the task. The use of feature enhancement methods ensures that the receptive field is expanded without reducing the resolution of the image, which is helpful for processing polyps with complex textures and color changes. The introduction of the IoUBCELoss loss function can balance global information and local information, improve the robustness of the model and ensure training stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a network structure diagram of the improved U-Net model provided by the present invention.

[0034] Figure 2 is a residual connection structure diagram introduced in the present invention;

[0035] Figure 3 It is a channel attention structure diagram used in the present invention.

[0036] Figure 4 is a feature enhancement structure diagram used in the present invention;

[0037] Figure 5 It is the effect diagram after segmentation of the present invention; DETAILED DESCRIPTION

[0038] The present invention is further explained below through specific examples.

[0039] Embodiment 1: The present invention provides a colon polyp segmentation method based on an improved U-Net model. The network structure diagram of the improved U-Net model is as follows: Figure 1 The specific steps are as follows:

[0040] Step 1: Obtain an initial dataset of colon polyps of gastrointestinal images of endoscopic examination: The initial dataset is a Kvasir-SEG dataset specifically used for colon polyp segmentation provided by the Medical Center, University of Oslo, Norway.

[0041] Step 2: Perform data enhancement processing such as random cropping and random rotation on the initial polyp dataset, and expand each image of the initial dataset three times to obtain a final dataset of 3,000 images.

[0042] Step 3: Introduce residual connections in each convolution layer of the encoder part of the U-Net network, connect the first convolution layer and the third convolution layer in each layer using residual connections, and build a shortcut for processing the initial image, thereby supplementing the semantic information of the initial image.

[0043] Step 4: Use channel attention in the four skip connections connecting the encoder and decoder to make full use of the relationship information between channels and context information to capture important features in the input data.

[0044] Step 5: In the 4 downsampling layers of the U-Net network encoder part, the dilated convolution is used to extract polyp features in combination with the feature enhancement method.

[0045] Step 6: Use the IoUBCELoss loss function for network training optimization to better focus on local pixel-level accuracy and global information.

[0046] Step 7: Input the expanded Kvasir-SEG dataset into the improved U-Net model and set the corresponding number of training times. As the number of training times increases, the loss function curve of the U-Net model gradually converges.

[0047] Step 8: Use the improved U-Net model to segment colon polyps, separate the polyps from the image and label them.

[0048] In step 2, data enhancement is performed by random rotation, random cropping, random brightness and contrast changes, etc.

[0049] The specific process is as follows: use random cropping to randomly select a starting point and the size of the cropping area in the image to crop the image; randomly select a brightness change factor within a predetermined range, multiply each pixel value of the image in the data set by the brightness change factor, and adjust the overall brightness of the image; randomly select a contrast change factor within a predetermined range, convert the image to a floating point type, center it, and multiply it by the contrast change factor, and finally restore the image to the original range. Use the above method to transform each image in the initial data set three times, and finally expand to 3,000 images.

[0050] In the step 3, the first convolutional layer and the third convolutional layer of each layer in the 4 layers of the U-Net network encoder are connected using residual connections.

[0051] The specific residual connection formula is expressed as x l =C(C(x f ))+F(C(F(C(x f )))) Among them, x f represents the initial image, C represents the convolution operation, F represents batch normalization and Relu activation function, x l Represents the resulting image after processing. The residual connection first accepts an initial input tensor, which is batched after passing through a convolutional layer, and then learned through the Relu function. The output of the activation function passes through the second convolutional layer again to further extract features, and then the output of the second convolutional layer is added to the output generated by the U-Net convolutional layer to better retain the original input information.

[0052] The skip connection part connecting the encoder and the decoder in the network in step 4 uses channel attention.

[0053] The specific process is as follows: first, a feature map containing multiple channels is obtained through a convolutional layer. For each channel, its global feature statistics are calculated through global average pooling. This global feature statistic can be understood as the overall strength or importance of the feature represented by the channel. The global feature statistics are used as input, and feature transformation is performed through a fully connected layer (FC). The result of the feature transformation is mapped to a range of [0,1] through an activation function to obtain the attention weight of each channel. These weights represent the importance of each channel in the entire feature map. The larger the value, the more important it is. The attention weight of each channel is multiplied by the corresponding feature map to obtain a weighted feature map. The weighted feature map is weighted fused channel by channel to obtain the final feature representation.

[0054] In step 5, a feature enhancement method is combined with the downsampling of the U-Net network.

[0055] The specific process is as follows: feature enhancement is performed on the feature map of the convolution layer during downsampling, and 4 feature maps after feature extraction are obtained after 1 1×1 convolution layer and 3 3×3 dilated convolutions. The 4 feature maps are concatenated and added to the initial feature map after 1×1 using a 3×3 convolution layer, and spatial attention is used to extract features from the feature map.

[0056] In step 6, the IoUBCELoss loss function is used for the U-Net network.

[0057] The specific formula is:

[0058] Among them, P represents the predicted image, Q represents the true label, y represents the true label of the sample, and p is the predicted output of the model. Combining the IoU loss function with the binary cross entropy loss function can train a segmentation model with better performance. This is because the IoU loss function mainly focuses on the accuracy of the local pixel level and is used to measure the accuracy of the segmentation results, while the binary cross entropy loss function focuses on the global information at the category level, which can help the model better handle pixel-level classification problems. The combination of the two can balance global information and local information in the model, improve the robustness of the model, and if one loss has problems during training, the other loss can play a complementary role.

[0059] In the training process in step 7, the expanded data set is input into the improved U-Net model, and the corresponding number of training times is set to 200 times. As the number of training times increases, the loss function curve of the U-Net model gradually converges to obtain the optimal model.

[0060] In step 8, the improved U-Net model is used to segment the polyp image, and after the segmentation is completed, a segmentation result image of the input image size is generated.

[0061] In summary, in this specification, the schematic representation of this technical solution does not necessarily include only an independent solution, and its "embodiment" also refers to the specific features of the embodiment combined with the technical solution. The above description shows the basic principles, main features and main problems solved by the present invention. Those skilled in the art should understand that this technology can also be appropriately combined with other technologies to form other embodiments understood by those skilled in the art. In addition, this technology will also have various changes and improvements, and these changes and improvements all fall within the scope of the invention claimed for protection.

Claims

1. A colon polyp segmentation method based on an improved U-Net model, characterized in that The following steps are involved: Step 1: Obtain an initial dataset of colon polyps from endoscopic gastrointestinal images; Step 2: Perform data augmentation on the initial colon polyp dataset to increase the number of initial datasets and obtain an expanded dataset; Step 3: Introduce residual connections in the encoder part of the U-Net network to build a shortcut for processing the initial image, thereby supplementing the semantic information of the initial image; Step 4: Use channel attention in the skip connection part of the network to capture important features in the input data by leveraging the relationship information between channels and context information; Step 5: Combine the feature enhancement method with the downsampling of the U-Net network to expand the receptive field without reducing the resolution of the image; Step 6: Use the IoUBCELoss loss function for the network; Step 7: Input the expanded data set into the improved U-Net model and set the corresponding number of training times. As the number of training times increases, the loss function curve of the U-Net model gradually converges; Step 8: Use the improved U-Net model to segment colon polyps, separate the polyps from the image and label them.

2. The method for segmenting colon polyps based on the improved U-Net model according to claim 1, characterized in that: In step 2, data enhancement is performed by random rotation, random cropping, random brightness and contrast changes, etc. The specific process is as follows: Random rotation is to randomly rotate the image within a certain angle range; random cropping is to randomly select a starting point and the size of the cropping area in the image to crop the image; random brightness change is to randomly select a brightness change factor within a predetermined range, multiply each pixel value of the image by the brightness change factor, and thus adjust the overall brightness of the image; The contrast change is to randomly select a contrast change factor within a predetermined range, convert the image to a floating point type, center it and multiply it by the contrast change factor, and finally restore the image to the original range. The above method is used to transform each image in the initial data set three times, and finally expanded to 3000 images.

3. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: In step 3, residual connections are added to the 4 layers of the U-Net network encoder, which is expressed as: l =C(C(x f ))+F(C(F(C(x f )))) Among them, x f represents the initial image, C represents the convolution operation, F represents batch normalization and Relu activation function, x l Represents the resulting image after processing. The residual connection first accepts an initial input tensor, which is batched after passing through a convolutional layer, and then learned through the Relu function. The output of the activation function passes through the second convolutional layer again to further extract features, and then the output of the second convolutional layer is added to the output generated by the U-Net convolutional layer to better retain the original input information.

4. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: In step 4, channel attention is used in the skip connection part of the network. The specific process is as follows: Channel attention can compress global information and learn features in the channel dimension to form the importance of each channel, so as to adapt to different data distributions. The input feature map is compressed into a C-dimensional vector with a width and height of 1×1 through global average pooling to reduce the size of the feature map, while the number of channels remains unchanged. Then, a small fully connected network is used to map the global information vector to a weight vector, and the weight vector is normalized to ensure that their sum is equal to 1. The normalized weight vector is used to represent the importance distribution of each channel, and then the obtained channel weight vector is used for weighting, and finally the feature weight map and the input feature map are multiplied on the channel.

5. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: In step 5, the feature enhancement method is combined with the downsampling of the U-Net network. The specific process is as follows: The feature enhancement part contains four dilated convolution blocks. The input tensor is processed and connected using attention after dilated convolution to capture the relationship between the image feature channels. The output is added to the 1×1 initial tensor through a 3×3 convolution layer. The output is subjected to spatial attention to suppress irrelevant areas and capture important regional features to obtain the output features. Feature enhancement is helpful for processing polyps with complex textures and color changes. It can highlight the shape and texture of the polyps and improve the accuracy of the model.

6. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: In step 6, the IoUBCELoss loss function is used for the network, and its specific calculation formula is: Among them, P represents the predicted image, Q represents the true label, y represents the true label of the sample, and p is the predicted output of the model. Combining the IoU loss function with the binary cross entropy loss function can train a segmentation model with better performance. This is because the IoU loss function focuses on the accuracy of the local pixel level and is used to measure the accuracy of the segmentation results, while the binary cross entropy loss function focuses on the global information at the category level, which can help the model better handle pixel-level classification problems. The combination of the two can balance global information and local information in the model and improve the robustness of the model.

7. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: The training process in step 7 is specifically as follows: The expanded data set is input into the improved U-Net model, and the corresponding number of training times is set to 200. As the number of training times increases, the loss function curve of the U-Net model gradually converges.

8. The method for segmenting colon polyps based on an improved U-Net model according to claim 1, characterized in that: The polyp segmentation network of the improved U-Net model in step 8 is composed of an encoder and a decoder, and generates a segmentation result image of the size of the input image after segmentation is completed.

Citation Information

Patent Citations

  • Polyp image segmentation method based on context information and reverse attention

    CN114972155A

  • Colon polyp image segmentation method based on shape perception and feature enhancement

    CN117934510A

  • Abdominal CT image multi-organ automatic segmentation method

    CN117994270A

  • Medical image segmentation method based on u-net

    US20220309674A1