Endoscope polyp image detection method based on deep learning

By introducing the ASFF structure and dynamic convolution module into the YOLOv5 model, the accuracy and computational overhead problems of polyp detection algorithms in the existing technology under the limitations of intestinal structure and field of view are solved, and higher detection accuracy and efficiency are achieved.

CN118608478APending Publication Date: 2024-09-06HUAIYIN INSTITUTE OF TECHNOLOGY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410711845.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing polyp detection algorithms based on deep learning are difficult to achieve polyp detection with high accuracy and low computational overhead due to the special structure of the intestine and the limitations of colonoscopy field of view, resolution, and histological discrimination.

Method used

The ASFF structure and dynamic convolution module are introduced into the YOLOv5 model to improve feature capture capabilities through identity scaling and adaptive fusion, and a dynamic convolution module is introduced into the feature prediction head to adapt to different polyp input data.

Benefits of technology

The accuracy and efficiency of colorectal polyp detection are significantly improved, and the detection precision and recall rate are improved. The improved model achieves 2% and 2.7% improvements in mAP@0.5 and mAP@0.5:0.95 indicators respectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608478A
    Figure CN118608478A
Patent Text Reader

Abstract

The invention discloses an endoscopic polyp image detection method based on deep learning, and the method comprises the following steps: (1), naming an obtained data set as Polyp Dataset, carrying out the preprocessing of the data set, and dividing the obtained processed data set into four types; (2) building an improved YOLOv5 model, namely introducing an ASFF structure into a neck network part; (3) introducing a dynamic convolution module in each stage of the feature prediction head; and (4) training on the training set by using the established model and verifying on the test set to realize prediction of colorectal polyps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to an endoscopic polyp image detection method based on deep learning. Background Art

[0002] With the rapid development of deep learning, computer-assisted polyp identification has shown the potential of high analytical quality and low cost in colorectal screening and detection. Artificial intelligence systems based on deep learning can use large amounts of data to automatically learn classification patterns and extract features from complex unlabeled data, reducing the need for human intervention. In the medical field, especially in diagnostic colonoscopy, artificial intelligence systems based on deep learning technology are constantly developing. Mo et al. used an unmodified convolutional neural network (Faster R-CNN) architecture for polyp detection. Unlike previous methods, their algorithm can detect most occluded polyps. Shin et al. proposed a region-based convolutional neural network (CNN) method to automatically detect colon polyps. This study overcame the small number of polyp images and detection obstacles by using a deep convolutional neural network (Inception Resnet) as a transfer learning scheme, and proposed two post-learning methods: automatic false positive learning and offline learning. Combined with the region-based detection system, reliable polyp detection was achieved, further optimizing the model and reducing false positives. Pacal et al. proposed a real-time polyp detection algorithm based on the improved YOLOv3 and YOLOv4 algorithms, which combined several key technologies to achieve high-performance, real-time automatic polyp detection. First, the real-time, high-performance automatic polyp detection was achieved by integrating the cross-stage partial network (CSPNet). Secondly, advanced data augmentation techniques and transfer learning were used to improve the performance of polyp detection. Finally, the Sigmoid weighted linear unit (SiLU) activation function was used instead of the Leaky ReLU and Mish activation functions to improve the accuracy and real-time performance of the model in polyp detection. Yang et al. proposed a randomized efficient channel attention network (sECANet) for automatic polyp detection and segmentation, which improved the detection accuracy of the model by learning effective channel attention through cross-channel interactions. Zhang et al. proposed a computer-aided polyp recognition algorithm SSD-GPNet based on SSD improvement, which reused the lost data in the pooling layer and linked it as an additional feature map to improve the accuracy and efficiency of the detector. Puyal et al. proposed a dual-path convolutional neural network algorithm called DP-CNN for polyp detection in enhanced images. The algorithm uses the DP-CNN architecture and sigmoid classifier. Through this combination of structure and classifier, the algorithm has achieved satisfactory results on public datasets. Park et al. proposed a new model called SwinE-Net, which combines the EfficientNet and SwinTransformer algorithms for accurate and robust colorectal polyp segmentation.Wang et al. proposed a new prototype alignment network called PANet, which solves the challenging few-shot segmentation problem from the perspective of metric learning, enabling it to better utilize the information of the support set and improve the performance of few-shot segmentation through prototype alignment. Wesp et al. used 3D CT colonography images for training and developed two models: SEG model and noSEG model to predict the category of polyps. Unlike previous methods, the SEG model also used polyp segmentation masks for training to improve the accuracy of prediction. The contribution of this study is that it uses subconvolution training and segmentation mask methods to provide a new method for accurately predicting polyp categories. Ma et al. proposed a real-time polyp detection framework dedicated to colon examination videos. The framework integrates Swin Transformer with YOLOv5m network to enhance the ability to extract local and global information of polyp features. At the same time, in order to reduce the influence of factors such as light changes and reflections, the study also uses the integrated prediction method of time series to improve the temporal continuity of the detection results.

