Method, device, equipment, medium and program product for segmenting colon glands in pathological images
By combining the deep learning method with global and local feature information for pathological image segmentation, the difficult problem of segmentation between glandular areas and background tissues was solved, and accurate segmentation of colon glands in pathological images was achieved, thereby improving segmentation accuracy and efficiency.
Patent Information
- Application Number
- CN202510823083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-19
AI Technical Summary
In the existing technology, the continuity between the glandular area and the background tissue in the pathological image and its fuzzy edges make it difficult to effectively identify and segment the gland, resulting in variability and repeatability problems in the glandular segmentation results.
A deep learning-based method is used to extract features from pathological images through two processing branches. Global and local feature information are combined, and a hybrid dilated convolution module is used for feature fusion and decoding to achieve accurate segmentation of colon glands in pathological images.
It improves the accuracy and efficiency of colon gland segmentation in pathological images, enhances the multi-scale perception of glandular structure, makes up for the small-scale feature correlation lost in single-branch linear scanning, and improves the ability to process image details.
Smart Images

Figure CN120339630B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pathological image recognition, and in particular to a method, device, equipment, medium and program product for segmenting colon glands in pathological images. Background Art
[0002] Currently, gland segmentation in pathological images primarily relies on manual annotation by experienced pathologists. However, this process is not only time-consuming and labor-intensive, but also susceptible to subjective factors, resulting in significant variability and limited reproducibility in segmentation results. With the rapid development of computer and artificial intelligence technologies, deep learning techniques are increasingly being used in medical image processing. Deep learning techniques can enable automated processing and intelligent analysis of medical images. Using deep learning techniques for intelligent analysis of colon glands in pathological images can provide physicians with important diagnostic evidence, reduce misjudgments caused by subjective analysis, improve diagnostic accuracy and efficiency, and minimize waste of medical resources. Because malignant glands, due to severe deformation and cancerous changes, often have irregular morphology, unclear margins, and are accompanied by infiltration and destruction of surrounding tissue, segmenting the glandular region from surrounding unrelated tissue is extremely difficult. Furthermore, benign glands vary in morphology, are unevenly distributed, and exhibit severe adhesions, making accurate segmentation of benign glands equally challenging. Furthermore, due to the continuity and blurred margins between the glandular region and background tissue, existing segmentation methods often struggle to effectively distinguish between the two. Summary of the Invention
[0003] The main purpose of the present invention is to provide a method, device, equipment, medium and program product for segmenting colon glands in pathological images, aiming to solve the technical problem that the existing technology is limited by the continuity and fuzzy edges of the gland area and background tissue, and cannot effectively identify and distinguish the gland area and background tissue, resulting in the inability to accurately segment colon glands from pathological images.
[0004] To achieve the above object, the present invention provides a method for segmenting colon glands in pathological images, the method comprising the following steps:
[0005] Preprocess the original pathological image to obtain candidate image samples;
[0006] Extracting features from the candidate image samples based on the first processing branch and the second processing branch to obtain a first candidate feature map and a second candidate feature map;
[0007] Extract features from the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information;
[0008] Performing local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregating the local feature information with the global feature information to obtain a second target feature map;
[0009] Perform feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature;
[0010] The target fusion feature is decoded, and the decoding result is projected to the same dimension as the original pathological image to obtain a colon gland segmentation result of the pathological image.
[0011] Optionally, preprocessing the original pathological image to obtain candidate image samples includes:
[0012] Perform denoising on the original pathological image;
[0013] Performing staining normalization on the original pathological image after denoising to obtain a staining normalized pathological image;
[0014] performing data enhancement processing on the stained normalized pathology image, and generating an initial image dataset based on the data-enhanced stained normalized pathology image, wherein the initial image dataset includes a plurality of initial pathology image samples;
[0015] Perform image feature serialization processing on the initial image data set to obtain candidate image samples.
[0016] Optionally, extracting features from the candidate image samples based on the first processing branch and the second processing branch respectively to obtain a first candidate feature map and a second candidate feature map includes:
[0017] Based on the first processing branch, feature extraction is performed on the candidate image sample through a linear layer and an activation function to obtain a first candidate feature map. :
[0018]
[0019] in, represents the first candidate feature map, represents a candidate image sample, represents the activation function, represents the weight matrix, represents the bias vector;
[0020] Based on the second processing branch, feature extraction is performed on the candidate image sample through a linear layer, a depth-separable convolution layer, and an activation function to obtain a second candidate feature map:
[0021]
[0022]
[0023] in, represents the second candidate feature map, represents the feature map that has not undergone depth-wise separable convolution operation, represents the weight matrix, represents the bias vector, Represents a depthwise separable convolution operation.
[0024] Optionally, extracting features from the second candidate feature map along multiple directions and aggregating feature extraction results in each direction to obtain global feature information includes:
[0025] Expanding the second candidate feature map along multiple directions to obtain one-dimensional features in multiple directions;
[0026] The one-dimensional features are input to multiple linear layers, and the hidden state is updated based on the learnable matrix parameters output by the multiple linear layers:
[0027]
[0028]
[0029]
[0030]
[0031] in, 、 and Represent the learnable matrix parameters of the linear layer output, represents the learnable matrix parameters of the linear layer output, Represent the discretized learnable matrix parameters, represents the derivative of the hidden state at the current moment, represents the hidden state at the previous moment, Represents the two-dimensional features of the current input, represents the identity matrix, represents the initial matrix;
[0032] The global feature information is obtained based on the updated hidden state, the one-dimensional features, and the output learnable matrix parameters of each linear layer:
[0033]
[0034] in, represents the learnable matrix parameters of the linear layer output, Represents the extracted global feature information;
[0035] The global features after global modeling of one-dimensional features in multiple directions are aggregated to obtain two-dimensional features.
[0036] Optionally, decoding the target fusion feature and projecting the decoding result to the same dimension as the original pathological image to obtain a colon gland segmentation result of the pathological image includes:
[0037] Decoding the target fusion feature and projecting the decoding result to the same dimension as the original pathological image to obtain an initial segmentation result;
[0038] Labeling each connected region in the initial segmentation result to obtain a plurality of labeled regions;
[0039] Filtering a target area from the annotated areas based on the area of each annotated area, and removing the annotated areas other than the target area from the initial segmentation result to obtain a candidate segmentation result;
[0040] The candidate segmentation results are filtered, and the filtered candidate segmentation results are void-filled to obtain a colon gland segmentation result of a pathological image.
[0041] Optionally, after preprocessing the original pathological image to obtain candidate image samples, the method further includes:
[0042] Inputting the candidate image sample into an image segmentation model to perform pathological image colon gland segmentation to obtain a pathological image colon gland segmentation result;
[0043] The image segmentation model includes an image block embedding module, multiple encoders, multiple decoders corresponding to the multiple encoders, and a hybrid void convolution module, wherein the hybrid void convolution module is connected between the encoder and the decoder;
[0044] The image block embedding module is used to perform image feature serialization and layer normalization processing to obtain candidate image samples;
[0045] The encoder is configured to perform feature extraction on the candidate image sample based on the first processing branch and the second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map;
[0046] The encoder is further configured to perform feature extraction on the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information;
[0047] The encoder is further configured to perform local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map;
[0048] The encoder is further configured to perform feature fusion on the first candidate feature map and the second target feature map to obtain a target fused feature;
[0049] The hybrid atrous convolution module is used to perform multi-scale feature perception on the target fusion features output by the encoder, obtain multi-scale perception features, and input the multi-scale perception features into the decoder for decoding;
[0050] The decoder is used to decode the target fusion features output by the encoder and / or the multi-scale perceptual features output by the hybrid void convolution module, and project the decoding results to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
[0051] In addition, to achieve the above-mentioned purpose, the present invention further proposes a pathological image colon gland segmentation device, the pathological image colon gland segmentation device comprising:
[0052] An image processing module is used to preprocess the original pathological image to obtain candidate image samples;
[0053] a multi-branch feature extraction module, configured to extract features from the candidate image sample based on the first processing branch and the second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map;
[0054] A global feature extraction module, configured to perform feature extraction on the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information;
[0055] a local feature extraction module, configured to perform local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map;
[0056] a feature fusion module, configured to perform feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature;
[0057] The feature decoding module is used to decode the target fusion feature and project the decoding result to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
[0058] In addition, to achieve the above-mentioned purpose, the present application also proposes a pathological image colon gland segmentation device, which includes: a memory, a processor, and a computer program stored on the memory and runnable on the processor, and the computer program is configured to implement the steps of the pathological image colon gland segmentation method as described above.
[0059] In addition, to achieve the above objectives, the present application also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the pathological image colon gland segmentation method described above are implemented.
[0060] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the method for segmenting colon glands in pathological images as described above are implemented.
[0061] The present invention obtains candidate image samples by preprocessing the original pathological image; extracts features from the candidate image samples based on the first processing branch and the second processing branch respectively to obtain a first candidate feature map and a second candidate feature map; extracts features from the second candidate feature map along multiple directions, and aggregates the feature extraction results of each direction to obtain global feature information; extracts local features from the second candidate feature map through a convolution operation to obtain local feature information, and aggregates the local feature information with the global feature information to obtain a second target feature map; performs feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature; decodes the target fusion feature, and decodes the decoded feature. The result is projected to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image; since the present invention extracts features of the candidate image based on two processing branches, and extracts the global feature information and local feature information of the second candidate feature map based on the second processing branch, the global and local feature representations are collaboratively optimized, thereby enhancing the multi-scale perception ability of the glandular structure and improving the segmentation accuracy. The first candidate feature map and the second target feature map are feature-fused, thereby compensating for the problem of small-scale feature correlation relationship lost in the linear scanning process of a single branch, enhancing the global dependence of the image and the perception ability of local details, significantly improving the processing ability of image details, and thus improving the accuracy of colon gland segmentation in pathological images. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0063] Figure 1 1 is a schematic structural diagram of a pathological image colon gland segmentation device in a hardware operating environment according to an embodiment of the present invention;
[0064] Figure 2This is a flow chart of a first embodiment of a method for segmenting colon glands in pathological images according to the present invention;
[0065] Figure 3 2. It is a schematic structural diagram of the CSS2D module in the first embodiment of the method for segmenting colon glands in pathological images of the present invention;
[0066] Figure 4 Schematic diagram of the post-processing process in an embodiment of the colon gland segmentation method of pathological images of the present invention;
[0067] Figure 5 This is a schematic diagram of the network architecture of an image segmentation model according to a second embodiment of the method for segmenting colon glands in pathological images of the present invention;
[0068] Figure 6 Schematic diagram of the processing flow of the Ls-VSS module in the second embodiment of the colon gland segmentation method of pathological images of the present invention;
[0069] Figure 7 2. It is a schematic diagram of the structure of the hybrid dilated convolution module in the second embodiment of the colon gland segmentation method of the pathological image of the present invention;
[0070] Figure 8 This is a structural block diagram of an embodiment of a device for segmenting colon glands in pathological images according to the present invention.
[0071] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0072] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0073] Reference Figure 1 , Figure 1 This is a schematic structural diagram of a pathological image colon gland segmentation device in the hardware operating environment involved in an embodiment of the present invention.
[0074] like Figure 1As shown, the pathological image colon gland segmentation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display and an input unit, such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also be a storage device independent of the processor 1001.
[0075] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the apparatus for segmenting colon glands in pathological images, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0076] like Figure 1 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a pathological image colon gland segmentation program.
[0077] exist Figure 1 In the pathological image colon gland segmentation device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the pathological image colon gland segmentation device of the present invention can be set in the pathological image colon gland segmentation device. The pathological image colon gland segmentation device calls the pathological image colon gland segmentation program stored in the memory 1005 through the processor 1001 and executes the pathological image colon gland segmentation method provided by the embodiment of the present invention.
[0078] The embodiment of the present invention provides a method for segmenting colon glands in pathological images, referring to Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a method for segmenting colon glands in pathological images according to the present invention.
[0079] In the first embodiment, the colon gland segmentation method of the pathological image includes the following steps:
[0080] Step S10: pre-processing the original pathological image to obtain candidate image samples.
[0081] It should be understood that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program execution capabilities, such as a tablet computer, personal computer, or mobile phone, or a terminal electronic device capable of performing the aforementioned functions. This embodiment and the following embodiments will be described below using a device for segmenting colon glands in pathological images (hereinafter referred to as the segmentation device) as an example.
[0082] It should be noted that the preprocessing may include denoising and data enhancement of the original pathological image, thereby improving the data quality of the image sample and improving the segmentation efficiency of the pathological image and the accuracy of gland segmentation.
[0083] Furthermore, in order to improve the image segmentation efficiency and reduce the effect of different dyes on image segmentation, the above step S10 may include:
[0084] Step S101: performing denoising on the original pathological image;
[0085] Step S102: performing staining normalization on the original pathological image after denoising to obtain a staining normalized pathological image;
[0086] Step S103: performing data enhancement processing on the stained normalized pathology image, and generating an initial image dataset based on the data-enhanced stained normalized pathology image;
[0087] Step S104: performing image feature serialization processing on the initial image dataset to obtain candidate image samples.
[0088] It should be noted that the initial image data set includes a plurality of initial pathological image samples, and the data enhancement processing includes image rotation, Gaussian noise addition, random occlusion, and random contrast enhancement.
[0089] In some cases, raw pathology images often suffer from ineffective image feature extraction due to variations in H&E reagent concentration and the imaging equipment used, severely impacting segmentation accuracy. For raw pathology images of colon glands, the segmentation device can utilize the Staintools standard library and employ the vahadane staining method to normalize the staining of all colon gland pathology images.
[0090] In addition, the data also needs to be enhanced. In order to solve the problem of small number of samples, the segmentation device can perform data enhancement operations to expand the data training samples. The Imgaug data enhancement library is used to implement operations such as rotation, Gaussian noise, random occlusion, and random contrast enhancement to build a high-quality dataset with rich samples and consistent staining.
[0091] It is understandable that this embodiment can be applied to deep learning model training. If the amount of training data is too small, network training will be difficult and overfitting will easily occur. Especially in medical images, the high labeling cost leads to very little labeled data available for training. Increasing the number of data sets can improve the generalization and segmentation performance of deep neural networks. This embodiment denoises the original pathological image, performs staining normalization on the denoised original pathological image to obtain a staining normalized pathological image, performs data enhancement on the staining normalized pathological image, and generates an initial image data set based on the staining normalized pathological image after data enhancement. By normalizing and expanding the colon pathology image data, a high-quality data set with rich samples and consistent staining conditions is constructed to make it compatible with the deep learning model.
[0092] In a specific implementation, the segmentation device can input the initial image data set obtained after preprocessing into the image block embedding layer, The image is divided into 4x4 non-overlapping blocks. This process will convert the image size into , and then use layer normalization to normalize the image blocks Normalize it and then input it into the encoder for feature extraction. Input feature map X After layer normalization, the layer normalization process refers to the following formula:
[0093]
[0094] in, Represents the normalized features of the layer, represents the image block after image size conversion, and denote the mean and standard deviation respectively, and denote the trainable scaling and translation parameters respectively.
[0095] Step S20: performing feature extraction on the candidate image sample based on the first processing branch and the second processing branch respectively to obtain a first candidate feature map and a second candidate feature map.
[0096] In a specific implementation, after the original pathological image is preprocessed and layer normalized, the input feature map is divided into a first processing branch and a second processing branch for feature extraction.
[0097] Furthermore, in order to balance the linear transfer and saturation characteristics and enhance the fitting capability of complex images, the above step S20 may include:
[0098] Step S201: Based on the first processing branch, feature extraction is performed on the candidate image sample through the linear layer and activation function to obtain the first candidate feature map .
[0099] It should be noted that in the first processing branch, the input candidate image sample passes through the linear layer and then through the activation function .
[0100] Activation Function The formula is as follows:
[0101]
[0102]
[0103] Normalized input feature map First pass through the linear layer and Activation function processing, the formula is as follows:
[0104]
[0105] in, represents the first candidate feature map, represents a candidate image sample, represents the activation function, represents the weight matrix, Represents the bias vector.
[0106] Step S202: Based on the second processing branch, feature extraction is performed on the candidate image sample through a linear layer, a depth-wise separable convolution layer and an activation function to obtain a second candidate feature map.
[0107] It should be noted that in the second branch, the input candidate image samples are processed through linear layers, depth-wise separable convolutions, and activation functions, as shown in the following formula:
[0108]
[0109]
[0110] in, represents the second candidate feature map, represents the feature map that has not undergone depth-wise separable convolution operation, represents the weight matrix, represents the bias vector, Represents a depthwise separable convolution operation.
[0111] Step S30: performing feature extraction on the second candidate feature map along multiple directions, and aggregating the feature extraction results in each direction to obtain global feature information.
[0112] In some embodiments, the segmentation device may extract features from the second candidate feature map along multiple directions such as horizontal, vertical, and diagonal directions, input the one-dimensional sequence features of each direction into the S6 module for global modeling, and then aggregate the feature extraction results of each direction to obtain global feature information.
[0113] Furthermore, in order to accurately capture the global feature information in the second candidate feature map, the above step S30 may include:
[0114] Step S301: Expand the second candidate feature map along multiple directions to obtain one-dimensional features in multiple directions;
[0115] Step S302: inputting the one-dimensional features into multiple linear layers, and updating the hidden state based on the learnable matrix parameters output by the multiple linear layers;
[0116] Step S303: obtaining global feature information based on the updated hidden state, the one-dimensional features, and the output learnable matrix parameters of each linear layer;
[0117] Step S304: aggregating the global features obtained by global modeling of the one-dimensional features in multiple directions to obtain two-dimensional features.
[0118] It's important to note that in the second branch, the input is processed through a linear layer, depthwise separable convolution, and activation function, before being further filtered by a pre-built CSS2D module. The CSS2D module consists of a traditional SS2D branch and a local spatial block. This structure synergistically optimizes global and local feature representations, enhancing the model's multi-scale perception of glandular structure and improving segmentation accuracy.
[0119] It is understandable that the CSS2D module focuses on extracting and enhancing the expression of specific categories or features through information from different channels. This module consists of three parts: scan expansion operation, S6 module and scan merging operation. Figure 3 , Figure 3This is a schematic diagram of the CSS2D module's architecture. Scan expansion expands the second candidate feature map along four different directions (top left to bottom right, bottom right to top left, top right to bottom left, and bottom left to top right), forming multiple feature sequences to reduce the feature map's dimensionality. These sequences are then extracted by the S6 module, ensuring that information from all directions is thoroughly scanned to capture diverse features. The S6 module extracts information through a selective scanning mechanism, as shown in the following formula:
[0120]
[0121]
[0122]
[0123]
[0124] in, 、 and Represent the learnable matrix parameters of the linear layer output, represents the learnable matrix parameters of the linear layer output, Represent the discretized learnable matrix parameters, represents the derivative of the hidden state at the current moment, represents the hidden state at the previous moment, Represents the two-dimensional features of the current input, represents the identity matrix, Represents the initial matrix.
[0125] Recursively update the hidden state according to the following formula:
[0126]
[0127] in, represents the learnable matrix parameters of the linear layer output, Represents the extracted global feature information, and the final output is a sequence Subsequently, the global features after global modeling of the one-dimensional features in multiple directions are aggregated to obtain the two-dimensional features.
[0128] It should be understood that the CSS2D module also includes a local space module, see Figure 3 The local space module is used to extract local features from the second candidate feature map, obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map.
[0129] It should be noted that the CSS2D module in this embodiment focuses on long-range spatial relationships by performing bidirectional scanning in both vertical and horizontal directions to capture dependencies between distant regions in the feature map. However, local regions in the feature map often have weak connections. Especially within small areas, the feature map may not fully express the complex relationships between regions, resulting in insufficient representation of local information. To address this lack of local feature information, this embodiment introduces a spatial attention mechanism (SAM), which enhances the connections between local regions and improves model performance at the level of detail. Specifically, the spatial attention mechanism first extracts global information from the feature map through channel-wise average and maximum statistical operations. The channel-wise maximum statistical operation captures the most significant response of each spatial location across different channels, while the channel-wise average statistical operation provides global context. The features obtained from these two operations are then fused and convolved to generate a spatial attention map that reflects the importance of each spatial location.
[0130] Unlike traditional spatial attention mechanisms, the spatial attention mechanism of this embodiment uses the acquired max-pooling and average-pooling features as weights to weight the original feature map pixel by pixel. The original feature map is element-wise multiplied with the calculated spatial attention map, highlighting the responses of important regions in the feature map while suppressing the influence of irrelevant regions. This process strengthens the connections between local regions, especially in areas with weak local features, effectively compensating for their lack of local information.
[0131] Finally, the local feature map enhanced by spatial attention is added to the feature map of the main branch to complete the operation of the entire module. Through this weighted fusion, the features of the main branch are finely adjusted and enhanced, making the local information richer and the feature expression more accurate. This design can effectively improve the performance of the model in tasks such as gland segmentation, especially when processing complex pathological images, it can better highlight details and improve segmentation accuracy and robustness. Figure 3 , Figure 3 The CSS2D structure proposed in this embodiment is shown. The figure shows in detail the details of the bidirectional scanning main branch and the local feature branch, as well as how the feature fusion method ultimately achieves optimized feature expression.
[0132] Step S40: performing local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregating the local feature information with the global feature information to obtain a second target feature map.
[0133] In some embodiments, the segmentation device can perform local spatial feature extraction in a small range through a local spatial module, that is, capture local fine features in the spatial dimension through convolution to enhance the understanding of different spatial positions and structures. For example, through the convolution operation of a small-size convolution kernel, local feature extraction is performed on the second candidate feature map to obtain local feature information, and then the local feature information is aggregated with the global feature information to obtain a second target feature map, thereby enhancing the connection between local areas and improving the performance at the detail level during the image segmentation process.
[0134] Step S50: performing feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature.
[0135] In some embodiments, the segmentation device may and the second target feature map Perform fusion to generate target fusion features :
[0136]
[0137] in, Represents element-wise multiplication.
[0138] Step S60: Decode the target fusion feature and project the decoding result to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
[0139] In a specific implementation, the segmentation device can decode the target fusion features. After decoding, it is added to the encoder features in the jump connection, and a final projection layer is used to restore the size of the features to match the segmentation target. The image block is expanded and upsampled by 4 times to restore the height and width of the features, and then the number of channels is restored through the projection layer to output the image, thereby obtaining the colon gland segmentation result of the pathological image.
[0140] Furthermore, in order to effectively remove noise and irregular areas in the segmentation results and further improve the consistency and accuracy of the segmentation effect, the segmentation device can post-process the decoding results. Figure 4 , Figure 4 This is a schematic diagram of a post-processing process in one embodiment. The above step S60 may include:
[0141] Step S601: decoding the target fusion feature and projecting the decoding result to the same dimension as the original pathological image to obtain an initial segmentation result;
[0142] Step S602: labeling each connected region in the initial segmentation result to obtain a plurality of labeled regions;
[0143] Step S603: Filtering out a target area from the annotated areas based on the area of each annotated area, and removing the annotated areas other than the target area from the initial segmentation result to obtain a candidate segmentation result;
[0144] Step S604: filtering the candidate segmentation results, and performing hole filling on the filtered candidate segmentation results to obtain a colon gland segmentation result of a pathological image.
[0145] In the specific implementation, the segmentation device first marks the initial segmentation results, independently labels each connected area, and then eliminates areas smaller than the set threshold by calculating the area of each area, which effectively removes noise or false positive areas of mis-segmentation. Next, the segmentation results are smoothed using median filtering to eliminate the rough parts in the segmentation boundary and reduce the impact of small-scale noise on the segmentation results. Finally, through the hole filling technology, small holes that may exist inside the glandular area are filled to ensure the integrity and consistency of the segmentation results. The implementation of this series of post-processing operations not only optimizes the accuracy of the segmentation results, but also improves the ability to capture image details. Especially when processing complex pathological images, it can effectively make up for problems such as uneven boundaries and incomplete regions that occur during the model segmentation process.
[0146] This embodiment obtains candidate image samples by preprocessing the original pathological image; performs feature extraction on the candidate image samples based on the first processing branch and the second processing branch respectively to obtain a first candidate feature map and a second candidate feature map; performs feature extraction on the second candidate feature map along multiple directions, and aggregates the feature extraction results of each direction to obtain global feature information; performs local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregates the local feature information with the global feature information to obtain a second target feature map; performs feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature; decodes the target fusion feature, and decodes the decoded feature. The result is projected to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image; since this embodiment extracts features of the candidate image based on two processing branches, and extracts the global feature information and local feature information of the second candidate feature map based on the second processing branch, the global and local feature representations are collaboratively optimized, thereby enhancing the multi-scale perception ability of the glandular structure and improving the segmentation accuracy. The first candidate feature map and the second target feature map are feature fused, thereby compensating for the problem of small-scale feature association relationship lost in the linear scanning process of a single branch, enhancing the global dependence of the image and the perception of local details, significantly improving the processing ability of image details, and thus improving the accuracy of colon gland segmentation in pathological images.
[0147] refer to Figure 5 , Figure 5 Schematic diagram of the network architecture of the image segmentation model in the second embodiment of the colon gland segmentation method of the pathological image of the present invention.
[0148] Based on the above embodiment, in the second embodiment, step S10 further includes:
[0149] The candidate image samples are input into an image segmentation model to perform pathological image colon gland segmentation to obtain a pathological image colon gland segmentation result.
[0150] It should be noted that, in this embodiment, the colon gland segmentation can be performed on the pre-processed pathological image using a pre-built image segmentation model. In this embodiment, the image segmentation model can be an SVM-UNet neural network model.
[0151] It should be noted that the image segmentation model includes an image block embedding module, multiple encoders, multiple decoders corresponding to the multiple encoders, and a hybrid void convolution module, and the hybrid void convolution module is connected between the encoder and the decoder; the image block embedding module is used to perform image feature serialization and layer normalization processing to obtain candidate image samples.
[0152] It should be noted that the Ls-VSS module is the core module of SVM-UNet. Figure 6 , Figure 6 Schematic diagram of the processing flow of the Ls-VSS module, the encoder performs feature extraction on the candidate image samples based on the first processing branch and the second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map, performs feature extraction on the second candidate feature map along multiple directions, and aggregates the feature extraction results of each direction to obtain global feature information, performs local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregates the local feature information with the global feature information to obtain a second target feature map, performs feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature, decodes the target fusion feature output by the encoder and / or the multi-scale perceptual feature output by the mixed void convolution module, and projects the decoding result to the same dimension as the original pathological image to obtain a colon gland segmentation result of the pathological image.
[0153] It is understandable that if Figure 5 As shown in Figure 2, the encoder consists of four stages. At the end of the first three stages, a block merging operation is applied to reduce the height and width of the input features while increasing the number of channels. Ls-VSS modules of [2, 2, 2, 2] are used in the four stages, and the number of channels in each stage is [C, 2C, 4C, 8C].
[0154] After the output of the fourth layer of the encoder, it will be processed layer by layer through three layers of mixed void convolution, using different void rates (set to 1, 2, 4) to perform detail processing. While keeping the size of the feature map basically unchanged, the receptive field is expanded, a wider range of contextual information is captured, and the ability to perceive features of different scales is enhanced.
[0155] After the hybrid atrous convolution module completes feature extraction, it is fed into the decoder to begin decoding. Combining the feature maps processed by the atrous convolution with the upsampling information from the decoder allows for more comprehensive capture of image details, ensuring that the restored resolution contains richer contextual information.
[0156] The decoder is also divided into four stages. Starting from the third-to-last stage, a block expansion operation is used to reduce the number of feature channels and increase the height and width. In these four stages, Ls-VSS modules of scale [2, 2, 2, 1] are used, and the number of channels in each stage is [8C, 4C, 2C, C].
[0157] After the decoder, the encoder features are added to the skip connection, and a final projection layer is used to restore the size of the features to match the segmentation target. The image block is expanded and upsampled by a factor of 4 to restore the height and width of the features, and then the number of channels is restored through the projection layer to output the image.
[0158] It should be noted that the hybrid dilated convolution module is used to aggregate the target fusion features output by the encoder with the multi-scale convolution output features to obtain multi-scale perceptual features, and input the multi-scale perceptual features into the decoder for decoding. The hybrid dilated convolution module realizes multi-scale feature extraction through three consecutive convolution layers, in which dilated convolutions with dilation rates of 1, 2, and 4 are used to expand the receptive field. In addition, after the multi-scale features are spliced in the channel dimension, they are compressed by 1×1 convolution to avoid feature redundancy and improve the efficiency of feature expression. Figure 7 , Figure 7 This figure shows the structure of the hybrid atrous convolution module. A residual connection is also designed within the hybrid atrous convolution module to add the input features to the output features after multi-scale convolution. This structure not only effectively ensures the transmission of original feature information, but also alleviates the vanishing gradient problem that can occur in deep networks, significantly improving the stability of network training.
[0159] It should be noted that transition layers play a key role in connecting the upper and lower layers of deep network structures. The introduction of the hybrid convolution module in SVM-UNet not only increases network depth but also further enhances the model's ability to express detailed features. The core idea of this module is to enhance the network's capture of detailed information while maintaining the integrity and diversity of feature expression through multi-scale dilated convolution combined with a residual structure.
[0160] The hybrid convolution module achieves multi-scale feature extraction through three consecutive convolutional layers, in which dilated convolutions with dilation rates of 1, 2, and 4 are used to expand the receptive field. The dilation rate design avoids the information loss or insufficiency that may be caused by a single dilation rate, making the model more stable and accurate when dealing with gland segmentation tasks with complex deformation and strong diversity. In addition, this progressive dilation rate setting also reduces the problem of incomplete features caused by excessive sparsity. The introduction of dilated convolution enables the module to capture a wider range of contextual information, thereby effectively handling complex problems such as deformation and blurred boundaries in the gland segmentation task. In addition, after the multi-scale features are spliced in the channel dimension, they are compressed through 1×1 convolution to avoid feature redundancy and improve the efficiency of feature expression.
[0161] The module also incorporates a residual connection to add the input features to the output features after multi-scale convolution. This structure not only effectively ensures the transmission of original feature information, but also alleviates the vanishing gradient problem that can occur in deep networks, significantly improving the stability of network training. Furthermore, by combining normalization with the SiLU activation function, the module can dynamically adjust feature distribution, further enhancing feature expression capabilities. In representing complex patterns, the module demonstrates exceptional adaptability and robustness, laying a solid foundation for the network to capture richer multi-scale semantic information.
[0162] In some embodiments, the segmentation device may use a combined loss function to train the image segmentation model. The loss function is composed of a Dice loss function and a cross entropy loss function, and the formula is as follows:
[0163]
[0164] The Dice loss function is the complement of the Dice coefficient. By minimizing the Dice Loss, the model directly optimizes the degree of overlap of the segmentation results. Its specific formula is:
[0165]
[0166] The cross entropy loss function focuses more on pixel-level classification accuracy, that is, it attempts to achieve the correct classification at every pixel in the image. This refined feature gives it an advantage in processing segmentation tasks with rich details and complex structures.
[0167] The specific formula of the cross entropy loss function is:
[0168]
[0169] In some embodiments, when training image segmentation models, insufficient training data can make network training difficult and prone to overfitting. This is particularly true for medical images, where high annotation costs can lead to very limited labeled data available for training. Increasing the dataset size can improve the generalization and segmentation performance of deep neural networks. Segmentation equipment can employ a range of data processing methods, including denoising, staining normalization, and data augmentation, to normalize and augment colon pathology image data, constructing a high-quality dataset with rich samples and consistent staining, making it compatible with deep learning models.
[0170] In some embodiments, taking the construction of an image segmentation model using SVM-UNet as an example, through qualitative analysis, the segmentation results of SVM-UNet demonstrate its advantages in processing complex glandular morphology and boundary details, especially in the performance of complex boundaries and deformation degrees, which are superior to the comparison model. However, qualitative analysis mainly relies on visual comparison. Although it can intuitively reflect the performance of the model, it lacks quantitative support. Therefore, in order to more comprehensively and objectively evaluate the segmentation performance of SVM-UNet, this embodiment will use multiple evaluation indicators for quantitative analysis, and further verify the effectiveness and superiority of the model in the pathological image segmentation task through indicator comparison. Table 1 and Table 2 show the quantitative evaluation results of the image segmentation model on the GlaS dataset and the CRAG dataset, respectively.
[0171] Table 1. Quantitative evaluation results of the GlaS dataset
[0172]
[0173] As shown in Table 1 above, SVM-UNet demonstrates significant advantages on the GlaS dataset. Compared to the baseline VM-UNet, in TestA, the F1 coefficient improved by 2.5% (from 0.921 to 0.944), the Object-Dice coefficient improved by 1.4% (from 0.927 to 0.940), and the Hausdorff distance decreased by 6.1% (from 35.172 to 33.032). Compared to DE-MambaUNet, the F1 coefficient improved by 0.9%, the Object-Dice coefficient improved by 0.6%, and the Hausdorff distance decreased by a significant 51.0%. In TestB, SVM-UNet achieved a 1.6% improvement in F1 coefficient and a 0.2% improvement in Object-Dice coefficient over VM-UNet. Although the F1 coefficient was slightly lower than that of DE-MambaUNet, the Object-Dice coefficient remained the same, and the Hausdorff distance decreased by 25.3%, demonstrating the model's ability to capture comprehensive features.
[0174] Table 2. Quantitative evaluation results on the CRAG dataset
[0175]
[0176] As shown in Table 2 above, SVM-UNet also performs well on the CRAG dataset. Its Object-Dice coefficient is on par with DE-MambaUNet (0.933) and slightly higher than VM-UNet (0.929), an improvement of 0.4%. Its F1 coefficient is 0.933, a 1.3% improvement over VM-UNet. Furthermore, its Hausdorff distance is only 26.249, a reduction of 34.1% and 57.8% compared to VM-UNet and DE-MambaUNet, respectively, demonstrating its ability to accurately capture gland boundaries.
[0177] Among them, the F1 coefficient is mainly used to evaluate the algorithm's detection accuracy for a single gland. The closer it is to 1, the better the segmentation algorithm is. It takes into account both precision and recall.
[0178] The Object-Dice coefficient represents the Object-Dice coefficient. The Object-Dice coefficient is calculated for each individual object and focuses on the segmentation quality of each individual object. It is more suitable for gland segmentation tasks. The Object-Dice coefficient ranges between 0 and 1. Higher values indicate more accurate segmentation results.
[0179] Hausdorff distance represents the Object-Hausdorff distance. Hausdorff distance is used to evaluate the shape similarity between the segmentation result and the true annotation. Shape similarity is a very important consideration in gland segmentation.
[0180] The overall effectiveness of SVM-UNet has been verified through qualitative and quantitative experimental results. In order to further quantify the specific contribution of each key module in the model to the performance improvement, in some embodiments, ablation experiments can be designed to gradually add modules to conduct an in-depth analysis of the innovative structure of the model. The experiment starts from the VM-UNet model and uses it as a benchmark for comparison. First, a mixed void convolution module is added to enhance the ability to extract global features in order to evaluate its effect in improving segmentation accuracy. On this basis, the Ls-VSS module is used to replace the original VSS module to further enhance the ability to capture local spatial information and test its role in improving boundary capture accuracy and segmentation result consistency. Finally, post-processing operations are added to the model containing the above modules to analyze its contribution to the optimization of result smoothness and the suppression of small noise.
[0181] To more intuitively demonstrate the impact of each module on model performance, Table 3 summarizes the quantitative results of ablation experiments, specifically using the TestA portion of the GlaS dataset as a reference. By comparing performance metrics under different configurations, the table shows the specific contribution of each module to segmentation accuracy and boundary capture capabilities.
[0182] Table 3. Comparative evaluation results of ablation experiments
[0183]
[0184] Referring to Table 3 above, ablation experiments show that model performance gradually improves with the addition of modules. The introduction of the Hybrid Atrous Convolution (HAC) module significantly improves the F1 coefficient, slightly increases the Object-Dice coefficient, and decreases the Hausdorff distance, demonstrating enhanced boundary capture and a significant improvement in the network's feature extraction capabilities. Further adding the Ls-VSS module, while the F1 coefficient decreases slightly with the increase in local spatial information, further optimizes the Object-Dice coefficient and Hausdorff distance, improving segmentation accuracy and boundary precision. SVM-UNet achieves excellent performance across all metrics, thanks to the effective integration and synergy of its modules.
[0185] Ablation experiments effectively validated the overall performance of the SVM-UNet architecture. In some embodiments, different parameters within each module can also be tested to confirm their optimal configuration. Table 4 shows quantitative experimental results on the impact of the normalization method and convolution kernel size used in the Hybrid Atrous Convolution (HAC) module on model performance. The data in the table represents the convolution kernel size used. Table 5 shows the impact of different configurations on model performance in the Ls-VSS module.
[0186] Table 4. Comparison of results of different parameters in HAC
[0187]
[0188] Table 5. Comparison of different parameter results in Ls-VSS module
[0189]
[0190] Referring to Tables 4 and 5 above, it can be seen from the ablation experiments that the HAC and Ls-VSS module parameters used by SVM-UNet are optimal and can achieve the best performance.
[0191] This embodiment introduces a hybrid dilated convolution module into the image segmentation model, processing feature maps through convolutions with different dilation rates to extract multi-scale detail information. This module is stacked between the encoder and decoder to preserve subtle features in the feature maps, significantly improving the accuracy of gland segmentation. Finally, a local feature acquisition branch is introduced to compensate for the small-scale feature associations lost during linear scanning, enhancing the model's perception of local details. This improvement significantly improves the model's ability to process details, thereby enhancing the accuracy of pathological image analysis.
[0192] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, which stores a pathological image colon gland segmentation program. When the pathological image colon gland segmentation program is executed by a processor, the steps of the pathological image colon gland segmentation method described above are implemented.
[0193] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0194] The computer-readable storage medium may be included in the pathological image colon gland segmentation device; or may exist independently without being assembled into the pathological image colon gland segmentation device.
[0195] In addition, an embodiment of the present invention further provides a computer program product, including a pathological image colon gland segmentation program, which implements the steps of the pathological image colon gland segmentation method described above when executed by a processor.
[0196] The specific implementation of the computer program product of the present invention is basically the same as the embodiments of the above-mentioned method for segmenting colon glands in pathological images, and will not be repeated here.
[0197] Reference Figure 8 , Figure 8 This is a structural block diagram of an embodiment of a device for segmenting colon glands in pathological images according to the present invention.
[0198] like Figure 8 As shown, the pathological image colon gland segmentation device proposed in the embodiment of the present invention includes:
[0199] An image processing module 10 is used to pre-process the original pathological image to obtain candidate image samples;
[0200] a multi-branch feature extraction module 20, configured to extract features from the candidate image sample based on the first processing branch and the second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map;
[0201] A global feature extraction module 30 is configured to perform feature extraction on the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information;
[0202] A local feature extraction module 40 is configured to perform local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map;
[0203] A feature fusion module 50 is configured to perform feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature;
[0204] The feature decoding module 60 is used to decode the target fusion feature and project the decoding result to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
[0205] This embodiment obtains candidate image samples by preprocessing the original pathological image; performs feature extraction on the candidate image samples based on the first processing branch and the second processing branch respectively to obtain a first candidate feature map and a second candidate feature map; performs feature extraction on the second candidate feature map along multiple directions, and aggregates the feature extraction results of each direction to obtain global feature information; performs local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregates the local feature information with the global feature information to obtain a second target feature map; performs feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature; decodes the target fusion feature, and decodes the decoded feature. The result is projected to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image; since this embodiment extracts features of the candidate image based on two processing branches, and extracts the global feature information and local feature information of the second candidate feature map based on the second processing branch, the global and local feature representations are collaboratively optimized, thereby enhancing the multi-scale perception ability of the glandular structure and improving the segmentation accuracy. The first candidate feature map and the second target feature map are feature fused, thereby compensating for the problem of small-scale feature association relationship lost in the linear scanning process of a single branch, enhancing the global dependence of the image and the perception of local details, significantly improving the processing ability of image details, and thus improving the accuracy of colon gland segmentation in pathological images.
[0206] The pathological image colon gland segmentation device provided in this application utilizes the pathological image colon gland segmentation method described in the aforementioned embodiment, thereby resolving the technical problem of pathological image colon gland segmentation. Compared to the prior art, the pathological image colon gland segmentation device provided in this application achieves the same beneficial effects as the pathological image colon gland segmentation method described in the aforementioned embodiment. Other technical features of the pathological image colon gland segmentation device are the same as those disclosed in the aforementioned embodiment and are not further detailed here.
[0207] It should be understood that the above is only an example and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any limitation on this.
[0208] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of it according to actual needs to achieve the purpose of the embodiment scheme, and no limitation is made here.
[0209] In addition, for technical details not fully described in this embodiment, reference can be made to the colon gland segmentation method for pathological images provided in any embodiment of the present invention, and will not be repeated here.
[0210] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0211] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0212] Through the above description of the embodiments, those skilled in the art will clearly understand that the above-mentioned embodiments and methods can be implemented by means of software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, a magnetic disk, or an optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0213] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for segmenting colon glands in pathological images, characterized in that: The pathological image colon gland segmentation method comprises: Preprocess the original pathological image to obtain candidate image samples; Performing feature extraction on the candidate image sample based on the first processing branch and the second processing branch to obtain a first candidate feature map and a second candidate feature map, wherein the second processing branch performs feature screening using a pre-built CSS2D module, wherein the CSS2D module is composed of an SS2D branch and a local space module; Calling the CSS2D module to perform feature extraction on the second candidate feature map along multiple directions, and aggregating the feature extraction results in each direction to obtain global feature information; Calling the local space module in the CSS2D module to perform local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregating the local feature information with the global feature information to obtain a second target feature map; Perform feature fusion on the first candidate feature map and the second target feature map to obtain target fusion features; The target fusion feature is decoded, and the decoding result is projected to the same dimension as the original pathological image to obtain a colon gland segmentation result of the pathological image.
2. The colon gland segmentation method of pathological image according to claim 1, characterized in that: The preprocessing of the original pathological image to obtain candidate image samples includes: Perform denoising on the original pathological image; Performing staining normalization on the original pathological image after denoising to obtain a staining normalized pathological image; performing data enhancement processing on the stained normalized pathology image, and generating an initial image dataset based on the data-enhanced stained normalized pathology image, wherein the initial image dataset includes a plurality of initial pathology image samples; Perform image feature serialization processing on the initial image data set to obtain candidate image samples.
3. The colon gland segmentation method of pathological image according to claim 2, characterized in that: The extracting features of the candidate image samples based on the first processing branch and the second processing branch to obtain a first candidate feature map and a second candidate feature map includes: Based on the first processing branch, feature extraction is performed on the candidate image sample through a linear layer and an activation function to obtain a first candidate feature map. : in, represents the first candidate feature map, represents a candidate image sample, represents the activation function, represents the weight matrix, represents the bias vector; Based on the second processing branch, feature extraction is performed on the candidate image sample through a linear layer, a depth-separable convolution layer and an activation function to obtain a second candidate feature map. : in, represents the second candidate feature map, represents the feature map that has not undergone depth-wise separable convolution operation, represents the weight matrix, represents the bias vector, Represents a depthwise separable convolution operation.
4. The colon gland segmentation method of pathological image according to claim 3, characterized in that: The step of extracting features from the second candidate feature map along multiple directions and aggregating the feature extraction results in each direction to obtain global feature information includes: Expanding the second candidate feature map along multiple directions to obtain one-dimensional features in multiple directions; The one-dimensional features are input to multiple linear layers, and the hidden state is updated based on the learnable matrix parameters output by the multiple linear layers: in, Represent the learnable matrix parameters of the linear layer output, Represent the discretized learnable matrix parameters, represents the derivative of the hidden state at the current moment, represents the hidden state at the previous moment, Represents the two-dimensional features of the current input, represents the identity matrix, represents the initial matrix; The global feature information is obtained based on the updated hidden state, the one-dimensional features, and the output learnable matrix parameters of each linear layer: in, represents the learnable matrix parameters of the linear layer output, Represents the extracted global feature information; The global features obtained by global modeling of the multiple directional one-dimensional features are aggregated to obtain two-dimensional features.
5. The colon gland segmentation method of pathological image according to any one of claims 1 to 4, characterized in that: The decoding of the target fusion feature and projecting the decoding result to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image includes: Decoding the target fusion feature and projecting the decoding result to the same dimension as the original pathological image to obtain an initial segmentation result; Labeling each connected region in the initial segmentation result to obtain a plurality of labeled regions; Filtering a target area from the annotated areas based on the area of each annotated area, and removing the annotated areas other than the target area from the initial segmentation result to obtain a candidate segmentation result; The candidate segmentation results are filtered, and the filtered candidate segmentation results are void-filled to obtain a colon gland segmentation result of a pathological image.
6. The colon gland segmentation method of pathological image according to any one of claims 1 to 4, characterized in that: After preprocessing the original pathological image to obtain candidate image samples, the method further includes: Inputting the candidate image sample into an image segmentation model to perform pathological image colon gland segmentation to obtain a pathological image colon gland segmentation result; The image segmentation model includes an image block embedding module, multiple encoders, multiple decoders corresponding to the multiple encoders, and a hybrid void convolution module, wherein the hybrid void convolution module is connected between the encoder and the decoder; The image block embedding module is used to perform image feature serialization and layer normalization processing to obtain candidate image samples; The encoder is configured to perform feature extraction on the candidate image sample based on the first processing branch and the second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map; The encoder is further configured to perform feature extraction on the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information; The encoder is further configured to perform local feature extraction on the second candidate feature map through a convolution operation to obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map; The encoder is further configured to perform feature fusion on the first candidate feature map and the second target feature map to obtain a target fusion feature; The hybrid atrous convolution module is used to perform multi-scale feature perception on the target fusion features output by the encoder, obtain multi-scale perception features, and input the multi-scale perception features into the decoder for decoding; The decoder is used to decode the target fusion features output by the encoder and / or the multi-scale perceptual features output by the hybrid void convolution module, and project the decoding results to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
7. A pathological image colon gland segmentation device, characterized in that: The pathological image colon gland segmentation device comprises: An image processing module is used to preprocess the original pathological image to obtain candidate image samples; a multi-branch feature extraction module, configured to extract features from the candidate image samples based on a first processing branch and a second processing branch, respectively, to obtain a first candidate feature map and a second candidate feature map, wherein the second processing branch performs feature screening using a pre-built CSS2D module, wherein the CSS2D module is composed of an SS2D branch and a local space module; A global feature extraction module, configured to call the CSS2D module to perform feature extraction on the second candidate feature map along multiple directions, and aggregate the feature extraction results in each direction to obtain global feature information; a local feature extraction module, configured to call the local space module in the CSS2D module to perform local feature extraction on the second candidate feature map through a convolution operation, obtain local feature information, and aggregate the local feature information with the global feature information to obtain a second target feature map; A feature fusion module is used to fuse the first candidate feature map with the second target feature map to obtain a target fusion feature; The feature decoding module is used to decode the target fusion feature and project the decoding result to the same dimension as the original pathological image to obtain the colon gland segmentation result of the pathological image.
8. A pathological image colon gland segmentation device, characterized in that: The pathological image colon gland segmentation device includes: a memory, a processor, and a pathological image colon gland segmentation program stored in the memory and executable on the processor, wherein the pathological image colon gland segmentation program is configured to implement the pathological image colon gland segmentation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a pathological image colon gland segmentation program, and when the pathological image colon gland segmentation program is executed by a processor, the pathological image colon gland segmentation method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a pathological image colon gland segmentation program, which implements the steps of the pathological image colon gland segmentation method according to any one of claims 1 to 6 when executed by a processor.
Citation Information
Patent Citations
Head and neck endangered organ segmentation method based on anatomical priori knowledge
CN112419338A
Processing method, device and processing equipment for hepatic fibrosis staging prediction model
CN118096675A