A colon polyp image segmentation method based on a diffusion model

By employing a diffusion model-based image segmentation method for colonic polyps, and utilizing an improved ResNet-50 network and a multi-scale feature fusion decoder, the problems of small datasets and model architecture defects in inflammatory bowel disease segmentation are addressed, achieving high-precision inflammatory bowel disease detection and reducing early missed detections.

CN118097140BActive Publication Date: 2026-11-24TIANJIN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410237494.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-01
Publication Date
2026-11-24
Estimated Expiration
2044-03-01

AI Technical Summary

Technical Problem

Existing inflammatory bowel disease (IBD) auxiliary detection systems suffer from problems such as small datasets, large differences in target backgrounds, and low segmentation accuracy due to model architecture defects, especially in the early detection of IBD, which is prone to missed detection.

Method used

A diffusion-based image segmentation method for colon polyps is adopted. By using an improved ResNet-50 network and a multi-scale feature fusion decoder, combined with data augmentation techniques, a forward diffusion process and a backward diffusion process are constructed to improve the accuracy of feature extraction and segmentation.

Benefits of technology

It improves the accuracy and generalization ability of inflammatory bowel disease segmentation, reduces the early missed detection rate, and helps doctors improve detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118097140B_ABST
    Figure CN118097140B_ABST
Patent Text Reader

Abstract

This invention relates to a diffusion model-based image segmentation method for colonic polyps, comprising the following steps: constructing an inflammatory bowel disease (IBD) image dataset; performing data augmentation, including brightness transformation, on the dataset for IBD segmentation tasks; training and inference based on an improved diffusion model network architecture, including a forward diffusion process (training process) and a backward diffusion process (inference process), to obtain a diffusion model-based colonic polyp image segmentation network; step four: colonic polyp image segmentation. This invention also provides an apparatus for implementing the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, specifically relating to a method for segmenting colon polyp images based on a diffusion model. Background Technology

[0002] Inflammatory bowel disease (IBD) is a chronic, relapsing inflammatory bowel disease that has long posed a threat to human health (Sung H, Ferlay J, Siegel RL, et al. Global cancer statistics 2020: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries[J]. CA: a cancer journal for clinicians, 2021, 71(3):209-249.). Colonoscopy for pathological examination of lesion mucosal tissue is one of the important criteria for diagnosing IBD. It requires endoscopists to obtain accurate and multi-site samples (including both lesion and non-lesion sites, with lesions mainly manifesting as colonic polyps). However, colonoscopy is highly subjective and easily limited by differences in judgment between different operators and even by the same operator at different times (Jacobs D O. Diverticulitis[J]. New England Journal of Medicine, 2007, 357(20):2057-2066.). Meanwhile, considerable differences still exist among operators in clinical practice (Dekker E, Tanis PJ, Vleugels JLA, et al. Colorectal cancer[J]. Lancet, 2019, 394(10207):1467-80., Winawer SJ, Zauber AG, Ho MN, et al. Prevention of colorectal cancer by colonoscopic polypectomy[J]. New England Journal of Medicine, 1993, 329(27):1977-1981.). Therefore, how to stably and accurately determine the lesion site has become the key and difficult point in the clinical endoscopic diagnosis and treatment process (Samy AA. Challenges facing the detection of colonic polyps: What can deep learning Do[J]. Medicina (Kaunas), 2019, 55(8):473.).

[0003] In recent years, with the rapid development of deep learning, AI-based assisted diagnostic systems have helped doctors in diagnosis. However, to date, assisted diagnostic systems based on high-precision early inflammatory bowel disease segmentation are still immature. There is still significant room for development in this field of AI-assisted diagnostic systems.