[0003] Although deep learning-based object detection algorithms have made significant breakthroughs in the field of polyp detection, in practical applications, the high accuracy and real-time performance of polyp identification are still affected by the special structure of the intestine and the limitations of the field of view, resolution, and histological identification of ordinary colonoscopes. Therefore, it is imperative to design a polyp detection algorithm with high detection accuracy and low computational overhead. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide an endoscopic polyp image detection method based on deep learning to address the challenges of existing models in feature capture and insufficient training samples.

[0005] Technical solution: The present invention provides an endoscopic polyp image detection method based on deep learning, comprising the following steps:

[0006] (1) Name the acquired data set Polyp Dataset, preprocess it, and divide the processed data set into four categories;

[0007] (2) Build an improved YOLOv5 model by introducing the ASFF structure in the neck network part;

[0008] (3) Introducing dynamic convolution modules at each stage of the feature prediction head;

[0009] (4) The constructed model is trained on the training set and verified on the test set to predict colorectal polyps.

[0010] Furthermore, the step (1) is specifically as follows: labeling the image using Lableimg, that is, labeling the target or attribute of the polyp type according to the data type, and converting the labeling result into a text format, including the target ID, location coordinates and width and height information, and then dividing it into a training set, a validation set and a test set according to the proportion;

[0011] Furthermore, the step (2) is specifically as follows: comprising: constant scaling and adaptive fusion, including the following steps:

[0012] (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2.

[0013] (22) The adaptive fusion formula is as follows:

[0014]

[0015]

[0016] in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

[0017] Furthermore, the step (3) is specifically as follows: obtain important candidate target areas by scanning the global image, and then introduce a dynamic convolution module to dynamically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows:

[0018] y=(α ω1 Wα f1 Wα c1 Wα s1 WW1+…+α ωn Wα fn Wα cn Wα sn WW n )*x

[0019] where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , and Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

[0020] The present invention provides an endoscopic polyp image detection system based on deep learning, comprising:

[0021] Preprocessing module: used to name the acquired data set as Polyp Dataset, preprocess it, and divide the processed data set into four categories;

[0022] YOLOv5 module: used to build an improved YOLOv5 model, that is, to introduce the ASFF structure into the neck network part;

[0023] Dynamic convolution module: used to introduce dynamic convolution modules at each stage of the feature prediction head;

[0024] Prediction module: used to use the built model to train on the training set and verify on the test set to predict colorectal polyps.

[0025] In the further preprocessing module, Lableimg is used to annotate the image, that is, the target or attribute of the polyp type is annotated according to the data type, and the annotation result is converted into a text format, including the target id, location coordinates and width and height information, and then divided into a training set, a validation set and a test set according to the proportion;

[0026] Furthermore, the YOLOv5 module includes: constant scaling and adaptive fusion, including the following steps:

[0027] (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2.

[0028] (22) The adaptive fusion formula is as follows:

[0029]

[0030] in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

[0031] Furthermore, in the dynamic convolution module, the important candidate target areas are obtained by scanning the global image, and then the dynamic convolution module is introduced to dynamically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows:

[0032] y=(α ω1 Wα f1 Wα c1 Wα s1 WW1+…+α ωn Wα fn Wα cn Wα sn WW n )*x

[0033] where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , and Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

[0034] An electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is loaded into the processor, any one of the deep learning-based endoscopic polyp image detection methods described is implemented.

[0035] A storage medium described in the present invention stores a computer program, characterized in that when the computer program is executed by a processor, it implements any one of the endoscopic polyp image detection methods based on deep learning.

[0036] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) In the neck network, the ASFF structure dynamically selects and fuses multiple layers of feature maps, so that the network can better capture the multi-scale information of the target; (2) Dynamic convolution is introduced in each stage of the feature prediction head to improve the accuracy and efficiency of colorectal polyp detection. Through the learnable deformation module, the shape and size of the convolution kernel are dynamically adjusted according to the characteristics of the input data to adapt to different polyp input data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flow chart of the present invention;

[0038] Figure 2This is a structural diagram of the improved YOLOv5 model of the present invention;

[0039] Figure 3 It is the ASFF module structure diagram of the present invention;

[0040] Figure 4 This is a structural diagram of the dynamic convolution module of the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0042] like Figure 1 As shown, an embodiment of the present invention provides an endoscopic polyp image detection method based on deep learning, comprising the following steps:

