Gastrointestinal lesion analysis and processing method and system based on convolutional neural network
By processing the red, green, blue and brightness channel images of digestive tract endoscope images through convolutional neural networks, the accurate identification of digestive tract lesions is achieved, solving the problem of low identification efficiency in the existing technology and improving the accuracy of identification of lesion areas. performance and processing efficiency.
Patent Information
- Application Number
- CN202410902613.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to quickly and accurately identify lesions in gastrointestinal endoscopic images with existing technology, especially due to the large number of images and similar background colors, which results in low review efficiency by doctors and easy missed detections.
A method based on convolutional neural networks is used to generate a synthetic channel map by obtaining red, green, blue and brightness channel maps, and an image segmentation model is used for pixel-level classification to determine the lesion area.
It improves the accuracy and efficiency of lesion identification, reduces the need for manual review, and enables more accurate extraction of lesion areas, making it suitable for automated processing of large-scale endoscopic images.
Smart Images

Figure CN118447338B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a gastrointestinal lesion analysis and processing method and system based on convolutional neural network. Background Art
[0002] Digestive tract diseases such as the intestines and stomach are common diseases. If they are not discovered in time, there is a risk of early digestive tract cancer. At present, digestive tract endoscopy is a common means of digestive tract examination. And with the development of endoscope technology, wireless capsule endoscopy (WCE) came into being. Wireless capsule endoscopy can clearly capture images of the entire digestive tract. The operation is simple and painless, with low preoperative requirements and broad prospects for clinical application.
[0003] However, since the backgrounds of endoscopic images are relatively similar and wireless capsule endoscopes will produce a huge amount of gastrointestinal endoscopic images (even if they are shot at a rate of 2 frames per second, tens of thousands of images will be generated), if these images are reviewed by gastroenterologists, it will not only be inefficient but also prone to missed detections and misdetections. Summary of the invention
[0004] In order to solve the above problems, an embodiment of the present invention aims to provide a gastrointestinal lesion analysis and processing method and system based on convolutional neural network.
[0005] In a first aspect, an embodiment of the present invention provides a gastrointestinal lesion analysis and processing method based on a convolutional neural network, comprising:
[0006] Acquire a target endoscopic image to be identified, wherein the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image;
[0007] The red channel image and the brightness channel image are merged to generate a first channel image; the green channel image and the blue channel image are merged to generate a second channel image;
[0008] Inputting the first channel map and the second channel map into an image segmentation model, and performing pixel-level classification on the first channel map and the second channel map using the image segmentation model;
[0009] The lesion area in the target endoscopic image is determined according to the classification result of the image segmentation model.
[0010] In some optional embodiments, acquiring the target endoscopic image to be identified includes:
[0011] Acquire multiple continuous original endoscopic images;
[0012] The multiple original endoscopic images are superimposed to generate a target endoscopic image to be identified.
[0013] In some optional embodiments, superimposing the plurality of original endoscopic images to generate a target endoscopic image to be identified includes:
[0014] Determine a plurality of channel images in the plurality of original endoscopic images respectively; the plurality of channel images include a red channel image, a green channel image, a blue channel image and a brightness channel image;
[0015] For each channel map, the channel maps of the plurality of original endoscopic images are subjected to pixel-by-pixel addition of color scale values to determine the sum of the color scale values of each pixel;
[0016] Performing normalization processing according to the maximum value and the minimum value of the sum of the color scale values to determine the normalized color scale value of each pixel;
[0017] in, ; For the Line The sum of the color level values of the pixels in the column, is the maximum value of the sum of all color level values, is the minimum value of the sum of all color level values, For the Line Normalized color scale value of the column pixels;
[0018] The corresponding channel map in the target endoscopic image is generated according to the normalized color scale values of all pixels.
[0019] In some optional embodiments, acquiring the target endoscopic image to be identified includes:
[0020] Determining a grayscale channel map of the target endoscopic image;
[0021] Perform edge detection processing on the grayscale channel image to generate a brightness channel image.
[0022] In some optional implementations, performing edge detection processing on the grayscale channel image to generate a brightness channel image includes:
[0023] Convolution processing is performed on the grayscale channel image in sequence according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel image;
[0024] A brightness channel map is generated according to the intermediate channel map.
[0025] In some optional implementations, the step of sequentially performing convolution processing on the grayscale channel map according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel map includes:
[0026] Performing convolution processing on the grayscale channel image according to a first convolution kernel to generate a first intermediate channel image; performing convolution processing on the first intermediate channel image according to a second convolution kernel to generate a second intermediate channel image;
[0027] Among them, the first convolution kernel A1 and the second convolution kernel A2 are:
[0028] , ; a, b, c, d are all preset positive numbers, and b≥a, d≥c;
[0029] Performing convolution processing on the grayscale channel image according to a third convolution kernel to generate a third intermediate channel image; performing convolution processing on the third intermediate channel image according to a fourth convolution kernel to generate a fourth intermediate channel image;
[0030] Among them, the third convolution kernel B1 and the fourth convolution kernel B2 are:
[0031] , ;
[0032] Furthermore, generating a brightness channel map according to the intermediate channel map includes:
[0033] A brightness channel map is generated according to the second intermediate channel map and the fourth intermediate channel map; wherein the brightness channel map Line The color scale value of the column elements The second intermediate channel is: Line The color scale value of the column elements , and the fourth intermediate channel in FIG. Line The color scale value of the column elements The mean of .
[0034] In some optional embodiments, the image segmentation model includes an encoder and a decoder;
[0035] The using the image segmentation model to perform pixel-level classification on the first channel map and the second channel map includes:
[0036] Performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels;
[0037] According to the decoder, the upsampled feature map of the current level is spliced with the convolutional coding feature map of the same level, and the spliced feature map is convoluted and upsampled to generate a convolutional decoding feature map and an upsampled feature map of the corresponding level; wherein the initial upsampled feature map is generated by upsampling the convolutional coding feature map of the last level;
[0038] Classification is performed according to the convolutional decoding feature map output by the last layer of the decoder.
[0039] In some optional embodiments, the encoder includes a first sub-encoder and a second sub-encoder;
[0040] The step of performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels includes:
[0041] Performing convolution processing and downsampling processing on the first channel map layer by layer according to the first sub-encoder to generate a first convolutional coding feature map and a first downsampling feature map of a corresponding level;
[0042] Performing convolution processing and downsampling processing on the second channel map layer by layer according to the second sub-encoder to generate a second convolutional coding feature map and a second downsampling feature map of a corresponding level;
[0043] The step of splicing the upsampled feature map of the current level with the convolutional coding feature map of the same level according to the decoder includes:
[0044] The first convolutional coding feature map and the second convolutional coding feature map of the same level are fused to generate a third convolutional coding feature map of the corresponding level;
[0045] The third convolutional coding feature map of the current level is concatenated with the upsampled feature map of the current level to generate a concatenated feature map of the current level.
[0046] In some optional implementations, the fusing of the first convolutional coding feature map and the second convolutional coding feature map of the same level to generate a third convolutional coding feature map of the corresponding level includes:
[0047] Performing convolution processing on the first convolutional coding feature map according to a first scale convolution kernel to generate a first scale feature map; performing convolution processing on the second convolutional coding feature map according to a second scale convolution kernel to generate a second scale feature map; wherein the scale of the first scale convolution kernel is smaller than the scale of the second scale convolution kernel;
[0048] Determining a first channel attention weight of the first scale feature map and a second channel attention weight of the second scale feature map;
[0049] Performing weighted processing on the first scale feature map according to the first channel attention weight, and performing weighted processing on the second scale feature map according to the second channel attention weight;
[0050] The weighted processing result of the first scale feature map and the weighted processing result of the second scale feature map are fused to generate a third convolutional coding feature map of the corresponding level.
[0051] In a second aspect, an embodiment of the present invention further provides a gastrointestinal lesion analysis and processing system based on a convolutional neural network, comprising:
[0052] An acquisition module, used for acquiring a target endoscopic image to be identified, wherein the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image;
[0053] A fusion module is used to fuse the red channel image and the brightness channel image to generate a first channel image; and to fuse the green channel image and the blue channel image to generate a second channel image;
[0054] A processing module, used for inputting the first channel map and the second channel map into an image segmentation model, and performing pixel-level classification on the first channel map and the second channel map using the image segmentation model;
[0055] The recognition module is used to determine the lesion area in the target endoscopic image according to the classification result of the image segmentation model.
[0056] In a third aspect, an embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used for any of the above-mentioned gastrointestinal lesion analysis and processing methods based on convolutional neural networks.
[0057] In a fourth aspect, an embodiment of the present invention further provides an electronic device, including:
[0058] at least one processor; and,
[0059] a memory communicatively connected to the at least one processor; wherein,
[0060] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the gastrointestinal lesion analysis and processing methods based on convolutional neural networks described above.
[0061] In the solution provided in the first aspect of the embodiment of the present invention, the color target endoscopic image is distinguished according to the channel, the first channel map is generated by combining the red channel map and the brightness channel map, and the second channel map is generated by combining the green channel map and the blue channel map, so that feature extraction can be performed separately, effectively avoiding the situation where the red component affects the remaining channel maps, and the features in each channel map can be extracted more accurately; and the image segmentation model is used for pixel-level classification, which is convenient for realizing the fusion of the classification results of the first channel map and the second channel map, and can ensure the accuracy of the recognition result, and can extract the lesion area relatively accurately, which is convenient for doctors to refer to. This process does not require the participation of doctors, can effectively liberate manpower, and has high processing efficiency.
[0062] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 A flow chart of a gastrointestinal lesion analysis and processing method based on a convolutional neural network provided by an embodiment of the present invention is shown;
[0065] Figure 2 The histogram of the red, green and blue color components of the endoscopic image provided by the embodiment of the present invention is shown;
[0066] Figure 3 A schematic diagram of a process of implementing edge detection using two convolution kernels provided in an embodiment of the present invention is shown;
[0067] Figure 4 A schematic diagram showing a process of encoding and decoding a first channel image by an image segmentation model provided by an embodiment of the present invention;
[0068] Figure 5 A schematic diagram showing a process of encoding and decoding a first channel map and a second channel map provided by an embodiment of the present invention is shown;
[0069] Figure 6 A schematic diagram of feature fusion based on the PSA module provided in an embodiment of the present invention is shown;
[0070] Figure 7A schematic diagram of the structure of a gastrointestinal lesion analysis and processing system based on a convolutional neural network provided by an embodiment of the present invention is shown;
[0071] Figure 8 A schematic diagram of the structure of an electronic device for executing a gastrointestinal lesion analysis and processing method based on a convolutional neural network provided by an embodiment of the present invention is shown.
[0072] Description of reference numerals:
[0073] 401, first channel map; 402, convolutional coding feature map of the first level; 403, downsampling feature map of the second level; 404, convolutional coding feature map of the second level; 405, downsampling feature map of the third level; 406, convolutional coding feature map of the third level; 407, upsampling feature map of the second level; 408, convolutional decoding feature map of the second level; 409, upsampling feature map of the first level; 410, convolutional decoding feature map of the first level; 411, classification result; 501, second channel map; 502, second convolutional coding feature map of the first level; 503, second downsampling feature map of the second level; 504, The second convolutional coding feature map of the second layer; 505, the second down-sampling feature map of the third layer; 506, the second convolutional coding feature map of the third layer; 4502, the third convolutional coding feature map of the first layer; 4504, the third convolutional coding feature map of the second layer; 4506, the third convolutional coding feature map of the third layer; 406a, the first scale feature map; 506a, the second scale feature map; 701, the acquisition module; 702, the fusion module; 703, the processing module; 704, the recognition module; 1100, the electronic device; 1110, the processor; 1120, the communication interface; 1130, the memory; 1140, the bus. DETAILED DESCRIPTION
[0074] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0075] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0076] With the development of artificial intelligence and deep learning technology in the field of medical imaging, it has become an inevitable trend to use neural networks to automatically detect endoscopic images to assist gastroenterologists in diagnosis. However, due to the large number of endoscopic images, most of which are normal images, the proportion of effective lesion images is small; and the background colors of the human digestive tract are very similar, so it is of great significance to be able to quickly and accurately recognize endoscopic images.
[0077] The current mainstream solution is to use traditional convolutional neural networks (CNNs) for image recognition, which extracts color and texture features from images to achieve lesion recognition, such as polyps, ulcers, and bleeding in the digestive tract. However, this solution is easily affected by the background inside the digestive tract, the extracted features are not obvious enough, and the recognition accuracy is poor.
[0078] The present invention provides a method for analyzing and processing gastrointestinal lesions based on a convolutional neural network. The method utilizes the characteristics of digestive tract endoscope images to generate different channel maps according to different channels, and performs pixel-level image segmentation based on multiple channel maps, so as to more accurately determine digestive tract lesions. Figure 1 As shown, the method includes: step 101 to step 104.
[0079] Step 101: Acquire a target endoscopic image to be identified, where the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image.
[0080] In the embodiment of the present invention, the endoscopic image to be identified can be acquired by acquisition and the like, and for ease of description, the endoscopic image to be identified is referred to as a target endoscopic image. For example, the target endoscopic image can be an image of the inside of the digestive tract acquired by a wireless capsule endoscope.
[0081] The target endoscopic image is a color image in RGB (red, green, and blue) format. Accordingly, the target endoscopic image includes at least channel images corresponding to the three colors of red, green, and blue, namely, a red channel image, a green channel image, and a blue channel image. In addition, some endoscopic images themselves contain images of grayscale dimensions, namely, grayscale channel images, which can be used as brightness channel images; if the target endoscopic image does not contain a grayscale channel image, a corresponding grayscale channel image can be generated based on the red channel image, the green channel image, and the blue channel image.
[0082] For example, Y=0.299R+0.587G+0.114B. R, G, B, and Y represent the color scale values of the corresponding pixels in the red channel map, green channel map, blue channel map, and gray channel map, respectively, and the color scale value ranges from 0 to 255. After determining the gray channel map, the corresponding brightness channel map is generated.
[0083] Step 102: Fusing the red channel image and the brightness channel image to generate a first channel image; fusing the green channel image and the blue channel image to generate a second channel image.
[0084] For the endoscopic image of the digestive tract, since it mainly presents a reddish color, the red component is much larger than the green component and the blue component. Figure 2 The histogram of the red, green and blue color components of an endoscope image is shown, where the horizontal axis is the color scale value and the vertical axis is the number of pixels of the corresponding color scale value; Figure 2 As shown, the endoscopic image has more red components, while the green and blue components are relatively small and close. In other words, the red channel image generally has a larger color gradation value.
[0085] In an embodiment of the present invention, a red channel image is distinguished from a green channel image and a blue channel image, and each is used as input data of the model; and to ensure the consistency of the two input data, a brightness channel image is added to the red channel image, and one input data is generated based on the two.
[0086] Specifically, the red channel map and the brightness channel map are fused to generate a type of input data, namely, the first channel map; similarly, the green channel map and the blue channel map are fused to generate another type of input data, namely, the second channel map. The fusion can be performed in a splicing manner or in other ways such as weighting, which is not limited in this embodiment.
[0087] Step 103: Input the first channel map and the second channel map into an image segmentation model, and use the image segmentation model to perform pixel-level classification on the first channel map and the second channel map.
[0088] In an embodiment of the present invention, image recognition is performed based on an image segmentation model (also called a semantic segmentation model), and the image segmentation model may be, for example, a convolutional neural network such as a Unet (U-type network) model. The image segmentation model may implement pixel-level classification, that is, classify each pixel of the input image, and finally obtain the desired classification result.
[0089] The first channel map and the second channel map are both used as inputs of the image segmentation model to achieve pixel-level classification of the first channel map and the second channel map. For example, two image segmentation models can be set to process the first channel map and the second channel map respectively, and finally the comprehensive processing results of the two can be determined by using an integrated learning method.
[0090] Step 104: Determine the lesion area in the target endoscopic image according to the classification result of the image segmentation model.
[0091] In this embodiment, the classification result of the image segmentation model can represent the classification of each pixel in the first channel image and / or the second channel image. Since the pixels of the first channel image, the second channel image and the target endoscopic image correspond one-to-one, the classification of each pixel in the target endoscopic image can be determined, and then it can be determined whether there is a lesion therein, as well as the corresponding lesion area.
[0092] For example, based on the image segmentation model, it can be determined which area each pixel in the target endoscopic image belongs to, such as background, normal, or abnormal. The abnormal area is the lesion area. In addition, the abnormal area can be subdivided, such as distinguishing polyp areas, ulcer areas, bleeding areas, etc., to achieve refined identification.
[0093] The gastrointestinal lesion analysis and processing method based on convolutional neural network provided by the embodiment of the present invention distinguishes the color target endoscopic image according to the channel, generates a first channel map by combining the red channel map and the brightness channel map, and generates a second channel map by combining the green channel map and the blue channel map, so that feature extraction can be performed separately, effectively avoiding the situation where the red component affects the remaining channel maps, and can more accurately extract the features in each channel map; and, pixel-level classification is performed using the image segmentation model, which is convenient for realizing the fusion of the classification results of the first channel map and the second channel map, and can ensure the accuracy of the recognition result, and can relatively accurately extract the lesion area therein, which is convenient for doctors to refer to. The process does not require the participation of doctors, can effectively liberate manpower, and has high processing efficiency.
[0094] In some optional implementations, the above step 101 of "obtaining a target endoscopic image to be identified" may specifically include the following steps A1 to A2.
[0095] Step A1: Acquire multiple continuous original endoscopic images.
[0096] Step A2: Overlay multiple original endoscopic images to generate a target endoscopic image to be identified.
[0097] Since there are a large number of endoscopic images, if each endoscopic image is classified and identified, more processing resources are required and it takes a long time. In this embodiment, multiple continuous original endoscopic images are taken as a group, and each group generates a target endoscopic image for identification. While reducing the number of images that need to be classified and identified, the features in the endoscopic image can also be highlighted to ensure the accuracy of classification and identification.
[0098] Specifically, the original endoscopic image can be an image directly acquired, such as an image acquired by a wireless endoscopic capsule; for multiple continuous original endoscopic images, these original endoscopic images are superimposed, and the image generated after superposition is used as the target endoscopic image to be identified. For example, multiple original endoscopic images can be weighted averaged pixel by pixel, and the final generated image is used as the target endoscopic image.
[0099] Optionally, the above step A2 of "superimposing a plurality of original endoscopic images to generate a target endoscopic image to be identified" may include the following steps A21 to A24.
[0100] Step A21: respectively determine a plurality of channel images in a plurality of original endoscopic images; the plurality of channel images include a red channel image, a green channel image, a blue channel image, and a brightness channel image.
[0101] In the embodiment of the present invention, each original endoscopic image also includes image data of multiple channels, namely, a red channel image, a green channel image, a blue channel image, and a brightness channel image, which will not be described in detail here.
[0102] Furthermore, for each channel map (red channel map, green channel map, etc.), the corresponding channel map in the target endoscopic image is generated according to the following steps A22 to A24. For example, for multiple red channel maps in multiple original endoscopic images, the red channel map in the target endoscopic image can be obtained by processing according to the following steps A22 to A24.
[0103] Step A22: For each channel map, the color scale values of the channel maps of multiple original endoscopic images are added pixel by pixel to determine the sum of the color scale values of each pixel.
[0104] Step A23: Perform normalization processing according to the maximum and minimum values of the sum of the color scale values to determine the normalized color scale value of each pixel.
[0105] in, ; For the Line The sum of the color level values of the pixels in the column, is the maximum value of the sum of all color level values, is the minimum value of the sum of all color level values, For the Line Normalized color scale value of the column pixels.
[0106] Step A24: Generate a corresponding channel map in the target endoscopic image according to the normalized color scale values of all pixels.
[0107] For example, taking the red channel map as an example, each pixel of the red channel maps of multiple original endoscopic images has a certain color level value (0~255). The color level values of these red channel maps are added pixel by pixel, so that the sum of the color level values of each pixel can be determined. For example, if the red channel map has m rows and n columns of pixels, then a total of m×n color level values can be determined. , =1,2,…,m, =1,2,…,n.
[0108] And, for the sum of m×n color scale values , its maximum and minimum values can be determined, that is, , , the following formula (1) is used for normalization processing to determine the normalized color scale value corresponding to each pixel, that is, the normalized color scale value , which is the normalized color scale value In the red channel, Line The color level values of the columns of pixels are used to generate the red channel image.
[0109] ,
[0110] The other channel graphs are also processed in the above manner and will not be described in detail here.
[0111] After normalization, the sum of all color level values can be normalized to 0~255, that is, the sum of the smallest color level value is 0, and the sum of the largest color level value is 255, thereby effectively removing the influence of the background and ensuring the accuracy of subsequent recognition.
[0112] In some optional embodiments, the above step 101 of "obtaining the target endoscopic image to be identified" may also include a process of generating a brightness channel map, which specifically includes the following steps A3 to A4.
[0113] Step A3: Determine the grayscale channel map of the target endoscopic image.
[0114] Step A4: Perform edge detection processing on the grayscale channel image to generate a brightness channel image.
[0115] As described above, the target endoscopic image itself may include a grayscale channel map; if it does not include a grayscale channel map, a corresponding grayscale channel map may be generated based on a red channel map, a green channel map, and a blue channel map. After the grayscale channel map is determined, edge detection processing is performed on it to ultimately generate the desired brightness channel map. For example, edge detection processing may be performed based on a Sobel operator.
[0116] In this embodiment, the brightness channel image contains edge features of the endoscopic image, and fusing it with the red channel image is helpful in distinguishing different areas and facilitating more accurate pixel-level classification later.
[0117] Optionally, the above step A4 of "performing edge detection processing on the grayscale channel image to generate a brightness channel image" may specifically include steps A41 to A42.
[0118] Step A41: Convolution processing is performed on the grayscale channel image in sequence according to multiple 3×3 convolution kernels to generate a corresponding intermediate channel image.
[0119] Step A42: Generate a brightness channel image based on the intermediate channel image.
[0120] The Sobel operator is generally a 3×3 edge detection operator (essentially also a 3×3 convolution kernel), which can only perform edge detection based on six other pixels around a pixel. When the edge is blurred, the detection effect is average. Although the use of a larger edge detection operator such as 5×5 can improve the detection effect, the processing amount is large, which affects the processing efficiency. In an embodiment of the present invention, multiple 3×3 convolution kernels are used to perform convolution processing on the grayscale channel map in sequence, which can achieve the effect of using a larger edge detection operator with a smaller amount of calculation.
[0121] For example, if a 5×5 edge detection operator is used for processing, 25 calculations are required for each pixel; if two 3×3 convolution kernels are used for processing in sequence, only 9 calculations are required for each processing, and a total of 18 calculations are required for the two processings, which can effectively reduce the amount of calculations.
[0122] After the intermediate channel image is calculated, the brightness channel image can be generated based on the intermediate channel image. For example, the grayscale channel image can be subjected to multi-directional (horizontal + vertical) edge detection, and the multi-directional intermediate channel images can be fused into a brightness channel image.
[0123] Optionally, the above step A41 "convolving the grayscale channel image in sequence according to multiple 3×3 convolution kernels to generate a corresponding intermediate channel image" includes the following steps A411 to A412.
[0124] Step A411: performing convolution processing on the grayscale channel image according to the first convolution kernel to generate a first intermediate channel image; performing convolution processing on the first intermediate channel image according to the second convolution kernel to generate a second intermediate channel image.
[0125] Among them, the first convolution kernel A1 and the second convolution kernel A2 are:
[0126] , ; a, b, c, d are all preset positive numbers, and b≥a, d≥c.
[0127] Step A412: performing convolution processing on the grayscale channel image according to the third convolution kernel to generate a third intermediate channel image; performing convolution processing on the third intermediate channel image according to the fourth convolution kernel to generate a fourth intermediate channel image.
[0128] Among them, the third convolution kernel B1 and the fourth convolution kernel B2 are:
[0129] , .
[0130] Furthermore, the above-mentioned step A42 of "generating a brightness channel image according to the intermediate channel image" includes the following steps A421.
[0131] Step A421: Generate a brightness channel image according to the second intermediate channel image and the fourth intermediate channel image.
[0132] Among them, the brightness channel image Line Color scale value of column elements The second intermediate channel is shown in the figure Line The color scale value of the column elements , and the fourth intermediate channel Line The color scale value of the column elements For example, .
[0133] For ease of description, a 5×5 channel diagram is used for explanation. Figure 3 Figure 2 shows a schematic diagram of the process of edge detection using two convolution kernels. Figure 3 As shown, Represents the original grayscale channel image Line The pixel values of the grayscale channel image are convolved with the first convolution kernel A1 (with a step size of 1) to obtain the first intermediate channel image. Indicates the first intermediate channel in the figure Line The pixel value of the column is , which is obtained by convolving the 3×3 pixels in the upper left corner of the grayscale channel image with the first convolution kernel A1, and:
[0134] .
[0135] Similarly, for the first intermediate channel , , which is:
[0136] ;
[0137] .
[0138] Assume that ,in, , For example, for , , ,satisfy: ,but can be rewritten as: .
[0139] Similarly, , .
[0140] And, for the first intermediate channel , , , specifically:
[0141] .
[0142] Similarly, if express , , , we can get:
[0143] .
[0144] Furthermore, the first intermediate channel image is convolved according to the second convolution kernel A2 to generate a second intermediate channel image. Indicates the second intermediate channel in the figure Line The pixel value of the column is , we can get:
[0145] .
[0146] For the first of these, is equivalent to:
[0147] .
[0148] Similarly, for the other three , , , which is equivalent to:
[0149] .
[0150] Therefore, based on the original grayscale channel image, convolution is performed with the following 5×5 convolution kernel M to obtain the second intermediate channel image: The processing process of the elements in the second intermediate channel diagram is similar to this, and will not be repeated here.
[0151] .
[0152] For example, if a=c=1, b=d=2 (in this case, the second convolution kernel A2 is a Sobel operator), then the 5×5 convolution kernel M is:
[0153] .
[0154] Therefore, in this embodiment, the first convolution kernel is used First, convolve the grayscale channel image, and then use the second convolution kernel The convolution process is performed again, which is equivalent to directly convolving the grayscale channel image with a 5×5 convolution kernel M. In addition, edge detection based on the 5×5 convolution kernel M will use 20 other neighboring pixels around the pixel (only the color scale values of the five pixels in the same row are not used), which can ensure the accuracy of edge detection.
[0155] Among them, the first convolution kernel A1 and the second convolution kernel A2 are used to realize horizontal edge detection of the grayscale channel image, while the third convolution kernel B1 and the fourth convolution kernel B2 are used to realize vertical edge detection of the grayscale channel image. The implementation principles are similar and will not be repeated here.
[0156] After obtaining the second intermediate channel image and the fourth intermediate channel image after edge detection processing, the color scale values of the pixels in the two images can be averaged to obtain the color scale values of the corresponding elements in the brightness channel image, and finally obtain the brightness channel image.
[0157] Therefore, by using the first convolution kernel A1, the second convolution kernel A2, etc., it is possible to quickly implement larger-scale edge detection of the grayscale channel image with less calculation; and, based on the first convolution kernel A1, the second convolution kernel A2, etc., it is possible to effectively utilize the color scale values of more other adjacent pixels around the pixel, thereby ensuring the accuracy of edge detection.
[0158] In some optional implementations, the image segmentation model may be a Unet model, which includes an encoder and a decoder. In addition, the above step 103 of "using the image segmentation model to perform pixel-level classification on the first channel image and the second channel image" may include the following steps B1 to B3.
[0159] Step B1: Perform convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels.
[0160] Step B2: According to the decoder, the upsampled feature map of the current level is spliced with the convolutional coding feature map of the same level, and the spliced feature map is convoluted and upsampled to generate the convolutional decoding feature map and upsampled feature map of the corresponding level; wherein the initial upsampled feature map is generated by upsampling the convolutional coding feature map of the last level.
[0161] Step B3: Classify according to the convolutional decoded feature map output by the last layer of the decoder.
[0162] In the embodiment of the present invention, the image segmentation model encodes the input image (first channel image, second channel image) layer by layer, and specifically implements encoding through convolution processing and downsampling processing; then performs layer by layer decoding, and specifically implements decoding through convolution processing and upsampling processing. Finally, pixel-level classification can be implemented based on the final decoding result.
[0163] Figure 4 FIG. 4 shows a schematic diagram of the image segmentation model encoding and decoding the first channel image. Figure 4 As shown in the example, the image segmentation model is divided into three levels.
[0164] At the first level, the first channel map 401 is convolved (for example, based on a 3×3 convolution kernel) to obtain a convolutional coding feature map 402 of the first level; then the convolutional coding feature map 402 of the first level is downsampled (for example, maximum pooling) to generate a downsampled feature map 403 of the second level.
[0165] At the second level, the downsampled feature map 403 of the second level is convolved to obtain a convolutional coding feature map 404 of the second level; then, the convolutional coding feature map 404 of the second level is downsampled to generate a downsampled feature map 405 of the third level.
[0166] At the third level, the down-sampled feature map 405 of the third level is convolved to obtain a convolutional coded feature map 406 of the third level. Since the third level is the last level, there is no need to continue the down-sampling process at this time. Instead, an initial up-sampled feature map is generated based on the convolutional coded feature map 406 of the third level, and reverse decoding is started layer by layer.
[0167] Specifically, in the decoding process, at the third level, the convolutional coding feature map 406 of the third level is upsampled to generate an upsampled feature map of the previous level, that is, an upsampled feature map of the second level 407. In other words, the convolutional coding feature map 406 of the third level is also a convolutional decoding feature map of the third level; at the third level, no splicing process is required.
[0168] At the second level, the convolutional coding feature map 404 of the second level can be copied so that it can be spliced with the upsampled feature map 407 of the second level, and the spliced feature map is convolved to generate a convolutional decoding feature map 408 of the second level; then, the convolutional decoding feature map 408 of the second level is upsampled to generate an upsampled feature map 409 of the first level.
[0169] At the first level, the convolutional coding feature map 402 of the first level is copied so as to be concatenated with the upsampled feature map 409 of the first level, and the concatenated feature map is convolved to generate the convolutional decoding feature map 410 of the first level. After that, no upsampling is required, and pixel-level classification is performed based on the convolutional decoding feature map 410 of the first level (i.e., the last layer of the decoder) to obtain the classification result 411.
[0170] The processing of the second channel image is similar to this, and will not be described in detail here.
[0171] Optionally, in an embodiment of the present invention, in the encoding process of the first channel map and the second channel map, the two are encoded separately, and the encoder of the image segmentation model includes a first sub-encoder and a second sub-encoder; and in the decoding process of the first channel map and the second channel map, fusion processing is performed and they are uniformly processed by a decoder. Specifically, the above step B1 "performs convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels" includes steps B11 to B12.
[0172] Step B11: performing convolution processing and downsampling processing on the first channel map layer by layer according to the first sub-encoder to generate a first convolutional coding feature map and a first downsampling feature map of the corresponding level.
[0173] Step B12: Perform convolution processing and downsampling processing on the second channel map layer by layer according to the second sub-encoder to generate a second convolutional coding feature map and a second downsampling feature map of the corresponding level.
[0174] Figure 5 FIG. 2 shows a schematic diagram of a process of encoding and decoding the first channel image and the second channel image. Figure 5 As shown, the encoding process of the first sub-encoder for the first channel map is similar to Figure 4 Similar to the figure, that is, for the first channel map 401, the first-level convolutional coding feature map 402 (i.e., the first convolutional coding feature map of the first level), the second-level downsampling feature map 403 (i.e., the first downsampling feature map of the second level), the second-level convolutional coding feature map 404 (i.e., the first convolutional coding feature map of the second level), the third-level downsampling feature map 405 (i.e., the first downsampling feature map of the third level), and the third-level convolutional coding feature map 406 (i.e., the first convolutional coding feature map of the third level) corresponding to the first channel map 401 can be determined in sequence.
[0175] Similarly, the principle of the second sub-encoder is similar to that of the first sub-encoder. By encoding the second channel map 501 through the second sub-encoder, the first-level convolutional coding feature map (i.e., the second convolutional coding feature map 502 of the first level), the second-level downsampling feature map (i.e., the second downsampling feature map 503 of the second level), the second-level convolutional coding feature map (i.e., the second convolutional coding feature map 504 of the second level), the third-level downsampling feature map (i.e., the second downsampling feature map 505 of the third level), and the third-level convolutional coding feature map (i.e., the second convolutional coding feature map 506 of the third level) corresponding to the second channel map 501 can be determined in sequence.
[0176] In addition, the above-mentioned step B2 "splicing the upsampled feature map of the current level with the convolutional coding feature map of the same level according to the decoder" includes steps B21 to B22.
[0177] Step B21: Fuse the first convolutional coding feature map and the second convolutional coding feature map of the same level to generate a third convolutional coding feature map of the corresponding level.
[0178] Step B22, concatenating the third convolutional coding feature map of the current level with the upsampled feature map of the current level to generate a concatenated feature map of the current level.
[0179] In an embodiment of the present invention, after determining the first convolutional coding feature map and the second convolutional coding feature map of the same level, the two can be fused to generate a fused feature map of the corresponding level, i.e., a third convolutional coding feature map. Afterwards, when the upsampled feature map of the same level is spliced, the third convolutional coding feature map is spliced with the upsampled feature map of the current level.
[0180] For example, Figure 5 As shown, the first convolutional coding feature map of the third level (i.e., the convolutional coding feature map 406 of the third level) and the second convolutional coding feature map 506 of the third level are fused to generate a third convolutional coding feature map 4506 of the third level. Afterwards, the decoder performs upsampling processing on the third convolutional coding feature map 4506 of the third level to generate an upsampled feature map 407 of the second level. It can be understood that Figure 4 and Figure 5 The second level upsampled feature map 407 in is obtained based on different methods.
[0181] The first convolutional coding feature map of the second level (i.e., the convolutional coding feature map 404 of the second level) and the second convolutional coding feature map 504 of the second level are fused to generate the third convolutional coding feature map 4504 of the second level. Afterwards, the third convolutional coding feature map 4504 of the second level is concatenated with the upsampled feature map 407 of the second level, and the concatenated feature map is convoluted to obtain the convolutional decoding feature map 408 of the second level; and then the convolutional decoding feature map 408 of the second level is upsampled to generate the upsampled feature map 409 of the first level.
[0182] The first convolutional coding feature map of the first level (i.e., the convolutional coding feature map 402 of the first level) and the second convolutional coding feature map 502 of the first level are fused to generate the third convolutional coding feature map 4502 of the first level. Afterwards, the third convolutional coding feature map 4502 of the first level is concatenated with the upsampled feature map 409 of the first level, and the concatenated feature map is convoluted to obtain the convolutional decoding feature map 410 of the first level. Afterwards, the convolutional decoding feature map 410 of the first level is subjected to pixel-level classification to obtain the classification result 411.
[0183] Optionally, the above-mentioned step B21 "fusing the first convolutional coding feature map and the second convolutional coding feature map of the same level to generate a third convolutional coding feature map of the corresponding level" may specifically include the following steps B211 to B214.
[0184] Step B211: performing convolution processing on the first convolutional coding feature map according to the first scale convolution kernel to generate a first scale feature map; performing convolution processing on the second convolutional coding feature map according to the second scale convolution kernel to generate a second scale feature map; wherein the scale of the first scale convolution kernel is smaller than the scale of the second scale convolution kernel.
[0185] Step B212: Determine a first channel attention weight of the first scale feature map and a second channel attention weight of the second scale feature map.
[0186] Step B213: weighting the first-scale feature map according to the first channel attention weight, and weighting the second-scale feature map according to the second channel attention weight.
[0187] Step B214: Fusing the weighted processing result of the first scale feature map and the weighted processing result of the second scale feature map to generate a third convolutional coding feature map of the corresponding level.
[0188] In the embodiment of the present invention, based on the Pyramid Split Attention (PSA) module, the first convolutional coding feature map and the second convolutional coding feature map are fused.
[0189] Figure 6 A schematic diagram of feature fusion based on the PSA module is shown; Figure 6 Take the third-level convolutional coding feature map 406 and the third-level second convolutional coding feature map 506 as examples. Figure 6 As shown, the convolutional coding feature map 406 of the third level is convolved according to the first scale convolution kernel (for example, a 3×3 convolution kernel) to generate a first scale feature map 406a; the second convolutional coding feature map 506 of the third level is convolved according to the second scale convolution kernel (for example, a 5×5 convolution kernel) to generate a second scale feature map 506a. The first scale feature map 406a and the second scale feature map 506a may include features of different spatial scales, thereby enriching the feature space.
[0190] Based on the attention module in the PSA module, the channel attention vectors of the first scale feature map 406a and the second scale feature map 506a are extracted. , ; Then use the Softmax function to determine the channel attention vector , The corresponding channel attention weight, that is, the first channel attention weight , and the second channel attention weight Afterwards, using the first channel attention weight , the second channel attention weight The first scale feature map 406a and the second scale feature map 506a are weighted respectively, and the two weighted processing results (also a kind of feature map) are fused (e.g., concatenated), so as to generate a third convolutional coding feature map 4506 of the third level.
[0191] The process of generating the third convolutional coding feature map 4504 of the second level and the third convolutional coding feature map 4502 of the first level is similar to Figure 6 The processes shown are similar and will not be repeated here.
[0192] In the gastrointestinal lesion analysis and processing method based on convolutional neural network provided by the embodiment of the present invention, each level of the image segmentation model is provided with a jump connection, which can splice the upsampled feature map and the convolutional coding feature map of the same level, so as to effectively integrate the shallow and deep detail features and improve the accuracy of model segmentation. In addition, by fusing the first convolutional coding feature map and the second convolutional coding feature map of the same level through the PSA module, not only can the same decoder be shared to reduce the amount of decoding calculation, but also features of different scales can be fused, and classification can be performed based on richer features, which can further improve the accuracy of classification.
[0193] The above introduces in detail the process of gastrointestinal lesion analysis and processing method based on convolutional neural network. This method can also be implemented by a corresponding device. The structure and function of the device are introduced in detail below.
[0194] Based on the same inventive concept, the embodiment of the present invention also provides a gastrointestinal lesion analysis and processing system based on convolutional neural network, see Figure 7 As shown, the system includes:
[0195] An acquisition module 701 is used to acquire a target endoscopic image to be identified, wherein the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image;
[0196] A fusion module 702 is used to fuse the red channel image and the brightness channel image to generate a first channel image; and to fuse the green channel image and the blue channel image to generate a second channel image;
[0197] A processing module 703 is used to input the first channel map and the second channel map into an image segmentation model, and perform pixel-level classification on the first channel map and the second channel map using the image segmentation model;
[0198] The identification module 704 is used to determine the lesion area in the target endoscopic image according to the classification result of the image segmentation model.
[0199] In some optional implementations, the acquisition module 701 acquires the target endoscopic image to be identified, including:
[0200] Acquire multiple continuous original endoscopic images;
[0201] The multiple original endoscopic images are superimposed to generate a target endoscopic image to be identified.
[0202] In some optional implementations, the acquisition module 701 superimposes a plurality of the original endoscopic images to generate a target endoscopic image to be identified, including:
[0203] Determine a plurality of channel images in the plurality of original endoscopic images respectively; the plurality of channel images include a red channel image, a green channel image, a blue channel image and a brightness channel image;
[0204] For each channel map, the channel maps of the plurality of original endoscopic images are subjected to pixel-by-pixel addition of color scale values to determine the sum of the color scale values of each pixel;
[0205] Performing normalization processing according to the maximum value and the minimum value of the sum of the color scale values to determine the normalized color scale value of each pixel;
[0206] in, ; For the Line The sum of the color level values of the pixels in the column, is the maximum value of the sum of all color level values, is the minimum value of the sum of all color level values, For the Line Normalized color scale value of the column pixels;
[0207] The corresponding channel map in the target endoscopic image is generated according to the normalized color scale values of all pixels.
[0208] In some optional implementations, the acquisition module 701 acquires the target endoscopic image to be identified, including:
[0209] Determining a grayscale channel map of the target endoscopic image;
[0210] Perform edge detection processing on the grayscale channel image to generate a brightness channel image.
[0211] In some optional implementations, the acquisition module 701 performs edge detection processing on the grayscale channel image to generate a brightness channel image, including:
[0212] Convolution processing is performed on the grayscale channel image in sequence according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel image;
[0213] A brightness channel map is generated according to the intermediate channel map.
[0214] In some optional implementations, the step of sequentially performing convolution processing on the grayscale channel map according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel map includes:
[0215] Performing convolution processing on the grayscale channel image according to a first convolution kernel to generate a first intermediate channel image; performing convolution processing on the first intermediate channel image according to a second convolution kernel to generate a second intermediate channel image;
[0216] Among them, the first convolution kernel A1 and the second convolution kernel A2 are:
[0217] , ; a, b, c, d are all preset positive numbers, and b≥a, d≥c;
[0218] Performing convolution processing on the grayscale channel image according to a third convolution kernel to generate a third intermediate channel image; performing convolution processing on the third intermediate channel image according to a fourth convolution kernel to generate a fourth intermediate channel image;
[0219] Among them, the third convolution kernel B1 and the fourth convolution kernel B2 are:
[0220] , ;
[0221] Furthermore, the acquisition module 701 generates a brightness channel map according to the intermediate channel map, including:
[0222] Generate a brightness channel map according to the second intermediate channel map and the fourth intermediate channel map;
[0223] Among them, the brightness channel map Line The color scale value of the column elements The second intermediate channel is: Line The color scale value of the column elements , and the fourth intermediate channel in FIG. Line The color scale value of the column elements The mean of .
[0224] In some optional embodiments, the image segmentation model includes an encoder and a decoder;
[0225] The processing module 703 performs pixel-level classification on the first channel map and the second channel map using the image segmentation model, including:
[0226] Performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels;
[0227] According to the decoder, the upsampled feature map of the current level is spliced with the convolutional coding feature map of the same level, and the spliced feature map is convoluted and upsampled to generate a convolutional decoding feature map and an upsampled feature map of the corresponding level; wherein the initial upsampled feature map is generated by upsampling the convolutional coding feature map of the last level;
[0228] Classification is performed according to the convolutional decoding feature map output by the last layer of the decoder.
[0229] In some optional embodiments, the encoder includes a first sub-encoder and a second sub-encoder;
[0230] The processing module 703 performs convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels, including:
[0231] Performing convolution processing and downsampling processing on the first channel map layer by layer according to the first sub-encoder to generate a first convolutional coding feature map and a first downsampling feature map of a corresponding level;
[0232] Performing convolution processing and downsampling processing on the second channel map layer by layer according to the second sub-encoder to generate a second convolutional coding feature map and a second downsampling feature map of a corresponding level;
[0233] The processing module 703 concatenates the upsampled feature map of the current level with the convolutional coding feature map of the same level according to the decoder, including:
[0234] The first convolutional coding feature map and the second convolutional coding feature map of the same level are fused to generate a third convolutional coding feature map of the corresponding level;
[0235] The third convolutional coding feature map of the current level is concatenated with the upsampled feature map of the current level to generate a concatenated feature map of the current level.
[0236] In some optional implementations, the processing module 703 fuses the first convolutional coding feature map and the second convolutional coding feature map of the same level to generate a third convolutional coding feature map of the corresponding level, including:
[0237] Performing convolution processing on the first convolutional coding feature map according to a first scale convolution kernel to generate a first scale feature map; performing convolution processing on the second convolutional coding feature map according to a second scale convolution kernel to generate a second scale feature map; wherein the scale of the first scale convolution kernel is smaller than the scale of the second scale convolution kernel;
[0238] Determining a first channel attention weight of the first scale feature map and a second channel attention weight of the second scale feature map;
[0239] Performing weighted processing on the first scale feature map according to the first channel attention weight, and performing weighted processing on the second scale feature map according to the second channel attention weight;
[0240] The weighted processing result of the first scale feature map and the weighted processing result of the second scale feature map are fused to generate a third convolutional coding feature map of the corresponding level.
[0241] An embodiment of the present invention also provides a computer storage medium, which stores computer executable instructions, including a program for executing the above-mentioned gastrointestinal lesion analysis and processing method based on convolutional neural network, and the computer executable instructions can execute the method in any of the above-mentioned method embodiments.
[0242] Among them, the computer storage medium can be any available medium or data storage device that can be accessed by the computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0243] Figure 8 The block diagram of the structure of an electronic device of another embodiment of the present invention is shown. The electronic device 1100 may be a host server with computing capability, a personal computer PC, or a portable computer or terminal, etc. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0244] The electronic device 1100 includes at least one processor 1110 , a communication interface 1120 , a memory 1130 , and a bus 1140 . The processor 1110 , the communication interface 1120 , and the memory 1130 communicate with each other via the bus 1140 .
[0245] The communication interface 1120 is used to communicate with network elements, where the network elements include, for example, a virtual machine management center, shared storage, etc.
[0246] The processor 1110 is used to execute programs. The processor 1110 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0247] Memory 1130 is used for executable instructions. Memory 1130 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory. Memory 1130 may also be a memory array. Memory 1130 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The instructions stored in memory 1130 can be executed by processor 1110 so that processor 1110 can execute the gastrointestinal lesion analysis and processing method based on convolutional neural network in any of the above method embodiments.
[0248] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A gastrointestinal lesion analysis and processing method based on convolutional neural network, characterized in that: include: Acquire a target endoscopic image to be identified, wherein the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image; The red channel image and the brightness channel image are merged to generate a first channel image; the green channel image and the blue channel image are merged to generate a second channel image; Inputting the first channel map and the second channel map into an image segmentation model, and performing pixel-level classification on the first channel map and the second channel map using the image segmentation model; Determining a lesion area in the target endoscopic image according to a classification result of the image segmentation model; Wherein, the image segmentation model includes an encoder and a decoder; The using the image segmentation model to perform pixel-level classification on the first channel map and the second channel map includes: Performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels; According to the decoder, the upsampled feature map of the current level is spliced with the convolutional coding feature map of the same level, and the spliced feature map is convoluted and upsampled to generate a convolutional decoding feature map and an upsampled feature map of the corresponding level; wherein the initial upsampled feature map is generated by upsampling the convolutional coding feature map of the last level; Classification is performed according to the convolutional decoding feature map output by the last layer of the decoder; Furthermore, the encoder includes a first sub-encoder and a second sub-encoder; The step of performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels includes: Performing convolution processing and downsampling processing on the first channel map layer by layer according to the first sub-encoder to generate a first convolutional coding feature map and a first downsampling feature map of a corresponding level; Performing convolution processing and downsampling processing on the second channel map layer by layer according to the second sub-encoder to generate a second convolutional coding feature map and a second downsampling feature map of a corresponding level; The step of splicing the upsampled feature map of the current level with the convolutional coding feature map of the same level according to the decoder includes: The first convolutional coding feature map and the second convolutional coding feature map of the same level are fused to generate a third convolutional coding feature map of the corresponding level; The third convolutional coding feature map of the current level is concatenated with the upsampled feature map of the current level to generate a concatenated feature map of the current level.
2. The method according to claim 1, characterized in that: The step of acquiring the target endoscopic image to be identified comprises: Acquire multiple continuous original endoscopic images; The multiple original endoscopic images are superimposed to generate a target endoscopic image to be identified.
3. The method according to claim 2, characterized in that The step of superimposing the plurality of original endoscopic images to generate a target endoscopic image to be identified includes: Determine a plurality of channel images in the plurality of original endoscopic images respectively; the plurality of channel images include a red channel image, a green channel image, a blue channel image and a brightness channel image; For each channel map, the channel maps of the plurality of original endoscopic images are subjected to pixel-by-pixel addition of color scale values to determine the sum of the color scale values of each pixel; Performing normalization processing according to the maximum value and the minimum value of the sum of the color scale values to determine the normalized color scale value of each pixel; in, ; For the Line The sum of the color level values of the pixels in the column, is the maximum value of the sum of all color level values, is the minimum value of the sum of all color level values, For the Line Normalized color scale value of the column pixels; The corresponding channel map in the target endoscopic image is generated according to the normalized color scale values of all pixels.
4. The method according to any one of claims 1 to 3, characterized in that The step of acquiring the target endoscopic image to be identified comprises: Determining a grayscale channel map of the target endoscopic image; Perform edge detection processing on the grayscale channel image to generate a brightness channel image.
5. The method according to claim 4, characterized in that The step of performing edge detection processing on the grayscale channel image to generate a brightness channel image includes: Convolution processing is performed on the grayscale channel image in sequence according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel image; A brightness channel map is generated according to the intermediate channel map.
6. The method according to claim 5, characterized in that The step of sequentially performing convolution processing on the grayscale channel map according to a plurality of 3×3 convolution kernels to generate a corresponding intermediate channel map includes: Performing convolution processing on the grayscale channel image according to a first convolution kernel to generate a first intermediate channel image; performing convolution processing on the first intermediate channel image according to a second convolution kernel to generate a second intermediate channel image; Among them, the first convolution kernel A1 and the second convolution kernel A2 are: , ; a, b, c, d are all preset positive numbers, and b≥a, d≥c; Performing convolution processing on the grayscale channel image according to a third convolution kernel to generate a third intermediate channel image; performing convolution processing on the third intermediate channel image according to a fourth convolution kernel to generate a fourth intermediate channel image; Among them, the third convolution kernel B1 and the fourth convolution kernel B2 are: , ; Furthermore, generating a brightness channel map according to the intermediate channel map includes: A brightness channel map is generated according to the second intermediate channel map and the fourth intermediate channel map; wherein the brightness channel map Line Color scale value of column elements The second intermediate channel is: Line Color scale value of column elements , and the fourth intermediate channel in FIG. Line Color scale value of column elements The mean of .
7. The method according to claim 1, characterized in that The fusing the first convolutional coding feature map and the second convolutional coding feature map of the same level to generate a third convolutional coding feature map of the corresponding level includes: Performing convolution processing on the first convolutional coding feature map according to a first scale convolution kernel to generate a first scale feature map; performing convolution processing on the second convolutional coding feature map according to a second scale convolution kernel to generate a second scale feature map; wherein the scale of the first scale convolution kernel is smaller than the scale of the second scale convolution kernel; Determining a first channel attention weight of the first scale feature map and a second channel attention weight of the second scale feature map; Performing weighted processing on the first scale feature map according to the first channel attention weight, and performing weighted processing on the second scale feature map according to the second channel attention weight; The weighted processing result of the first scale feature map and the weighted processing result of the second scale feature map are fused to generate a third convolutional coding feature map of the corresponding level.
8. A gastrointestinal lesion analysis and processing system based on convolutional neural network, characterized in that: include: An acquisition module, used for acquiring a target endoscopic image to be identified, wherein the target endoscopic image includes: a red channel image, a green channel image, a blue channel image, and a brightness channel image; A fusion module is used to fuse the red channel image and the brightness channel image to generate a first channel image; and to fuse the green channel image and the blue channel image to generate a second channel image; A processing module, used for inputting the first channel map and the second channel map into an image segmentation model, and performing pixel-level classification on the first channel map and the second channel map using the image segmentation model; an identification module, used to determine the lesion area in the target endoscopic image according to the classification result of the image segmentation model; Wherein, the image segmentation model includes an encoder and a decoder; The processing module performs pixel-level classification on the first channel map and the second channel map by using the image segmentation model, including: Performing convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels; According to the decoder, the upsampled feature map of the current level is spliced with the convolutional coding feature map of the same level, and the spliced feature map is convoluted and upsampled to generate a convolutional decoding feature map and an upsampled feature map of the corresponding level; wherein the initial upsampled feature map is generated by upsampling the convolutional coding feature map of the last level; Classification is performed according to the convolutional decoding feature map output by the last layer of the decoder; Furthermore, the encoder includes a first sub-encoder and a second sub-encoder; The processing module performs convolution processing and downsampling processing on the first channel map and the second channel map layer by layer according to the encoder to generate convolutional coding feature maps and downsampling feature maps of corresponding levels, including: Performing convolution processing and downsampling processing on the first channel map layer by layer according to the first sub-encoder to generate a first convolutional coding feature map and a first downsampling feature map of a corresponding level; Performing convolution processing and downsampling processing on the second channel map layer by layer according to the second sub-encoder to generate a second convolutional coding feature map and a second downsampling feature map of a corresponding level; The processing module splices the upsampled feature map of the current level with the convolutional coding feature map of the same level according to the decoder, including: The first convolutional coding feature map and the second convolutional coding feature map of the same level are fused to generate a third convolutional coding feature map of the corresponding level; The third convolutional coding feature map of the current level is concatenated with the upsampled feature map of the current level to generate a concatenated feature map of the current level.
Citation Information
Patent Citations
Remote sensing image semantic segmentation method and device and storage medium
CN112991351A
Infrared semantic segmentation method capable of explaining edge attention and gray scale quantization network
CN114972748A
Skin disease image segmentation method and system based on joint attention convolutional neural network
CN115457021A
Esophageal early cancer focus segmentation method based on attention double-branch feature fusion
CN116563252A
Endoscopic polyp segmentation method with multi-scale guidance and multi-level supervision
CN116935044A