[0004] As a subcategory of medical image segmentation, the development of inflammatory bowel disease segmentation has relied heavily on the advancement of deep learning. Early polyp segmentation primarily relied on handcrafted features, which had limitations such as cumbersome feature extraction processes and an inability to incorporate contextual information. U-Net, published at MICCAI in 2015, has been widely applied in the field of image segmentation (Ronneberger, O., Fischer, P., Brox, T.: U-Net: Convolutional networks for biomedical imagesegmentation. In: MICCAI.pp.234–241. Springer (2015)). It is built upon FCN, and its U-shaped structure addresses the shortcomings of FCN in extracting contextual and locational information. ResUNet++ improves upon UNet by adding more dense connections to further extract features, resulting in performance gains (Jha, D., Smedsrud, PH, Riegler, MA, Johansen, D., De Lange, T., Halvorsen, P., Johansen, HD: Resunet++: An advanced architecture for medical image segmentation. In: 2019 IEEE International Symposium on Multimedia (ISM). pp. 225–2255. IEEE (2019)). In 2020, Pranet first proposed a reverse attention mechanism, first identifying the large area of ​​intestinal disease and then further segmenting polyps. This network, specifically designed for segmentation of inflammatory bowel disease, has made very good progress (Fan, DP, Ji, GP, Zhou, T., Chen, G., Fu, H., Shen, J., Shao, L.: Pranet: Parallel reverse attention network for polypsegmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 263–273 (2020)).In recent years, with the excellent performance of the Transformer architecture in various fields, a large number of polyp segmentation models based on the Transformer architecture have emerged. SFFomer uses Stepwise Feature Fusion to fuse features at different scales, achieving state-of-the-art performance (Wang, J., Huang, Q., Tang, F., Meng, J., Su, J., Song, S. (2022). Stepwise Feature Fusion: Local Guides Global. In: Wang, L., Dou, Q., Fletcher, PT, Speidel, S., Li, S. (eds) Medical Image Computing and Computer Assisted Intervention–MICCAI 2022. MICCAI2022. Lecture Notes in Computer Science, vol 13433. Springer, Cham.). Transformer has shown far superior performance over the FCN architecture in big data and large models.

[0005] However, numerous experiments have demonstrated that both the Transformer and CNN architectures have certain shortcomings. The Transformer architecture lacks two inherent inductive biases: translation invariance and local correlation, which means it typically requires a large amount of data to achieve excellent performance. CNNs, on the other hand, suffer from a limited receptive field (Lu Z, Xie H, Liu C, et al. Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets. arXiv preprint arXiv:2210.05958,2022.), making it difficult to effectively connect with contextual features, which limits its segmentation performance on targets of varying sizes.

[0006] Therefore, the following problems still exist in the current auxiliary detection of inflammatory bowel disease: (1) The early inflammatory bowel disease dataset is small, the target background varies greatly, and the learnable features are limited. (2) New algorithms are needed to break through the framework of existing models, solve the defects of Transformer and CNN architectures, and achieve higher accuracy in inflammatory bowel disease segmentation. Summary of the Invention

[0007] To address the above problems, this invention provides a method for high-precision early detection of colonic polyps through image segmentation, and also provides an apparatus for implementing this method. The technical solution is as follows:

[0008] A diffusion-based image segmentation method for colon polyps includes the following steps:

[0009] Step 1: Construct an image dataset of inflammatory bowel disease;

[0010] Step 2: For the inflammatory bowel disease segmentation task, perform data augmentation on the dataset, including brightness transformation;

[0011] Step 3: Training and inference are performed based on the improved diffusion model network architecture, including the forward diffusion process (training) and the backward diffusion process (inference), as follows:

[0012] The forward diffusion process, also known as the training process, includes:

[0013] (1) The inflammatory bowel disease image after the enhancement process in step 2 is fed into the ResNet-50 model pre-trained on the ImageNet dataset for feature extraction. The ResNet-50 model is a network model obtained by replacing the last 3 sets of convolutions of the original ResNet-50 model with dilated convolutions. The ResNet-50 model consists of four sets of basic residual blocks, and four sets of feature maps of different sizes with progressively smaller sizes are extracted.