[0043] (1) Name the acquired dataset Polyp Dataset, preprocess it, and divide the processed dataset into four categories; use Labelimg to annotate the images, that is, annotate the targets or attributes of the polyp type according to the data type, and convert the annotation results into text format, including the target ID, location coordinates, and width and height information, and then divide it into training set, validation set, and test set in a ratio of 6:2:2;

[0044] (2) Build an improved YOLOv5 model by introducing the ASFF structure in the neck network; Figure 2-3 As shown, the details are as follows: including: constant scaling and adaptive fusion, including the following steps:

[0045] (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2.

[0046] (22) The adaptive fusion formula is as follows:

[0047]

[0048] in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

[0049] (3) Introducing dynamic convolution modules at each stage of the feature prediction head; e.g. Figure 4As shown in the figure, the details are as follows: by scanning the global image to obtain important candidate target areas, and then introducing a dynamic convolution module to dynamically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows:

[0050] y=(α ω1 Wα f1 Wα c1 Wα s1 WW1+…+α ωn Wα fn Wα cn Wα sn WW n )*x

[0051] where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , and Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

[0052] (4) The constructed model was trained on the training set and verified on the test set to predict colorectal polyps. The details are as follows: the model parameters were stochastic gradient descent, and the SGD optimizer was used for training. In order to control the stability and speed of training, the learning rate was set to 0.01; the accuracy, recall and mean average precision (mAP) indicators were used to evaluate the performance of target detection, and these indicators were calculated to perform quantitative evaluation of the model.

[0053] The present invention conducted a series of comparative experiments to comprehensively evaluate the performance of the improved model on a specific category. The experiment used the same data set and compared the performance indicators of the original model and the algorithm on this category, including precision, recall, mAP@0.5 and mAP@0.5:0.95. In order to ensure a fair comparison, the experiment maintained the consistency of the experimental platform, number of iterations, training batches and training parameters. The specific experimental results are shown in Table 1:

[0054] Table 1 Comparison results between the improved model and the original model

[0055]

[0056] According to the experimental results in Table 1, it can be concluded that the improved model shows better performance in the intestinal polyp detection task. Specifically, the precision value of the improved model is 0.842, which is significantly higher than the baseline model, indicating that it has stronger prediction ability for intestinal polyp targets. In terms of recall rate, the improved model also presents a higher level, indicating that it can better identify the target objects of this category. In addition, the improved model has achieved 2% and 2.7% improvements in the mAP@0.5 and mAP@0.5:0.95 indicators, respectively, which means that no matter what threshold, the improved model can achieve a higher average accuracy.

[0057] The present invention provides an endoscopic polyp image detection system based on deep learning, comprising:

[0058] Preprocessing module: used to name the acquired data set as Polyp Dataset, preprocess it, and divide the processed data set into four categories; specifically: use Labelimg to annotate the image, that is, annotate the target or attribute of the polyp type according to the data type, and convert the annotation result into text format, including the target ID, location coordinates, and width and height information, and then divide it into training set, verification set, and test set according to the proportion;

[0059] YOLOv5 module: used to build an improved YOLOv5 model, that is, to introduce the ASFF structure in the neck network part; including: constant scaling and adaptive fusion, including the following steps:

[0060] (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2.

[0061] (22) The adaptive fusion formula is as follows:

[0062]

[0063] in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

[0064] Dynamic convolution module: used to introduce dynamic convolution modules in each stage of the feature prediction head; specifically, by scanning the global image to obtain important candidate target areas, and then introducing the dynamic convolution module, dynamically adjusting the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows:

[0065] y=(α ω1 Wα f1 Wα c1 Wα s1 WW1+…+α ωn Wα fn Wα cn Wα sn WW n )*x

[0066] where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , and Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

[0067] Prediction module: used to train the built model on the training set and verify it on the test set to predict colorectal polyps. The details are as follows: the model parameters are stochastic gradient descent, and the SGD optimizer is used for training. In order to control the stability and speed of training, the learning rate is set to 0.01; the accuracy, recall and mean average precision (mAP) indicators are used to evaluate the performance of target detection, and these indicators are calculated to perform quantitative evaluation of the model.

[0068] An embodiment of the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when loaded into the processor, implements any one of the deep learning-based endoscopic polyp image detection methods described above.

[0069] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any one of the deep learning-based endoscopic polyp image detection methods.

Claims

1. An endoscopic polyp image detection method based on deep learning, characterized in that: The steps include: (1) Name the acquired data set Polyp Dataset, preprocess it, and divide the processed data set into four categories; (2) Build an improved YOLOv5 model by introducing the ASFF structure in the neck network part; (3) Introducing dynamic convolution modules at each stage of the feature prediction head; (4) The constructed model is trained on the training set and verified on the test set to predict colorectal polyps.

2. The method for detecting polyps in an endoscopic image based on deep learning according to claim 1, characterized in that: The step (1) is specifically as follows: labeling the image using Lableimg, that is, labeling the target or attribute of the polyp type according to the data type, and converting the labeling result into a text format, including the target ID, location coordinates and width and height information, and then dividing it into a training set, a validation set and a test set according to the ratio.

3. The method for endoscopic polyp image detection based on deep learning according to claim 1, characterized in that: The step (2) is specifically as follows: comprising: constant scaling and adaptive fusion, including the following steps: (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2. (22) The adaptive fusion formula is as follows: in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

4. The method for endoscopic polyp image detection based on deep learning according to claim 1, characterized in that: The step (3) is specifically as follows: obtain important candidate target areas by scanning the global image, and then introduce a dynamic convolution module to dynamically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows: y=(a ω1 Wow f1 Wow c1 Wow s1 WW1+…+a ωn Wow fn Wow cn Wow sn WW n )*x where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , and Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

5. An endoscopic polyp image detection system based on deep learning, characterized in that: include: Preprocessing module: used to name the acquired data set as Polyp Dataset, preprocess it, and divide the processed data set into four categories; YOLOv5 module: used to build an improved YOLOv5 model, that is, to introduce the ASFF structure into the neck network part; Dynamic convolution module: used to introduce dynamic convolution modules at each stage of the feature prediction head; Prediction module: used to use the built model to train on the training set and verify on the test set to predict colorectal polyps.

6. The deep learning-based endoscopic polyp image detection system according to claim 5, characterized in that: In the preprocessing module, Lableimg is used to annotate the image, that is, the target or attribute of the polyp type is annotated according to the data type, and the annotation result is converted into a text format, including the target ID, location coordinates, and width and height information, and then divided into a training set, a validation set, and a test set according to the ratio.

7. The deep learning-based endoscopic polyp image detection system according to claim 5, characterized in that: The YOLOv5 module includes: constant scaling and adaptive fusion, including the following steps: (21) The identity scaling is as follows: for upsampling, a convolutional layer is first used to compress the number of channels of the feature to the corresponding level, and then the resolution is improved by interpolation; for downsampling, a convolutional layer with a stride of 2 is used to adjust the number of channels and resolution; for the finest scale, a maximum pooling layer with a stride of 2 is added before the convolution with a stride of 2. (22) The adaptive fusion formula is as follows: in, Represents the feature map y output between channels l The (i, j)th vector of ; for the weight parameters α, β and γ, after concat, they are made to be in the range of [0, 1] and the sum is 1 through softmax.

8. The deep learning-based endoscopic polyp image detection system according to claim 5, characterized in that: In the dynamic convolution module, the important candidate target areas are obtained by scanning the global image, and then the dynamic convolution module is introduced to dynamically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different polyp input data; the dynamic convolution module formula is as follows: y=(a ω1 Wow f1 Wow c1 Wow s1 WW1+…+a ωn Wow fn Wow cn Wow sn WW n )*x where α ωi ∈R, represents the convolution kernel W i scalar, α si ∈R k×k , α ci ∈R cin and α fi ∈R cout Represents three newly introduced attentions, respectively along the convolution kernel W i The spatial dimension, input channel dimension and output channel dimension of W are calculated, and W represents the multiplication operation along different dimensions of the kernel space.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the deep learning-based endoscopic polyp image detection method according to any one of claims 1 to 4 is implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, an endoscopic polyp image detection method based on deep learning according to any one of claims 1 to 4 is implemented.