Parallel diagnosis method for colon polyp medical images based on enhanced UNet
By enhancing the global context module and lightweight design of the UNet model, the dataset classification and morphological problems in colon polyp image segmentation are solved, and efficient and accurate colon polyp detection is achieved, which is suitable for large-scale screening and early diagnosis.
Patent Information
- Application Number
- CN202311367909.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-10-23
AI Technical Summary
Existing technologies for the segmentation of colon polyp medical images have problems such as inconsistent dataset classification, imperfect polyp morphological classification, and low image recognition rate and algorithm efficiency, resulting in insufficient segmentation accuracy and efficiency, making it difficult to meet the needs of early diagnosis.
Using an enhanced UNet-based method, a GAM module was designed through modules such as the global context module, channelized MLP, and residual connection to enhance the consistency and accuracy of polyp segmentation. The lightweight model structure and parallel computing were used to accelerate image diagnosis and improve segmentation accuracy and efficiency.
It achieves accurate classification and early detection of colon polyp medical images, reduces the workload of doctors, improves diagnostic efficiency and accuracy, and is suitable for large-scale screening applications.
Smart Images

Figure CN117274226B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence, image processing, parallel computing and computer-aided medical diagnosis, and in particular to a parallel diagnosis method for colon polyp medical images based on enhanced UNet. Background Art
[0002] As living standards improve and material well-being increases, people's expectations for health are becoming increasingly demanding. Artificial intelligence has developed rapidly in recent years, integrating more closely with various scientific fields. Using AI to assist doctors in diagnosing illnesses not only improves diagnostic rates but also enables early detection and treatment of illnesses, increasing patient cure rates.
[0003] Colon polyps are growths that grow on the surface of the colonic mucosa and protrude into the intestinal lumen. Colon polyps can grow over time, and many colon cancers develop from them, causing immeasurable harm to the patient. Prompt detection is key to preventing colon cancer, and colonoscopy is the best preventive measure for early detection. However, polyps can be missed during colonoscopy; literature suggests that the error rate for endoscopic examinations of colon polyps can reach approximately one-third, potentially leading to delayed detection and worsening of the disease. In statistical analyses of confirmed cases, smaller, flat polyps are the most commonly missed. Another reason for missed diagnosis is that the polyp is not within the physician's field of view or that the low resolution of the colonoscope makes it difficult to detect within the field of view. Conventional methods can improve diagnostic yields, such as improving bowel preparation quality. Advanced, high-resolution techniques or equipment can also improve detection rates, including the use of auxiliary imaging devices to expand the colonoscope's field of view or the addition of mirror magnification devices. Some subjective factors can also lead to missed detections. For example, when there are a large number of patients, even with sophisticated equipment, tired doctors will find it difficult to cope with the overloaded workload, causing visual fatigue and lowering the detection rate.
[0004] The structure and characteristics of colon polyps change over time during different stages of development, including variations in shape, size, color, and appearance. Furthermore, image artifacts, blurring, obstruction by surgical instruments and intestinal contents, flare, and low-quality images can all contribute to low detection rates. Therefore, research into computer-assisted tools to assist physicians in examinations is essential. The use of artificial intelligence and deep learning algorithms can provide effective assistance in the diagnosis of colon polyps. Colon cancer survival rates depend significantly on early detection. It is generally believed that most colorectal cancers arise from adenomatous polyps. Colonoscopy, the mainstay of colon screening, can help detect lesions early. However, colonoscopy has limitations. Data suggest that a 1% increase in polyp detection during colonoscopy reduces the risk of colorectal cancer by approximately 3%. Therefore, improving polyp detection is crucial for preventing cancerous progression. Similarly, the accurate identification and classification of detected polyps is limited by the variability of their appearance and the subjectivity of their assessment. Lesion detection and focused screening are the main methods to improve early prevention of colon cancer. In addition, computer intelligent systems can also assist in classification screening through robust segmentation of medical images.
[0005] Image segmentation technology is a key research area in image processing and a crucial component of image semantic understanding. Image segmentation is the process of dividing an image into non-overlapping regions. Computer image segmentation is the technique and process of dividing an image into several specific, unique regions and identifying targets of interest. It is a key step in the transition from image processing to image analysis. Medical image segmentation aims to extract and quantify regions of interest in images of biological tissues and organs, which is crucial for disease diagnosis and early detection. Due to the excellent learning capabilities of deep learning algorithms, convolutional neural networks have achieved great success in medical image analysis. Applying deep learning to image segmentation can greatly accelerate the rapid diagnosis of medical images.
[0006] In the field of computer image processing, deep neural networks, after thorough training, are capable of performing excellent segmentation of medical images. For example, the UNet network has become the mainstream network in this field. Applications of the UNet network to different scenarios have resulted in numerous variants, such as UNet++. However, nearly all of this work has focused on improving network performance, with little attention paid to factors such as computational complexity and inference time, which are crucial factors in many practical applications. Therefore, there is a need for a method that can effectively increase image processing speed while maintaining good segmentation performance. This approach could be applied clinically to help doctors expand the scope of disease diagnosis and improve early disease detection and prevention.
[0007] Early fully convolutional neural networks (FCNs) replaced the fully connected layers of a neural network with convolutional layers. To expand the receptive field of neurons, the neural network gradually reduced the scale of the feature map, ultimately generating very low-resolution predictions, resulting in rough segmentation results and blurred boundaries. Subsequently, a UNet-based architecture was proposed, which effectively restores the resolution of feature maps while maintaining a relatively large receptive field of neurons. By utilizing skip connections to enhance the fusion of shallow and deep features, the original FCN was improved, significantly improving the segmentation performance and boundary localization of specific organs or lesions in medical images. Furthermore, some improved models use upward connections to fuse multi-scale features and embed selective kernel modules to learn multi-scale features. These models fuse features of different resolutions. The lower-level features undergo a linear convolution to filter out noise, and then are multiplied by the upper-level features in an attention-based manner for fusion. Finally, the resulting features of different resolutions are upsampled to the same resolution and concatenated to predict the segmentation map, further enhancing the performance. However, some models rarely classify and analyze the characteristics of specific diseases for two reasons: First, because it involves specialized medical knowledge and classification, manually labeling a large database is a huge workload. Therefore, establishing a dedicated disease information classification library is particularly important. Second, because computer algorithms have difficulty in detecting specific disease characteristics in different medical images, their effectiveness is often greatly reduced. Examples of medical image diagnosis are as follows:
[0008] Example 1: A hospital introduced an intelligent diagnosis system for breast diseases. The system uses artificial intelligence algorithms, combined with breast image segmentation and intelligent recognition technology, to perform intelligent diagnosis on patients' breast images. The effective diagnosis rate for common breast diseases such as breast hyperplasia, breast fibroids, breast cystic hyperplasia, and breast cancer has reached over 78.3%, improving doctors' diagnostic efficiency and playing a good role in early disease prevention for patients.
[0009] Example 2: Due to the large number of daily physical examinations, a physical examination center uses an intelligent screening system to perform preliminary screening on the CT scans of thousands of patients every day in order to reduce the workload of the attending doctors. The cases that have undergone preliminary screening are transferred to the attending doctors. After consultation with multiple experts, not only the diagnosis rate is improved, but the time it takes for patients to receive physical examination reports is greatly shortened, thereby improving the work efficiency of the physical examination center.
[0010] Example 3: A tertiary hospital uses AI technology to learn and analyze massive amounts of medical data, improving diagnostic accuracy and precision. The hospital has established a foundational database, including medical images and genomic data. Leveraging AI's powerful computing capabilities and machine learning algorithms, the hospital learns and identifies disease characteristics and patterns. AI can accurately detect lesions, assist doctors in pathological analysis, and provide more precise diagnoses and predictions. Summary of the Invention
[0011] (1) Technical issues to be resolved
[0012] The purpose of this invention is to propose a parallel diagnosis method for colon polyps medical images based on enhanced UNet to assist doctors in diagnosing colon polyps, thereby improving the accuracy of doctors' disease diagnosis and providing better services to patients. The specific content includes the following aspects:
[0013] 1. The classification methods for colon polyp medical image datasets are not completely unified
[0014] According to clinical medical data, current classification methods for colon polyp medical image datasets are incomplete, lacking a unified classification standard. There is no systematic classification for cases prone to or induced cancer, or for frequently occurring cases. Clearly, routine screening focuses on cancerous cases and early preventive diagnosis, which are crucial for prolonging patient life and providing early intervention and treatment. Therefore, developing fundamental methods for classifying colon polyp medical image datasets, as well as early prevention and detection, is a key challenge for detection and diagnosis.
[0015] 2. Incomplete morphological classification of polyps in many models
[0016] Currently, many models are designed for polyp image segmentation. Some target features of varying scales, while others enhance image boundaries. However, most methods fail to adequately address variations in polyp shape and size. The varying sizes, shapes, and colors of polyps during endoscopic examinations present significant segmentation challenges. These variations introduce significant uncertainty, further reducing segmentation accuracy. Ensuring accurate segmentation across diverse polyp sizes, shapes, and colors is a key challenge.
[0017] 3. The recognition rate and algorithm efficiency of polyp images need to be further improved
[0018] Polyp images can be subject to image blur, intestinal content interference, light spots, and low image quality. These issues can hinder polyp image segmentation, leading to unclear features and low local segmentation accuracy. Effectively reducing these effects is a key consideration in polyp image screening. Furthermore, among the numerous polyp segmentation models currently available, some are overly complex, resulting in excessive parameters and computational complexity, leading to reduced segmentation efficiency. Further research is needed to determine how to effectively reduce the number of model parameters and computational complexity while maintaining segmentation accuracy.
[0019] (2) Technical solution
[0020] This paper provides a parallel diagnosis method for colon polyp medical images based on an enhanced UNet. This method performs preliminary standardization on the classification of colon polyp medical image datasets. While retaining the basic UNet structure, it incorporates a global context module, a channelized MLP (Multilayer Perceptron), and residual connection modules. This method utilizes a refined classification dataset to screen for key objects while ensuring good segmentation accuracy, thereby improving inference speed. To address the above issues, this paper provides the following technical solutions:
[0021] 1. Defined the primary criteria for the classification of colon polyp medical image datasets
[0022] Based on the severity of the disease revealed by the recognition of lesion images, the colon polyp medical image dataset was preliminarily standardized, and parameters such as the basic dataset and weight index classified according to the degree of harm were given, which effectively preprocessed the learning and training of the knowledge base based on the AI algorithm.
[0023] 2. An enhanced module was designed based on the morphological classification of colon polyps
[0024] To address the segmentation challenges associated with varying sizes, shapes, and colors of colon polyps during detection, a GAM (Global Association Module) was designed. This module enhances global features at different layers to achieve consistent and accurate polyp segmentation. The GAM module, as an independent module, performs global context inference on the encoder branch. Furthermore, the GAM forwards its output to each channelized module to compensate for the global context, which is gradually diluted during the hierarchical refinement process.
[0025] 3. Improved the UNet model to make it more suitable for colon polyp medical image diagnosis and screening
[0026] In order to address the image blur, light spots, and low image quality that occur during polyp segmentation, jump connections are used to enhance shallow and deep feature fusion and feature shifting, which can improve the segmentation performance and boundary positioning of specific lesion areas, reduce the impact of polyp image quality during segmentation, and achieve the effect of improving segmentation accuracy. Due to the efficiency reduction problem caused by too many parameters and high computational complexity during polyp segmentation, a lightweight model structure is adopted, and a tokenized MLP module is used. The use of tokenized MLP in the latent space reduces the number of parameters and computational complexity, while producing better results to help segmentation, so as to focus on learning local dependencies. The system adopts a parallel structure design solution, taking advantage of multi-core processors to accelerate image diagnosis and improve system efficiency.
[0027] A parallel diagnosis method for colon polyp medical images based on enhanced UNet, the method comprising the following specific contents:
[0028] Part_1: Preprocessing of colon polyp image segmentation dataset;
[0029] Part 2: Build an enhanced UNet model, initialize and train it;
[0030] Part_3: System control and output of colon polyp medical image detection.
[0031] The method is described step by step as follows:
[0032] First, the data structure definition used in the present invention is described:
[0033] According to the degree of harm, colon polyps can be divided into: neoplastic polyps and non-neoplastic polyps. According to the clinical diagnosis rules of pathology: non-neoplastic polyps generally do not become cancerous, mainly including: juvenile polyps and inflammatory polyps (also known as pseudopolyps). Adenomatous polyps are the main polyps that induce cancer. Adenomatous polyps can be divided into three types: tubular adenomas, villous adenomas and tubular-villous adenomas, among which tubular adenomas are the most common. According to the number of colon polyps, they can be divided into: single and multiple. According to the morphological characteristics of polyps, they can be divided into: pedunculated and broad-based.
[0034] DataStruct_1: Basic data definition
[0035] DataStruct_1_1: Index value definition
[0036] Define i and j as integers representing index values in a set, matrix, or vector.
[0037] DataStruct_1_2: Matrix definition
[0038] Dataset matrix Matrix_DataSets=[
[0039] {mds_1_1, mds_1_2, …, mds_1_j, …, mds_1_LenJ},
[0040] {mds_2_1, mds_2_2, …, mds_2_j, …, mds_2_LenJ},
[0041] …,
[0042] {mds_i_1, mds_i_2, …, mds_i_j, …, mds_i_LenJ},
[0043] …,
[0044] {mds_LenI_1, mds_LenI_2, …, mds_LenI_j, …, mds_LenI_LenJ}]
[0045] Among them, i represents the i-th row of matrix Matrix_DataSets, j represents the j-th column of matrix Matrix_DataSets, LenI represents the number of rows of matrix Matrix_DataSets, and LenJ represents the number of columns of matrix Matrix_DataSets.
[0046] DataStruct_1_3: vector definition
[0047] Vector_Return={vr_1, vr_2, …, vr_i, …, vr_LenSet VR}, where i represents the i-th element of the vector Vector_Return, and LenSet VR Represents the total number of elements in the vector Vector_Return.
[0048] Vector_Return T Represents the transposed vector of Vector_Return.
[0049] DataStruct_1_4: Definition of screening control parameter gate values
[0050] SelectValue is defined as the screening control parameter gate value given by the system, and the initial value is specified by the system.
[0051] DataStruct_1_5: Command_Parallel represents parallel execution of instructions.
[0052] DataStruct_1_6: Command_Single represents the single-machine execution mode command after the system is reset.
[0053] DataStruct_1_7: Procedure_Result represents the image screening process implemented in the enhanced UNet model.
[0054] DataStruct_1_8: Procedure_SendInfo represents the process of sending information to the attending physician when an image that may be cancerous is found during image screening.
[0055] DataStruct_1_9: ImageCurrent represents the colon polyp image detected by the system.
[0056] DataStruct_2: Colon polyp classification dataset definition
[0057] The tumor polyp dataset is defined as Set_Cancer;
[0058] The non-neoplastic polyp dataset is defined as Set_CancerLess;
[0059] The single polyp dataset is defined as Set_Single;
[0060] The multiple polyp dataset is defined as Set_Multiple;
[0061] The pedunculated polyp dataset is defined as Set_Stem;
[0062] The sessile polyp dataset is defined as Set_SessilePolyp.
[0063] DataStruct_3: detailed classification definition of the collection
[0064] Assume any two partitions of the set Set, Set_A and Set_B:
[0065] Set_A={seta_1, seta_2, …, seta_i, …, seta_LenSet A}
[0066] Set_B={setb_1, setb_2, …, setb_j, …, setb_LenSet B}
[0067] Among them, seta_i is the i-th element of Set_A, setb_j is the j-th element of Set_B, seta_LenSet ARepresents the total number of elements in Set_A, setb_LenSet B Represents the total number of elements in Set_B.
[0068] If for every seta_i there is a setb_j, and seta_i is contained in setb_j, then Set_A is called a refined classification set of Set_B.
[0069] DataStruct_4: Colon polyp classification dataset definition
[0070] The colon polyp classification dataset Set_Types includes the following sets:
[0071] Tubular adenoma, villous adenoma, tubulo-villous adenoma, serrated lesion, juvenile polyp, Peutz-Jeghers polyp, inflammatory polyp, schistosomal polyp, benign lymphoid polyp, hyperplastic polyp, mucosal hypertrophic neoplasm, familial adenomatous coli, non-familial adenomatous coli, Gardner syndrome, Turcot syndrome, pseudopolyposis, multiple schistosomal polyps, Cronkhite-Canada syndrome, expanded and refined classification dataset.
[0072] The mathematical form of Set_Types is described as:
[0073] Set_Types={st_1, st_2, …, st_i, …, st_LenSet ST}where st_i is the i-th element of the set Set_Types, LenSet ST Represents the total number of elements in the set Set_Types.
[0074] DataStruct_5: Classification weight definition of the collection
[0075] The classification weights of the set are defined as ClassWeightSet={cws_1, cws_2, …, cws_i, …, cws_LenSet CWS}, where cws_i is the i-th element of the set ClassWeightSet, LenSet CWS Represents the total number of elements in the set ClassWeightSet.
[0076] The elements of the set ClassWeightSet satisfy the following conditions:
[0077] Condition_51: cws_1>= cws_2>= …>= cws_i …>= cws_LenSet CWS
[0078] Condition_52: cws_1+cws_2+…+cws_i+…+cws_LenSet CWS =1
[0079] Condition_53: The weight value of the set Set_Cancer is greater than the weight value of the set Set_CancerLess;
[0080] Condition_54: The weight value of the set Set_Multiple is greater than the weight value of the set Set_Single.
[0081] DataStruct_6: Definition of detailed classification weight matrix
[0082] Colon polyp subclassification Matrix_SubDataSets=[
[0083] {msds_1_1, msds_1_2, …, msds_1_j, …, msds_1_LenJ},
[0084] {msds_2_1, msds_2_2, …, msds_2_j, …, msds_2_LenJ},
[0085] …,
[0086] {msds_i_1, msds_i_2, …, msds_i_j, …, msds_i_LenJ},
[0087] …,
[0088] {msds_LenI_1, msds_LenI_2, …, msds_LenI_j, …, msds_LenI_LenJ}]
[0089] Among them, i represents the i-th row of the matrix Matrix_SubDataSets, and j represents the j-th column of the matrix Matrix_SubDataSets.
[0090] DataStruct_7: Get the value definition of the variable
[0091] GetValue(X_Valueget, Y_Valueget) means getting the value of variable Y_Valueget and storing it in variable X_Valueget.
[0092] DataStruct_8: Set the value definition of the variable
[0093] SetValue(X_Valueset, Y_Valueset) means setting the value of variable Y_Valueset to variable X_Valueset.
[0094] The data structure definition ends.
[0095] Next, the basic process definition of the present invention is described:
[0096] Function_1: Initialization process definition
[0097] Function_1_1: InitializingFunction(Para_1, Para_2, …, Para_i) represents the system initialization of the first parameter Para_1, the second parameter Para_2, and the i-th parameter Para_i. Among them, the parameters Para_1, Para_2, …, Para_i can be variables, sets, matrices, vectors, etc.
[0098] Function_1_2: InitializingProcedure(ProcedureName) represents the system initialization process ProcedureName.
[0099] Function_2: Executes function and procedure definitions
[0100] Function_2_1: ExecuteFunc(FuncName, In_Para, Out_Para) represents the execution of the function FuncName, the input parameter variable is In_Para, and the output parameter variable is Out_Para.
[0101] Function_2_2: ExecuteProc(CommandName, ProcName) represents executing the procedure ProcName according to the control command CommandName.
[0102] Function_3: Calculate the return value of a single image
[0103] Value_Result represents the return value obtained by calculating a single image of colon polyps. The calculation process is as follows:
[0104] Value_Result(Matrix_DataSets, Vector_Return)=Matrix_DataSets*Vector_Return T
[0105] The basic process definition ends.
[0106] The function of Part_1 is to establish a colon polyp classification set and initialize the set parameters. The specific steps are as follows:
[0107] Step_P1_1: Create a colon polyp classification dataset and a colon polyp subclassification dataset. The case images in the dataset are carefully annotated and verified by gastroenterology experts and classified. The image dataset is preprocessed, the main parts of the image are enhanced and normalized, and the image size is scaled according to image normalization.
[0108] Step_P1_2: Crop, rotate, flip, and elastically deform the newly added and supplemented images according to specifications to improve the robustness of the training model, enhance its generalization ability, and avoid overfitting.
[0109] Step_P1_3: Initialize the classification weights of the set and the refined classification weight matrix, and initialize the screening control parameter gate value.
[0110] Part_1 description is completed.
[0111] The function of Part_2 is to build an enhanced UNet model, initialize it and train it.
[0112] UNeMt stands for the establishment of an enhanced UNet model. The UNeMt model consists of an encoder (Encoder) and a decoder (Decoder), a jump connection module (ConnectSection) and a global context module (GAM).
[0113] The encoder is a feature extraction network consisting of a downsampling convolution stage and an MLP block labeling stage. Colon polyp images are downsampled using convolution-max pooling to obtain feature maps. The decoder is a feature fusion network consisting of an MLP block labeling stage and an upsampling convolution stage. Feature maps from each layer are fused with those obtained through deconvolution using a jump connection.
[0114] The global context module addresses the segmentation challenges caused by the varying size, shape, and color of polyps during endoscopic examination. By enhancing global features at different layers, it achieves consistent and accurate polyp segmentation. The global context module is designed using a pyramidal approach and is a standalone module used to infer global context in the encoder branch. Meanwhile, the GAM forwards its output to each channelized module to compensate for global context, which is gradually diluted during the layered refinement process. The GAM contains three branches to extract contextual features at different scales. This module consists of a global average pooling branch and two adaptive local average pooling branches, outputting feature maps of spatial sizes of 1×1, 3×3, and 5×5, respectively. A feature representation based on non-local operations is introduced to capture the global context in a refined manner, relying on features at each position, enhancing the encoder output. These three feature maps are upsampled and concatenated to generate the module's global context features, which are then fed back to each channelized module in the decoder stream.
[0115] The skip connection module addresses image blur, flare, and low image quality that can occur during polyp segmentation. By enhancing shallow and deep feature fusion and feature shifting, it improves segmentation performance and boundary localization in specific lesion areas, reducing the impact of polyp image quality during segmentation and ultimately increasing segmentation accuracy. The skip connection module upsamples the feature maps corresponding to positions in the encoder and then performs feature fusion on the channel level, fusing low-level and high-level features. This allows the module to retain more high-resolution detail information contained in high-level feature maps, improving image segmentation accuracy.
[0116] Step_P2_1: Initializing Procedure (UNeMt) represents initializing the UNeMt model, initializing the encoder and decoder, the skip connection module and the global context module.
[0117] Step_P2_2: Training_UNeMt represents the training-enhanced UNet model. To make the model lightweight, the model adopts a five-layer encoder and decoder structure and uses a tokenized MLP module. Because too many parameters and high computational complexity during polyp segmentation reduce segmentation efficiency, using a tokenized MLP to reduce the number of parameters and computational complexity can produce better results and assist in segmentation.
[0118] The downsampling convolution stage consists of three convolution blocks, consisting of two normal convolutions and one depthwise separable convolution. Each convolution block has a 3×3 convolution layer, group normalization, and activation functions. Pooling is performed at half the original resolution. Depthwise separable convolution reduces the number of parameters and computation to a certain extent. It consists of two steps: channel-by-channel convolution and point-by-point convolution. In the channel-by-channel convolution stage, the multi-channel feature map from the previous layer is first split into single-channel feature maps. These are then subjected to single-channel convolution and then stacked together. The feature map from the previous layer is resized, while the number of channels remains unchanged. In the point-by-point convolution stage, a second convolution is then performed using a 1×1 kernel with the same number of kernels as the number of channels.
[0119] MLP tokenization stage: First, use 3×3 convolution to project the features to Dimension dimension, and the number of channels becomes Dimension dimension to obtain image features. Then, perform shift operation on these features, then perform residual connection, and finally pass the processed feature map to MLP for learning.
[0120] The decoder stage is similar, first upsampling the feature map, and then MLP performs feature projection.
[0121] The processed dataset images are divided into three parts: test set, validation set and training set, which are used as input data for improving UNeMt. The improved UNeMt model is trained to ensure that the data distribution of each subset is consistent as much as possible, and the training-test set of the polyp dataset Set_Types is obtained. The training test set includes: tubular adenoma, villous adenoma, tubular-villous adenoma, serrated lesions, juvenile polyps, Peutz-Jeghers polyps, inflammatory polyps, schistosomal polyps, benign lymphoid polyps, hyperplastic polyps, mucosal hypertrophic neoplasms, familial adenomatous coli, non-familial adenomatous coli, Gardner syndrome, Turcot syndrome, pseudopolyposis, multiple schistosomal polyps, Cronkhite-Canada syndrome, and expanded and refined classification dataset.
[0122] Step_P2_3: Introduce the entire dataset into the trained UNeMt model to obtain the segmented image, process the segmented result and return the result.
[0123] Part_2 description is completed.
[0124] Part_3 retrains the UNeMt model, resetting initial and system parameters. It also inputs images of detected colon polyps and outputs the test results. If the condition is serious, the image information is sent to the attending physician. This includes two processes, ParallelSec_1 and ParallelSec_2, which can be executed in parallel:
[0125] ParallelSec_1: Parallel execution part 1
[0126] Assume that NewSelectValue is the newly set screening control parameter gate value;
[0127] Step_PS1_1:SetValue(SelectValue, NewSelectValue);
[0128] Step_PS1_2: InitializingFunction(Set_Types, ClassWeightSet, Matrix_SubDataSets);
[0129] Step_PS1_3: InitializingProcedure(UNeMt);
[0130] Step_PS1_4: ExecuteProc(Command_Single, Training_UNeMt);
[0131] ParallelSec_2: Parallel execution part 2
[0132] Assume that FocusValue is the weight value of the current colon polyp medical image detection output;
[0133] Step_PS2_1: ExecuteFunc(Procedure_Result, ImageCurrent, Vector_Return);
[0134] Step_PS2_2: Value_Result(Matrix_SubDataSets, Vector_Return);
[0135] Step_PS2_3: GetValue(FocusValue, Value_Result);
[0136] Step_PS2_4:
[0137] if(FocusValue>= SelectValue)
[0138] ExecuteProc(Command_Parallel, Procedure_SendInfo);
[0139] else
[0140] ExecuteProc(Command_Parallel, ParallelSec_2);
[0141] The following are specific instructions:
[0142] In parallel part 1, SetValue(SelectValue, NewSelectValue) implements resetting the screening control parameter gate value, InitializingFunction(Set_Types, ClassWeightSet, Matrix_SubDataSets) executes initialization of the values of Set_Types, ClassWeightSet, Matrix_SubDataSets, InitializingProcedure(UNeMt) initializes the enhancement model, and ExecuteProc(Command_Single, Training_UNeMt) represents reopening the system in a mutually exclusive manner and executing the training process Training_UNeMt.
[0143] In parallel part 2, ExecuteFunc(Procedure_Result, ImageCurrent, Vector_Return) represents executing the screening process Procedure_Result on the current colon polyp medical image ImageCurrent and returning it to Vector_Return; calculating the Value_Result(Matrix_SubDataSets, Vector_Return) value of the colon polyp medical image, GetValue(FocusValue, Value_Result) represents assigning the calculation result Value_Result to FocusValue. If FocusValue is greater than or equal to SelectValue, it means that dangerous lesions that seriously affect the patient's health have appeared in the patient's screening image. The ExecuteProc(Command_Parallel, Procedure_SendInfo) process is executed in parallel, and Procedure_SendInfo transmits information such as the patient's diseased image to the attending physician; otherwise, the system continues to execute the ParallelSec_2 screening process in parallel.
[0144] Part_3 description is completed.
[0145] (3) Beneficial effects
[0146] The beneficial effects of the technical solution of the present invention are:
[0147] 1. The primary classification standard for the colon polyp medical image dataset, as well as the refined classification set and weight set, were established, providing a useful exploration for the accurate detection and early prevention of colon polyp medical images.
[0148] 2. The enhanced module, designed based on the morphological classification of colon polyps, increases the accuracy of colon polyp detection in medical images. This makes the UNet model more suitable for colon polyp detection in medical images and increases the flexibility of the system. Users can set screening parameters, making it easier for hospitals and medical examination centers to conduct large-scale independent screening.
[0149] 3. Added parallel execution process to automatically and continuously detect a large number of colon polyp medical images, reducing the workload of doctors and accurately detecting specific parts and local areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0150] Figure 1 A flowchart showing the parallel diagnosis method of colon polyp medical images based on enhanced UNet in the present invention. Implementation Method
[0151] The following is a further detailed description of the embodiments of the present invention in conjunction with the accompanying drawings and examples. Obviously, the embodiments described are only a part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.
[0152] An embodiment of the present invention provides a method for diagnosing and screening colon polyps based on an enhanced UNet model.
[0153] Example 1: Create a colon polyp dataset and initialize it.
[0154] Set the tumor polyp dataset as Set_Cancer, the non-tumor polyp dataset as Set_CancerLess, the single polyp dataset as Set_Single, the multiple polyp dataset as Set_Multiple, the pedunculated polyp dataset as Set_Stem, and the sessile polyp dataset as Set_SessilePolyp.
[0155] The classification weights of the set are defined as ClassWeightSet={cws_1, cws_2, …, cws_i, …, cws_LenSet CWS}.
[0156] Assume that the system initialization set is: cws_1=0.5, cws_2=0.3, cws_3=0.12, cws_4=0.08.
[0157] SelectValue=30.
[0158] The weight value of the set Set_Cancer is greater than that of the set Set_CancerLess, and the weight value of the set Set_Multiple is greater than that of the set Set_Single.
[0159] Set the weight value SetValue(Set_Cancer ClassWeight , cws_1)
[0160] Set the weight value SetValue(Set_CancerLess ClassWeight , cws_4)
[0161] Set_Types includes the following sets:
[0162] Familial adenomatosis (Set_TypeFA):
[0163] The image features in the Set_TypeFA dataset are characterized by a severe tendency to malignant transformation. It is an autosomal dominant hereditary disease with a high rate of canceration in familial adenomatosis, and therefore belongs to the Set_Cancer dataset.
[0164] Benign lymphoid polyps (Set_TypeBLP):
[0165] The image features in the Set_TypeBLP dataset are isolated benign lymphoid polyps, which mostly occur in the rectum. They are single or multiple, sessile, generally smooth in surface, slightly white in color, and soft in texture. This type of polyp is benign and rarely becomes cancerous, so it belongs to the Set_CancerLess dataset.
[0166] Initialize Matrix_SubDataSets=[{0.5, 0}, {0, 0.08}]
[0167] Example 2: Build an enhanced UNet model, initialize and train it.
[0168] Step_P2_1: Initialize the UNeMt model, initialize the encoder and decoder, skip connection module and global context module.
[0169] Step_P2_2: Training_UNeMt represents the training enhanced UNet model.
[0170] Step_P2_3: Introduce the entire dataset into the trained UNeMt model to obtain the segmented image, process the segmented result and return the result.
[0171] Example 3: Diagnose and screen input images.
[0172] Assume that the images of a patient with familial adenoma are being diagnosed and tested.
[0173] Execute ParallelSec_2, where FocusValue is the weight value output by the current colon polyp medical image detection.
[0174] Step_PS2_1: ExecuteFunc(Procedure_Result, ImageCurrent, Vector_Return);
[0175] Step_PS2_2: Value_Result(Matrix_SubDataSets, Vector_Return);
[0176] Assume Vector_Return = {95, 10}, calculate Value_Result:
[0177] Matrix_DataSets*Vector_Return T =[{0.5, 0}, {0, 0.08}]*(95, 0) T =95*0.5=52.25
[0178] Step_PS2_3: GetValue(FocusValue, Value_Result);
[0179] FocusValue=52.25.
[0180] Step_PS2_4:
[0181] if(FocusValue>= SelectValue)
[0182] ExecuteProc(Command_Parallel, Procedure_SendInfo);
[0183] else
[0184] ExecuteProc(Command_Parallel, ParallelSec_2);
[0185] Because FocusValue>= SelectValue, that is, 52.25>30, the patient's case picture is sent to the attending physician. Obviously, the patient's lesion may become cancerous.
[0186] Example 4: When the data set changes or the screening range needs to be adjusted, redefine the screening control parameter gate value.
[0187] Execute the ParallelSec_1 process
[0188] Set NewSelectValue = 27;
[0189] Step_PS1_1:SetValue(SelectValue, NewSelectValue);
[0190] Step_PS1_2: InitializingFunction(Set_Types, ClassWeightSet, Matrix_SubDataSets);
[0191] Step_PS1_3: InitializingProcedure(UNeMt);
[0192] Step_PS1_4: ExecuteProc(Command_Single, Training_UNeMt);
[0193] The system retrains the model under the Command_Single command and executes Training_UNeMt. After the system training is completed, it restarts the execution of ParallelSec_2. Obviously, when the patient's FocusValue is greater than or equal to 27, the screening range is expanded.
[0194] Example 5: When images are imported sequentially or in batches, the system executes them in parallel.
[0195] Assume that a doctor and a medical examination center are both using the system. In Step_PS2_4 of ParallelSec_2:
[0196] Assume that a doctor is continuously screening images. If the current image does not meet the screening range of SelectValue, the system executes the procedure ExecuteProc (Command_Parallel, ParallelSec_2). Command_Parallel indicates that the system supports parallel computing. As long as the system meets the requirements for parallel resource allocation, the doctor's ParallelSec_2 can be executed continuously.
[0197] The physical examination center inputs batch data. In Step_PS2_4 of ParallelSec_2:
[0198] if(FocusValue>= SelectValue)
[0199] ExecuteProc(Command_Parallel, Procedure_SendInfo);
[0200] else
[0201] ExecuteProc(Command_Parallel, ParallelSec_2);
[0202] Parallel processing is performed based on the SelectValue value; combined with the 5G high-speed network, the cloud computing center can enable doctors and physical examination centers to quickly perform diagnosis and screening through parallel methods.
[0203] Finally, it should be noted that the above examples are only used to illustrate the technical methods of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above examples, those skilled in the art should understand that they can still modify the technical solutions described in the above examples, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the examples of the present invention.
Claims
1. A parallel processing method for colon polyp medical images based on enhanced UNet, characterized by: Part_1: Preprocessing of colon polyp image segmentation dataset; Part 2: Build an enhanced UNet model, initialize and train it; Part_3: System control and colon polyp medical image detection output; The method is described step by step as follows: First, the data structure used is defined: Colon polyps are divided into two categories according to the degree of harm: tumor polyps and non-tumor polyps; There are three types of adenomatous polyps: tubular adenomas, villous adenomas, and tubulovillous adenomas; According to the number of colon polyps, they are divided into single and multiple; According to the morphological characteristics of polyps, they are divided into two types: pedunculated and sessile; DataStruct_1: Basic data definition DataStruct_1_1: Index value definition Define i and j as integers, representing index values in sets, matrices, and vectors; DataStruct_1_2: Matrix definition Dataset Matrix_DataSets = [ {mds_1_1,mds_1_2,…,mds_1_j,…,mds_1_LenJ}, {mds_2_1,mds_2_2,…,mds_2_j,…,mds_2_LenJ}, …, {mds_i_1,mds_i_2,…,mds_i_j,…,mds_i_LenJ}, …, {mds_LenI_1,mds_LenI_2,…,mds_LenI_j,…,mds_LenI_LenJ}] Where i represents the i-th row of the matrix Matrix_DataSets, j represents the j-th column of the matrix Matrix_DataSets, LenI represents the number of rows of the matrix, and LenJ represents the number of columns of the matrix; DataStruct_1_3: vector definition Vector_Return = {vr_1, vr_2, ..., vr_i, ..., vr_LenSet VR } Where i represents the i-th element of the vector Vector_Return; LenSet VR Represents the total number of elements in the vector Vector_Return; Vector_Return T Represents the transposed vector of vector_Return; DataStruct_1_4: Definition of screening control parameter gate values SelectValue is defined as the screening control parameter gate value set by the system, and the initial value is specified by the system; DataStruct_1_5: Command_Parallel represents parallel execution of instructions; DataStruct_1_6: Command_Single represents the single-machine execution mode command after the system is reset; DataStruct_1_7: Procedure_Result represents the image screening process implemented in the enhanced UNet model; DataStruct_1_8: Procedure_SendInfo represents the process of sending information to the attending physician when an image greater than the screening control parameter threshold value is found during image screening; DataStruct_1_9: ImageCurrent represents the colon polyp image detected by the system; DataStruct_2: Colon polyp classification dataset definition The tumor polyp dataset is defined as Set_Cancer The non-neoplastic polyp dataset is defined as Set_CancerLess The single polyp dataset is defined as Set_Single The multiple polyp dataset is defined as Set_Multiple The pedunculated polyp dataset is defined as Set_Stem The sessile polyp dataset is defined as Set_SessilePolyp DataStruct_3: detailed classification definition of the collection Assume any two partitions of the set Set, Set_A and Set_B: Set_A={set_1,set_2,…,set_i,…,set_LenSet A } Set_B={setb_1,setb_2,…,setb_j,…,setb_LenSet B } Among them, seta_i is the i-th element of Set_A, setb_j is the j-th element of Set_B, seta_LenSet A Represents the total number of elements in Set_A, setb_LenSet B Represents the total number of elements in Set_B; If for every seta_i there is a setb_j, and seta_i is contained in setb_j, then Set_A is called a refined classification set of Set_B; DataStruct_4: Colon polyp classification dataset definition The colon polyp classification dataset Set_Types includes the following sets: Tubular adenoma, villous adenoma, tubulo-villous adenoma, serrated lesion, juvenile polyp, Peutz-Jeghers polyp, inflammatory polyp, schistosomal polyp, benign lymphoid polyp, hyperplastic polyp, mucosal hypertrophic neoplasm, familial adenomatous colon, non-familial adenomatous colon, Gardner syndrome, Turcot syndrome, pseudopolyposis, multiple schistosomal polyps, Cronkhite-Canada syndrome, and system-expanded refined classification dataset; The mathematical form of Set_Types is described as: Set_Types={st_1,st_2,…,st_i,…,st_LenSet ST }, where st_i is the i-th element of the set Set_Types, LenSet ST Represents the total number of elements in the set Set_Types; DataStruct_5: Classification weight definition of the collection The classification weight of the definition set is ClassWeightSet={cws_1,cws_2,…,cws_i,…,cws_LenSet CWS }, where cws_i is the i-th element of the set ClassWeightSet, LenSet CWS Represents the total number of elements in the set ClassWeightSet; The elements of the set ClassWeightSet satisfy the following conditions: Condition_51:cws_1>=cws_2>=…>=cws_i…>=cws_LenSet CWS Condition_52:cws_1+cws_2+…+cws_i+…+cws_LenSet CWS =1 Condition_53: The weight value of the set Set_Cancer is greater than the weight value of the set Set_CancerLess; Condition_54: The weight value of the set Set_Multiple is greater than the weight value of the set Set_Single; DataStruct_6: Definition of detailed classification weight matrix Colon polyp subclassification Matrix_SubDataSets=[ {msds_1_1,msds_1_2,…,msds_1_j,…,msds_1_LenJ}, {msds_2_1,msds_2_2,…,msds_2_j,…,msds_2_LenJ}, …, {msds_i_1,msds_i_2,…,msds_i_j,…,msds_i_LenJ}, …, {msds_LenI_1,msds_LenI_2,…,msds_LenI_j,…,msds_LenI_LenJ}] Where i represents the i-th row of the matrix Matrix_SubDataSets, and j represents the j-th column of the matrix Matrix_SubDataSets; DataStruct_7: Get the value definition of the variable GetValue(X_Valueget, Y_Valueget) means getting the value of variable Y_Valueget and saving it in variable X_Valueget; DataStruct_8: Set the value definition of the variable SetValue(X_Valueset, Y_Valueset) means setting the value of variable Y_Valueset to variable X_Valueset; The data structure definition ends; Next, the basic process definition used: Function_1: Initialization process definition Function_1_1: InitializingFunction(Para_1, Para_2, …, Para_i) represents the system initialization of the first parameter Para_1, the second parameter Para_2, and the i-th parameter Para_i, where the parameters Para_1, Para_2, …, Para_i are variables, arguments, sets, matrices, and vectors. Function_1_2: InitializingProcedure(ProcedureName) represents the system initialization process ProcedureName; Function_2: Executes function and procedure definitions Function_2_1: ExecuteFunc(FuncName, In_Para, Out_Para) represents the execution of the function FuncName, the input parameter variable is In_Para, and the output parameter variable is Out_Para; Function_2_2: ExecuteProc(CommandName, ProcName) represents executing the procedure ProcName according to the control command CommandName; Function_3: Calculate the return value of a single image Value_Result represents the return value obtained by calculating a single image of colon polyps. The calculation process is as follows: Value_Result(Matrix_DataSets,Vector_Return)=Matrix_DataSets*Vector_Return T The basic process definition ends; The function of Part_1 is to establish a colon polyp classification set and initialize the set parameters. The specific steps are as follows: Step_P1_1: Create a colon polyp classification dataset and a colon polyp sub-classification dataset. The case images in the dataset are annotated and verified by gastroenterology experts, and then classified. The image dataset is pre-processed, and the core part of the image is enhanced and normalized, and the image size is normalized. Step_P1_2: Crop, rotate, flip, and elastically deform the newly added and supplemented images according to the specifications; Step_P1_3: Initialize the classification weights of the set and the refined classification weight matrix, and initialize the screening control parameter gate values; Part_1 description completed; The function of Part_2 is to build an enhanced UNet model, initialize and train it; UNeMt stands for the establishment of an enhanced UNet model. The UNeMt model consists of an encoder, a decoder, a jump connection module ConnectSection, and a global context module GAM. The encoder is a feature extraction network, which includes a downsampling convolution stage and an MLP labeling block stage. The colon polyp image is downsampled through convolution-max pooling to obtain its feature map. The decoder is a feature fusion network, which includes an MLP labeling block stage and an upsampling convolution stage. The feature maps of each level are fused with the feature maps obtained by deconvolution through a jump connection. During detection, GAM segments the image according to the presence of polyp features. GAM adopts a pyramidal design. As an independent module, it performs global context inference on the encoder branch. At the same time, GAM forwards its output to each channelized module to compensate for the global context, which is gradually diluted during the hierarchical refinement process. GAM contains three branches to extract contextual features at different scales. The module consists of a global average pooling branch and two adaptive local average pooling branches, and outputs feature maps of spatial sizes of 1×1, 3×3, and 5×5, respectively. Features based on non-local operations rely on features at each position to capture the global picture and enhance the encoder output. The three feature maps are upsampled and concatenated to obtain the global context features of the module, which are fed back to each channelized module in the decoder stream. ConnectSection addresses image blur, light spots, and low image quality that can occur in polyp segmentation by enhancing shallow and deep feature fusion and feature shifting to achieve segmentation and boundary location of specific lesion areas. The skip connection module upsamples the feature maps of corresponding positions in the encoder part in the decoder part and then performs feature fusion on the channel to achieve the fusion of low-level and high-level features, thereby preserving the high-resolution information contained in the high-level feature maps. Step_P2_1: Initializing Procedure (UNeMt) represents initializing the UNeMt model, initializing the encoder and decoder, the skip connection module and the global context module; Step_P2_2: Training_UNeMt represents the training of the enhanced UNet model, which adopts a five-layer encoder and decoder structure and uses a tokenized MLP module; The downsampling convolution stage consists of three convolution blocks, which include two normal convolutions and one depth-separable convolution. Each convolution block has a 3×3 convolution layer, group normalization and activation function, and adopts a pooling operation with the resolution reduced to half of the original. It includes two processes, namely channel-by-channel convolution and point-by-point convolution. In the channel-by-channel convolution stage, the multi-channel feature map from the previous layer is first split into feature maps of a single channel, and single-channel convolution is performed on them respectively, and then they are stacked into one block. The feature map from the previous layer is resized, and the number of channels does not change. In the point-by-point convolution stage, a second convolution is performed, using a convolution kernel of 1×1 size, and the number of convolution kernels is equal to the number of channels. MLP labeling block stage: First, use 3×3 convolution to project the features to the Dimension dimension, and the number of channels becomes the Dimension dimension to obtain image features. Then, perform a shift operation on these features, then perform a residual connection, and finally pass the processed feature map to the MLP learning; The decoder stage upsamples the feature map and then performs feature projection on the MLP; The processed dataset images are divided into three parts: test set, validation set and training set. These are used as input data for improving UNeMt. The improved UNeMt model is trained to obtain the training-test set of the polyp dataset Set_Types. The training test set includes: tubular adenoma, villous adenoma, tubular-villous adenoma, serrated lesion, juvenile polyp, Peutz-Jeghers polyp, inflammatory polyp, schistosomal polyp, benign lymphoid polyp, hyperplastic polyp, mucosal hypertrophic neoplasm, familial adenomatous coli, non-familial adenomatous coli, Gardner syndrome, Turcot syndrome, pseudopolyposis, multiple schistosomal polyps, Cronkhite-Canada syndrome, and the system expands the refined classification dataset. Step_P2_3: Import the entire dataset into the trained UNeMt model to obtain the segmented image, process the segmented result and return the result; Part_2 description completed; Part_3 retrains the UNeMt model, resetting initial and system parameters. It also inputs a colon polyp image and outputs the test results. If the test result exceeds the threshold, the image information is transmitted to the attending physician. ParallelSec_1 and ParallelSec_2 execute in parallel. ParallelSec_1: Parallel execution part 1 Assume that NewSelectValue is the newly set screening control parameter gate value; Step_PS1_1:SetValue(SelectValue,NewSelectValue); Step_PS1_2: InitializingFunction(Set_Types, ClassWeightSet, Matrix_SubDataSets); Step_PS1_3: InitializingProcedure(UNeMt); Step_PS1_4: ExecuteProc(Command_Single,Training_UNeMt); ParallelSec_2: Parallel execution part 2 Assume that FocusValue is the weight value of the current colon polyp medical image detection output; Step_PS2_1: ExecuteFunc(Procedure_Result,ImageCurrent,Vector_Return); Step_PS2_2: Value_Result(Matrix_SubDataSets,Vector_Return); Step_PS2_3: GetValue(FocusValue,Value_Result); Step_PS2_4: if(FocusValue>=SelectValue) ExecuteProc(Command_Parallel,Procedure_SendInfo); else ExecuteProc(Command_Parallel,ParallelSec_2); The specific instructions are as follows: In parallel part 1 SetValue(SelectValue,NewSelectValue) is used to reset the gate value of the screening control parameter; InitializingFunction(Set_Types,ClassWeightSet,Matrix_SubDataSets) executes the initialization of the values of Set_Types,ClassWeightSet,Matrix_SubDataSets; InitializingProcedure(UNeMt) initializes the enhanced model; ExecuteProc(Command_Single,Training_UNeMt) represents restarting the system in a mutually exclusive manner and executing the training process Training_UNeMt; In parallel part 2 ExecuteFunc(Procedure_Result, ImageCurrent, Vector_Return) represents executing the screening procedure Procedure_Result on the current colon polyp medical image ImageCurrent and returning it to Vector_Return; Calculate the Value_Result(Matrix_SubDataSets,Vector_Return) value of the colon polyp medical image; GetValue(FocusValue,Value_Result) means assigning the calculation result Value_Result to FocusValue; In Step_PS2_4, if FocusValue is greater than or equal to SelectValue, the ExecuteProc(Command_Parallel, Procedure_SendInfo) process is executed in parallel, and Procedure_SendInfo notifies the attending physician that the patient's risk level exceeds the system threshold; otherwise, the system continues to execute the ParallelSec_2 screening process in parallel; Part_3 description is completed.