[0014] (2) Sample a Gaussian noise image of the same size as the original symptomatic enteropathy image. t ~N(0,1), where the labeled image (Ground Truth) corresponding to the original symptomatic enteropathy images in the dataset is compared with the sampled Gaussian noise image. t Weighted summation is performed, and noise is superimposed t times to obtain the noisy label image x. t ;

[0015] (3) Combine the four sets of feature maps of different sizes obtained in step (2) with x t The feature maps are fused layer by layer. The four fused feature maps of different sizes are then processed by a denoising network with an encoder-decoder structure. The encoder part uses a ResNet network, and the decoder uses a multi-scale feature fusion decoder. The multi-scale feature fusion decoder consists of two parts: local feature aggregation and multi-scale feature fusion. The local feature aggregation part uses three convolutional layers to ensure that the feature maps obtained in the encoder have the same number of channels. The multi-scale feature fusion part uses a staircase network to fuse multiple feature maps into a single image x'. t ;

[0016] (4) Fuse the multi-channel feature maps into a single image x't ;

[0017] (5) The obtained x' t Compared with x obtained in the previous step t Loss is calculated, and the model is trained.

[0018] The reverse diffusion process, or reasoning process, includes:

[0019] (6) Sample a Gaussian noise image ∈ t ~N(0,1), pass this sampled image through the ResNet-50 encoder trained in (3) to obtain the feature map;

[0020] (7) Obtain the feature map of the inflammatory bowel disease image I to be segmented through the ResNet-50 trained in step (1), and fuse the feature map with the feature map obtained in step (6); send the fused feature map into the decoder trained in (3) to obtain x. t-1 ;

[0021] (8) Repeat step (7) t-1 times to obtain x0, which is the segmentation result predicted by the model. Save the obtained optimal network model to obtain the colon polyp image segmentation network based on the diffusion model.

[0022] Step 4: Colon polyp image segmentation.

[0023] Furthermore, an image dataset of inflammatory bowel disease was constructed based on the open-source datasets Kvasir-SEG or CVC-ClinicDB.

[0024] Furthermore, the brightness transformation method is as follows:

[0025] (1) Transform the inflammatory bowel disease image from RGB color space to YVU color space;

[0026] (2) Multiply the Y channel by a random coefficient between 0.5 and 1.5, and then add it to a constant between -30 and 30 to expand the brightness range of the inflammatory bowel disease image;

[0027] (3) Convert the inflammatory bowel disease images back to the RGB color space.

[0028] Furthermore, the data augmentation also includes rotation, cropping, and motion blur.

[0029] Furthermore, the local feature fusion of the multi-scale feature fusion decoder includes three convolutional layers to smoothly reduce the number of channels in the feature maps and aggregate local features. The multi-scale feature fusion process upsamples the fourth set of feature maps using a 1*1 convolution, with the sampling size being the same as the third set of feature maps. The fourth set of feature maps is then concatenated with the third set. This process is repeated until all four sets of feature maps are concatenated, fusing the multi-channel feature maps into a single image x'. t .

[0030] Furthermore, the Loss function employs a composite loss function, which includes a set similarity metric loss function, a cross-entropy loss function, and a mean squared error loss function.

[0031] Furthermore, the method for step four is as follows:

[0032] (1) The colonoscope is inserted into the body and transmits back the real-time video stream, as well as parameters such as the clarity, frame rate, current time, and shooting duration of the video stream;

[0033] (2) Preprocess the video, that is, enhance the video frames, calculate the image histogram, and perform histogram equalization based on the histogram, and adaptively adjust the brightness based on the brightness value;

[0034] (3) The processed video frames are fed into the colon polyp image segmentation network based on the diffusion model to output the colon polyp image segmentation image.

[0035] The present invention also provides a colon polyp image segmentation device, comprising: a processor and a memory, wherein the memory stores program instructions, and the processor calls the program instructions stored in the memory to cause the device to execute the method described thereon.

[0036] This invention addresses the shortcomings of Transformer and CNN architectures by designing a colon polyp image segmentation algorithm based on a probability diffusion model. It combines an improved ResNet backbone network and multi-scale feature fusion decoding, uses dilated convolutions to expand the receptive field, efficiently learns the features and boundaries of small targets within colon polyps through a forward pass, and fully mines image information through multiple diffusion iterations. Finally, it performs image inference through a reverse pass to obtain segmentation results with clear boundaries. This invention offers the following advantages:

[0037] (1) This invention proposes a new data augmentation algorithm for colon polyps images. This algorithm addresses the problem of small differences in target background color in inflammatory bowel disease images by removing color from the features that can be learned, effectively improving the diversity of data and making the model more generalizable.

[0038] (2) The colon polyp image segmentation method based on diffusion model proposed in this invention introduces and optimizes the diffusion probability model into the polyp segmentation task, which effectively makes up for the problem of low segmentation accuracy of traditional segmentation networks.

[0039] (3) The colon polyp image segmentation method based on diffusion model proposed in this invention is mainly designed to address the problem that early inflammatory bowel disease is atypical under endoscopy and is easily missed by CAD system. It can be used to effectively reduce the early missed detection rate of inflammatory bowel disease.

[0040] (4) This invention proposes a colon polyp image segmentation method based on a diffusion model, which can assist doctors in examining inflammatory bowel disease and effectively improve detection efficiency. Attached Figure Description

[0041] Figure 1 This is an overall block diagram of the colon polyp image segmentation method based on the diffusion model of the present invention.

[0042] Figure 2 A forward diffusion process for colon polyp image segmentation based on a diffusion model.

[0043] Figure 3 A reverse diffusion process for colon polyp image segmentation based on a diffusion model. Detailed Implementation

[0044] The present invention will now be described in conjunction with the accompanying drawings and embodiments.

[0045] This invention provides an overall block diagram of a colon polyp image segmentation method based on a diffusion model. See the overall system framework diagram below. Figure 1 ,

[0046] Step 1: Construct the dataset. Divide the open-source datasets Kvasir-SEG and CVC-ClinicDB into training and test sets. Specifically, the training set consists of 900 images from Kvasir-SEG and 550 images from CVC-ClinicDB, totaling 1450 samples. The test set has five parts: the remaining 100 images from Kvasir-SEG; the remaining 62 images from CVC-ClinicDB; the complete CVC-ColonDB dataset (380 samples); the complete ETIS dataset (196 samples); and 60 images from the CVC-300 dataset (CVC-300 refers to the 912 images from EndoScene minus the 612 images from ColonDB).

[0047] Step Two: Data augmentation of the dataset, including rotation, cropping, and motion blur. Based on the BTrans method proposed in this invention for inflammatory bowel disease image segmentation, during colonoscopy intestinal probing, cameras at different angles and with varying brightness capture polyp images with significant brightness differences. For polyp images where the target polyp is very small and the foreground and background are unbalanced, images that are too dark or too bright significantly affect target segmentation. Furthermore, the model should focus more on the shape and structure of the polyp image rather than overfitting to the image brightness. After BTrans, a training set with a wider brightness range is obtained. Using data augmentation methods allows the model to have better generalization ability for inflammatory bowel disease images captured under different conditions with significant brightness differences, while also restoring some overly dark or overly bright images to an average level, which is more conducive to the model's learning of polyp shape and structure. Brightness transformation, as an efficient data augmentation method, is only used during model training and has no impact on the model's inference speed. The specific process is as follows.

[0048] (1) Transform the colonoscopy images from the RGB color space to the YVU color space, with an image size of 1255*966.

[0049] (2) Multiply the Y channel by a random coefficient between 0.5 and 1.5, and add a constant between -30 and 30 to expand the brightness range of the dataset.

[0050] (3) Finally, convert the image back to the RGB color space. The formula is shown below.

[0051]

[0052] Where R represents the input image, the function f converts the RGB image to a YUV image by multiplying Y by a coefficient α and adding the parameter β, and then using... The color transformation is completed by converting back to the RGB image domain.

[0053] Step 3: Improve the network architecture based on the diffusion model. The original diffusion model uses the U-net architecture for the denoising encoder. While the U-net architecture is simple and easy to analyze and understand, it has low information utilization of feature maps and limited denoising effect. This invention proposes a new denoising network, MSNet. MSNet effectively improves information utilization through local feature aggregation and feature fusion, significantly enhancing the network's denoising performance. The improved diffusion model includes a forward diffusion process (training process) and a backward diffusion process (inference process). Its specific flow is as follows:

[0054] (1) The three-channel raw images I[D, Hi, Wi] (D, Hi, and Wi represent the number of channels, height, and width of the image) captured by colonoscopy are fed into a ResNet-50 model pre-trained on the ImageNet dataset for feature extraction. The ResNet-50 model consists of four basic residual blocks: conv2_x, conv3_x, conv4_x, and conv5_x. The output channel numbers of the four residual blocks are 56*56, 28*28, 14*14, and 7*7, respectively. conv2_x includes three Bottlenecks, each consisting of a 64-channel 1*1 convolutional layer, a 64-channel 3*3 convolutional layer, and a 256-channel 1*1 convolutional layer. The internal structures of conv3_x, conv4_x, and conv5_x are similar to conv2_x, but the number of channels is doubled sequentially. Each convolutional layer consists of a convolutional operation, a normalization layer, and a ReLU activation function. We extracted four sets of feature maps of different sizes using ResNet-50. To maintain a relatively high spatial resolution of the feature maps, we replaced the last three convolutions of ResNet-50 with dilated convolutions.

[0055] (2) Sample a pure Gaussian noise image with the same size as the original image. t ~N(0,1), the label image (Ground Truth) corresponding to the original image and the sampled noise image ∈ t Weighted summation is performed to obtain the noisy labeled image x. t , where t represents the t-th superposition of noise. Its formula is as follows:

[0056]

[0057] Where α t It is a set of pre-defined hyperparameters.

[0058] The feature map of the three-channel original image I captured by colonoscopy in step (1) is compared with x tThe feature maps are fused layer by layer. The fused feature maps are then passed through a denoising network, MSNet, which is an encoder-decoder structure. The encoder part uses a ResNet network, and the decoder uses a multi-scale feature fusion decoder, MSD. The multi-scale feature decoder consists of two parts: local feature aggregation and multi-scale feature fusion. Local feature fusion includes three convolutional layers, each consisting of a 1*1 convolution, ReLU, and BN layers. These three convolutional layers can smoothly reduce the number of channels in the feature map and efficiently aggregate local features. Multi-scale feature fusion passes the fourth set of feature maps through a 1*1 convolution and upsamples it to the same size as the third set of feature maps. The fourth set of feature maps is then concatenated with the third set of feature maps. This process is repeated until all four sets of feature maps are concatenated. Finally, the multi-channel feature maps are fused into a single image x'. t .

[0059] (4) Obtain x' t Compared with x obtained in the previous step t By applying a loss function, the model can be trained. The loss function uses a composite loss function, which provides more stable training and allows for better adjustment of the learning rate compared to a single loss function. The formula is as follows:

[0060] L totle =L dice (x' t x t )+L bce (x' t x t )+L mse (x' t x t )

[0061] Where dice is the set similarity metric loss function, bce is the cross-entropy loss function, and mse is the mean squared error loss function.

[0062] (5) Steps (1)-(4) are the training process, i.e. the forward diffusion process. (5)-(7) are the reasoning process, i.e. the reverse diffusion process.

[0063] During inference, a Gaussian noise image is first generated. t ~N(0,1), this image corresponds to x obtained during training. t The image is then passed through the ResNet-50 encoder trained in (3) to obtain the feature map.

[0064] (6) The output image I to be segmented is processed through the ResNet-50 trained in (1) to obtain a feature map. This feature map is then fused with the feature map obtained in (5). The fused feature map is then fed into the decoder trained in (3) to obtain x.t-1 .

[0065] (7) Repeat step (6) t-1 times to obtain x0, which is the segmentation mask predicted by the model. Save the final optimal network model.

[0066] Step 4: Construct a diffusion-based image segmentation method for colon polyps, which includes the following steps.

[0067] (1) The colonoscope is inserted into the body and transmits a real-time video stream, as well as parameters such as the clarity, frame rate, current time, and shooting duration of the video stream.

[0068] (2) Preprocess the video, that is, enhance the video frame, calculate the image histogram, and perform histogram equalization based on the histogram. Adjust the brightness adaptively based on the brightness value to reduce the information loss caused by overexposure, underexposure and other problems.

[0069] (3) The processed video frame is fed into the colon polyp image segmentation network based on the diffusion model, and the segmented image of the frame is output.

[0070] (4) Display the segmentation results on the screen in real time. To ensure video smoothness, one frame is captured every 10 frames for segmentation and display, and the remaining video frames are displayed directly.

[0071] (5) While displaying the results, the segmentation results are saved in the system background. Doctors can download them for follow-up visits after the colonoscopy.

[0072] The embodiments are described in detail below:

[0073] (1) Turn on the colonoscopy equipment and have the doctor operate the colonoscope to insert it into the body.

[0074] (2) The video stream captured in real time is transmitted back by the colonoscope, with an image resolution of 1920*1080 and a frame rate of 50 frames / second. The current time, shooting duration and other parameters are displayed in the display name.

[0075] (3) Perform image preprocessing on the video frames, namely, perform image enhancement on the video frames, calculate the image histogram, and perform histogram equalization (adjust image contrast) based on the histogram, and adaptively adjust the brightness (adjust image brightness) based on the brightness value to reduce information loss caused by overexposure, underexposure and other problems.

[0076] (4) Capture one image every 10 frames, i.e., capture 5 images per second. Each image I includes three dimensions [3, 1096, 1080]. The image is fed into the trained ResNet-50 network to obtain five feature maps of different sizes, with image sizes of 128*176*176, 256*88*88, 512*44*44, 1024*22*22, and 2024*11*11 respectively.

[0077] (5) Sample a Gaussian noise image ∈ t ~N(0,1), the three dimensions of the image are [3, 1096, 1080]. The image is passed through the ResNet-50 encoder trained in (4) to obtain five feature maps of different sizes. The feature map sizes are the same as in (4).

[0078] (6) Perform feature fusion on the feature maps obtained in (4) and (5), and send the fused five sets of feature maps into the trained multi-scale feature decoder.

[0079] (7) Repeat step (6) 1000 times to obtain x0, which is the segmentation mask predicted by the model.

[0080] (8) Display the desired segmentation result obtained in (7) on the screen in real time. To ensure video smoothness, one frame is captured every 10 frames for segmentation and display, and the remaining video frames are displayed directly.

[0081] (9) While displaying the results, the segmentation results are saved in the system background. Doctors can download them for follow-up visits after the colonoscopy.

Claims

1. A colon polyp image segmentation method based on a diffusion model, comprising the following steps: Step 1: Construct an image dataset of inflammatory bowel disease; Step 2: For the inflammatory bowel disease segmentation task, perform data augmentation on the dataset, including brightness transformation; Step 3: Training and inference are performed based on the improved diffusion model network architecture, including the forward diffusion process (training) and the backward diffusion process (inference), as follows: The forward diffusion process, also known as the training process, includes: (1) The inflammatory bowel disease image after the enhancement process in step 2 is fed into the ResNet-50 model pre-trained on the ImageNet dataset for feature extraction. The ResNet-50 model is a network model obtained by replacing the last 3 sets of convolutions of the original ResNet-50 model with dilated convolutions. The ResNet-50 model consists of four sets of basic residual blocks, and four sets of feature maps of different sizes with progressively smaller sizes are extracted. (2) Sample a Gaussian noise image of the same size as the original symptomatic enteropathy image. t ~N(0,1), where the labeled image (Ground Truth) corresponding to the original symptomatic enteropathy images in the dataset is compared with the sampled Gaussian noise image. t Weighted summation is performed, and noise is superimposed t times to obtain the noisy label image x. t ; (3) Combine the four sets of feature maps of different sizes obtained in step (2) with x t The feature maps are fused layer by layer. The four fused feature maps of different sizes are then processed by a denoising network with an encoder-decoder structure. The encoder part uses a ResNet network, and the decoder uses a multi-scale feature fusion decoder. The multi-scale feature fusion decoder consists of two parts: local feature aggregation and multi-scale feature fusion. The local feature aggregation part uses three convolutional layers to ensure that the feature maps obtained in the encoder have the same number of channels. The multi-scale feature fusion part uses a staircase network to fuse multiple feature maps into a single image x'. t ; (4) Fuse the multi-channel feature maps into a single image x' t ; (5) The obtained x' t Compared with x obtained in the previous step t Loss is calculated, and the model is trained. The reverse diffusion process, or reasoning process, includes: (6) Sample a Gaussian noise image ∈ t ~N(0,1), pass this sampled image through the ResNet-50 encoder trained in (3) to obtain the feature map; (7) Obtain the feature map of the inflammatory bowel disease image I to be segmented through the ResNet-50 trained in step (1), and fuse the feature map with the feature map obtained in step (6); send the fused feature map into the decoder trained in (3) to obtain x. t-1 ; (8) Repeat step (7) t-1 times to obtain x0, which is the segmentation result predicted by the model. Save the obtained optimal network model to obtain the colon polyp image segmentation network based on the diffusion model. Step 4: Colon polyp image segmentation.

2. The colon polyp image segmentation method according to claim 1, characterized in that, An image dataset of inflammatory bowel disease was constructed based on the open-source datasets Kvasir-SEG or CVC-ClinicDB.

3. The colon polyp image segmentation method according to claim 1, characterized in that, The brightness transformation method is as follows: (1) Transform the inflammatory bowel disease image from RGB color space to YVU color space; (2) Multiply the Y channel by a random coefficient between 0.5 and 1.5, and then add it to a constant between -30 and 30 to expand the brightness range of the inflammatory bowel disease image; (3) Convert the inflammatory bowel disease images back to the RGB color space.

4. The colon polyp image segmentation method according to claim 1, characterized in that, The data augmentation also includes rotation, cropping, and motion blur.

5. The colon polyp image segmentation method according to claim 1, characterized in that, The local feature fusion of the multi-scale feature fusion decoder includes three convolutional layers to smoothly reduce the number of channels in the feature maps and aggregate local features. The multi-scale feature fusion process upsamples the fourth set of feature maps using a 1x1 convolution, with the sampling size being the same as the third set of feature maps. The fourth set of feature maps is then concatenated with the third set. This process is repeated until all four sets of feature maps are concatenated, fusing the multi-channel feature maps into a single image x'. t .

6. The colon polyp image segmentation method according to claim 1, characterized in that, The loss function used is a composite loss function, which includes a set similarity metric loss function, a cross-entropy loss function, and a mean squared error loss function.

7. The colon polyp image segmentation method according to claim 1, characterized in that, The method for step four is as follows: (1) The colonoscope is inserted into the body and transmits back the real-time video stream, as well as parameters such as the clarity, frame rate, current time, and shooting duration of the video stream; (2) Preprocess the video, that is, enhance the video frames, calculate the image histogram, and perform histogram equalization based on the histogram, and adaptively adjust the brightness based on the brightness value; (3) The processed video frames are fed into the colon polyp image segmentation network based on the diffusion model to output the colon polyp image segmentation image.

8. A colon polyp image segmentation device, comprising: A processor and a memory, wherein the memory stores program instructions, and the processor invokes the program instructions stored in the memory to cause the apparatus to perform the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Encoder and decoder large intestine polyp detection method based on cavity convolution

    CN112200773A