Transformer-based segmentation method and system for cancerous tissue in cervical cancer pathological images

By introducing multi-feature Transformer units and improved loss function in DeepLabV3+ network, the problem of low accuracy of tumor tissue and edge segmentation in cervical cancer pathological images is solved, and higher segmentation accuracy and diagnostic efficiency are achieved.

CN119251250BActive Publication Date: 2025-03-25HUAQIAO UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411780066.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-25
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The prior art When segmenting tumor tissue and edges in cervical cancer pathological images, the accuracy rate is low, and oversegment and missegment are prone to problems.

Method used

Using the Transformer-based cervical cancer pathological image segmentation method, by adding multi-feature Transformer units to the DeepLabV3+ network, semantic information at different scales is extracted, and loss function is improved to improve the network's ability to extract tumor region and edge features.

Benefits of technology

It significantly improves the accuracy of tumor and edge segmentation in cervical cancer pathological images, reduces missegment and oversegment, and improves the efficiency and accuracy of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251250B_ABST
    Figure CN119251250B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses a method and system for segmenting cancerous tissue in cervical cancer pathology images based on Transformer, the method comprising: collecting cervical cancer pathology images and annotating them to obtain a cervical cancer pathology image dataset; using DeepLabV3+ as a backbone network to construct a cervical cancer pathology image segmentation network, wherein a multi-feature Transformer unit is added to the encoder to extract semantic information of different scales and reduce redundancy in global attention calculation; using the cervical cancer pathology image dataset to train the cervical cancer pathology image segmentation network; using the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image. The present invention has a high accuracy rate and a fast running speed when segmenting cervical cancer pathology images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a Transformer-based method and system for segmenting cancerous tissue in cervical cancer pathological images. Background Art

[0002] Traditional pathological diagnosis is usually performed by evaluating the slices under a microscope. However, this process is often cumbersome and time-consuming, and relies on the accumulation of doctors' experience and clinical prior knowledge. Studies have shown that the misdiagnosis rate of clinical diagnosis based on pathological images is between 10% and 30%, and the diagnostic accuracy rate between doctors with different qualifications varies by up to 30%, with significant differences between different medical institutions. In addition, misdiagnosis and missed diagnosis may occur due to long observation time, long working hours and high pressure. Therefore, computer-aided technology for rapid segmentation of tumor areas can facilitate pathologists to make later diagnoses, improve the speed and accuracy of diagnosis, and reduce the workload of doctors. At present, there are few reports on computer-aided diagnosis of cervical cancer on pathological images. Computer-aided diagnosis of medical images generally involves image acquisition, preprocessing, image segmentation, region of interest detection, feature extraction, feature selection and diagnostic classification. Different medical image computer-aided diagnosis tasks may differ in specific steps. The use of computer-aided diagnosis methods not only overcomes the disadvantages of large inter-observer variability, but also improves the efficiency and accuracy of diagnosis. Image feature extraction methods and segmentation algorithms are the main components of auxiliary diagnosis systems and have a direct impact on their performance. Therefore, an auxiliary diagnosis method combining automatic segmentation with medical pre-screening is proposed to improve the accuracy of pathological diagnosis while reducing the workload of doctors and improving diagnostic efficiency. By analyzing the segmentation results, the morphology of pathological tissue can be visualized and morphometric indicators can be calculated, which is an important method for evaluating the malignancy of tumors.

[0003] The paper (Gao E, Jiang H, Zhou Z, Yang C, Chen M, Zhu W, Shi F, Chen X, Zheng J, Bian Y, Xiang D: Automatic multi-tissue segmentation in pancreatic pathological images with selected multi-scale attention network, Computers in Biology and Medicine (2022).) proposed a selective multi-scale attention network (SMANet) to segment tumor cells, blood vessels, nerves, islets and ducts in pancreatic pathological images. The paper (Wu J, Yuan T, Zeng J, GouF: A Medically Assisted Model for Precise Segmentation of Osteosarcoma Nucleion Pathological Images, IEEE Journal of Biomedical and Health Informatics (2023).) proposed ENMViT, which uses traditional data augmentation methods to alleviate the problem of insufficient data, and combines Transformer, CNN and spatial domain edge offset loss function to segment pathological images. The paper (Cytopathological Diagnosis of Non Small Cell Lung Cancer: Recent Advances Including Rapid On-Site Evaluation, Novel Endoscopic Techniques and Molecular Tests, Journal of Pulmonary & Respiratory Medicine (2013).) proposed a U-shaped colon cancer pathology image segmentation network, combining deep separability and morphological methods to reduce the number of model parameters.

[0004] With the development of technology, computer-aided diagnosis technology for cancer has gradually matured. However, when the existing technology is used to segment tumor tissue, the segmentation effect is poor due to the diverse morphology of tumor tissue and the complex and difficult extraction of edge features. It is prone to over-segmentation and mis-segmentation problems. Based on these challenges and problems, the present invention proposes corresponding methods to solve the problem of low accuracy of tumor tissue and edge segmentation. Summary of the invention

[0005] The purpose of the present invention is to solve the problems in the prior art.

[0006] The technical solution adopted by the present invention to solve the technical problem is: to provide a method for segmenting cancerous tissue in cervical cancer pathological images based on Transformer, comprising the following steps:

[0007] Collect and annotate cervical cancer pathology images to obtain a cervical cancer pathology image dataset;

[0008] DeepLabV3+ is used as the backbone network to build a cervical cancer pathology image segmentation network, in which a multi-feature Transformer unit is added to the encoder to extract semantic information at different scales;

[0009] Using a cervical cancer pathology image dataset to train the cervical cancer pathology image segmentation network;

[0010] Use the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image;

[0011] The cervical cancer pathology image segmentation network includes an encoder and a decoder;

[0012] In the encoder, multiple parallel convolutions are used to extract features from the input pathological image and compressed four times to obtain preliminary effective features. After input into the multi-feature Transformer unit, convolutions of different rates are used to connect and merge, and then 1x1 convolution is performed to compress the features, and finally multi-scale fusion features are output;

[0013] In the decoder, 1×1 convolution is used to adjust the number of channels of the initial effective feature layer that is compressed twice, and the original image features are obtained using the initial effective feature layer after adjusting the number of channels; the multi-scale fusion features output by the encoding part are upsampled four times using hollow convolution, stacked with the original image features, and then processed in sequence using two depthwise separable convolutions and one 1x1 convolution to obtain the final effective features, and finally resize is used for upsampling to obtain and output a segmentation result of the same size as the input pathological image.

[0014] Preferably, the multi-feature Transformer unit comprises:

[0015] DilateFormer module, which extracts multi-scale tumor feature maps based on multi-scale extended attention and sliding window hole attention;

[0016] The multi-feature channel attention module is used to integrate the global feature information in the multi-scale tumor feature map to obtain a feature map containing the global feature information of the tumor, the local edge of the tumor, and the detailed features of the tumor.

[0017] Preferably, the DilateFormer module extracts a multi-scale tumor feature map based on multi-scale extended attention and sliding window hole attention, comprising the following steps:

[0018] The image of preliminary effective features is sparsely sampled in a sliding window of size w×w, and then self-attention calculation is performed to extract the attention feature information to obtain the tumor feature map x, which is expressed as:

[0019] ;

[0020] Among them, Q, K and V represent the query matrix, key matrix and value matrix respectively, and each row of these three matrices represents a single query feature vector, key feature vector and value feature vector respectively; SWDA represents the sliding window hole attention feature extraction operation; r represents the expansion rate, which controls the sparsity of sparse sampling in the sliding window hole attention feature extraction operation;

[0021] The channels of the tumor feature map x are divided into different feature channels. Different void coefficients are used in different feature channels to sample the query feature values ​​in the sliding window, and self-attention calculation is performed to obtain feature information map groups of different scales, which are expressed as:

[0022] ;

[0023] Among them, h i represents the feature map of scale i, They represent the expansion rates as The characteristic value of the query, the characteristic value of the key, and the characteristic value of the value;

[0024] The feature information graph groups of different scales are fused, and the final multi-scale tumor feature graph is obtained through linear operations:

[0025] ;

[0026] Among them, X represents the multi-scale tumor feature map, Linear represents feature aggregation through linear operation, and Concat represents feature fusion.

[0027] Preferably, the sliding window hole attention feature extraction operation SWDA comprises the following steps:

[0028] Taking each coordinate (i, j) of the input image as the center, the corresponding query eigenvalue, key eigenvalue, value eigenvalue and expansion rate are obtained;

[0029] Calculate the pixel grayscale value of each coordinate of the output image, expressed as:

[0030] ;

[0031] Among them, x ij Represents the grayscale value of the output image at coordinate (i, j), q r represents the query feature value of the input image at (i, j), K r and V r They represent the feature values ​​of the query, key, and value when the expansion rate is r, respectively; Attention represents the self-attention operation, Softmax represents the activation function, and H and W represent the height and width of the output image, respectively.

[0032] Preferably, the execution process of the multi-feature channel attention module includes:

[0033] The different tumor information in the multi-scale tumor feature map X is merged into one type of feature information, which is expressed as:

[0034] ;

[0035] Among them, L represents the feature map obtained by fusing tumor features in the multi-scale tumor feature map, n1, n2 and n3 represent the attention feature weights respectively, L1, L2 and L3 represent the feature information of tumor edge information, tumor detail information and tumor global information in the multi-scale tumor feature map respectively;

[0036] Use global average pooling to calculate feature information The number of features is calculated and a compact feature representation is generated by applying a channel-degenerate convolutional layer to obtain a feature vector.

[0037] The feature vector is processed by three parallel convolutional layers to generate three feature descriptors v1, v2 and v3, and the feature map U containing the global feature information of the tumor, the local edge of the tumor and the detailed features of the tumor is calculated, which is expressed as:

[0038] .

[0039] Preferably, the cervical cancer pathology image dataset is used to train the cervical cancer pathology image segmentation network, and the loss function of the training process is:

[0040] ;

[0041] ;

[0042] ;

[0043] ;

[0044] Among them, Loss represents the loss function; L represents the cross entropy loss, x iRepresents the i-th element of the true label, y i represents the probability that the model predicts that x belongs to the i-th category; DL represents the Dice loss, represents the number of elements in the intersection of X and Y, |X| and |Y| represent the number of elements in X and Y respectively; represents the probability that the sample belongs to the positive class, represents the focus loss, represents the equilibrium variable, represents the modulation factor and γ represents the adjustable focusing parameter.

[0045] The present invention also provides a Transformer-based segmentation system for cancerous tissue in cervical cancer pathological images, comprising:

[0046] The acquisition module acquires and annotates cervical cancer pathology images to obtain a cervical cancer pathology image dataset;

[0047] The construction module uses DeepLabV3+ as the backbone network to build a cervical cancer pathology image segmentation network, in which multi-feature Transformer units are added to the encoder to extract semantic information at different scales and reduce redundancy in global attention calculation;

[0048] A training module, using a cervical cancer pathology image dataset to train the cervical cancer pathology image segmentation network;

[0049] The segmentation module uses the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image;

[0050] The cervical cancer pathology image segmentation network includes an encoder and a decoder;

[0051] In the encoder, multiple parallel convolutions are used to extract features from the input pathological image and compressed four times to obtain preliminary effective features. After input into the multi-feature Transformer unit, convolutions of different rates are used to connect and merge, and then 1x1 convolution is performed to compress the features, and finally multi-scale fusion features are output;

[0052] In the decoder, 1×1 convolution is used to adjust the number of channels of the initial effective feature layer that is compressed twice, and the original image features are obtained using the initial effective feature layer after adjusting the number of channels; the multi-scale fusion features output by the encoding part are upsampled four times using hollow convolution, stacked with the original image features, and then processed in sequence using two depthwise separable convolutions and one 1x1 convolution to obtain the final effective features, and finally resize is used for upsampling to obtain and output a segmentation result of the same size as the input pathological image.

[0053] The present invention has the following beneficial effects:

[0054] (1) The present invention proposes a segmentation network for cancerous tissue in cervical cancer pathological images, using a cervical cancer multi-feature Transformer module and an improved loss function to improve segmentation accuracy;

[0055] (2) The present invention designs a multi-feature Transformer module in the sampling process of the segmentation network, which integrates the global and local feature information of the tumor area in the image, and can significantly improve the feature learning and perception capabilities of the enhancement network;

[0056] (3) The present invention improves the loss function of the segmentation network, thereby improving the network's ability to extract tumor area and edge features, while also improving the accuracy of fusing multiple features, thereby improving the segmentation accuracy of tumor details and edges.

[0057] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments, but the present invention is not limited to the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A method step diagram of an embodiment of the present invention;

[0059] Figure 2 This is a schematic diagram of a network structure for segmenting cervical cancer pathology images according to an embodiment of the present invention;

[0060] Figure 3 A schematic diagram of a cervical cancer pathology image according to an embodiment of the present invention;

[0061] Figure 4 Schematic diagram of a multi-feature Transformer unit in an embodiment of the present invention;

[0062] Figure 5 A schematic diagram of a segmentation result obtained in an embodiment of the present invention;

[0063] Figure 6 4 is a system structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0064] See also Figure 1 FIG. 1 is a diagram showing steps of a method according to an embodiment of the present invention, comprising the following steps:

[0065] S101, collecting and annotating cervical cancer pathological images to obtain a cervical cancer pathological image dataset;

[0066] S102, using DeepLabV3+ as the backbone network to build a cervical cancer pathology image segmentation network, in which a multi-feature Transformer unit is added to the encoder to extract semantic information at different scales;

[0067] S103, training the cervical cancer pathology image segmentation network using a cervical cancer pathology image dataset;

[0068] S104, using the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image.

[0069] join Figure 2 As shown, it is a schematic diagram of the network structure of cervical cancer pathology image segmentation according to an embodiment of the present invention. DeepLabV3+ is used as the backbone network for segmentation, which is composed of an encoder and a decoder. In the encoder, parallel convolution is used to extract the features of the initial effective feature layer compressed four times, and convolutions of different rates are used to connect and merge; if the output step size is 16, the rate is (6, 12, 18), and if the output step size is 8, the rate is doubled, using the rate (12, 24, 36). Then 1x1 convolution is performed to compress the features. In the decoder, 1×1 convolution is used to adjust the number of channels of the initial effective feature layer compressed twice, and then the sampling results of the output of the encoding part are stacked using hollow convolution, and processed using two depth-separable convolutions to obtain the final effective feature layer, and 1x1 convolution is used to adjust the channels. Finally, resize is used for upsampling so that the size of the final output layer is the same as the input image.

[0070] See also Figure 3 As shown in the figure, due to the problems of tissue adhesion and blurred boundaries in panoramic digital pathology images, the sample size of the entity part is small, which will lead to loss of details. Therefore, the multi-feature Transformer module is introduced to increase the feature extraction capability of the network. In order to effectively extract semantic information of different scales, it can reduce the redundancy in the global attention calculation and improve the accuracy of tumor tissue edge and detail feature segmentation.

[0071] See also Figure 4 As shown, a schematic diagram of a multi-feature Transformer unit of an embodiment of the present invention includes a DilateFormer module and a multi-feature channel attention module.

[0072] DilateFormer uses the multi-scale extended attention (MSDA) module to efficiently capture semantic information in multi-scale features and reduce the redundancy of the self-attention mechanism. It extracts attention feature information by sparsely sampling the query (q), key (k), value (v) feature values ​​and dilation rate (r) centered on the image coordinate (i, j) in a sliding window of size w×w, and then performs self-attention calculation to obtain the tumor feature map x:

[0073] ;

[0074] Among them, x represents the tumor feature map obtained by the sliding window hole attention feature extraction operation, Q, K and V represent the query matrix, key matrix and value matrix respectively, each row of these three matrices represents a single query, key and value feature vector, SWDA represents the sliding window hole attention feature extraction operation, and r represents the expansion rate, which controls the sparsity of sparse sampling in the sliding window hole attention feature extraction operation. Among them, the sliding window hole attention feature extraction operation can be expressed as:

[0075] ;

[0076] Among them, x ij represents the gray value of the tumor feature map x at (i, j), q r , K r and V r They represent the feature values ​​of query, key and value respectively when the expansion rate is r, Attention represents the self-attention operation, Softmax represents the activation function, H and W represent the height and width of the tumor feature map x respectively.

[0077] The channels of the tumor feature map x are divided into different feature channels. Different void coefficients are used in different feature channels to sample the query feature values ​​in the sliding window, and self-attention calculation is performed to obtain feature information map groups of different scales:

[0078] ;

[0079] Among them, h i represents the feature map obtained by sliding window hole attention feature extraction operation when the scale is i, , K i and V i They represent the feature values ​​of query, key and value respectively when the expansion rate is r.

[0080] Then, the feature information graph groups calculated from different feature channels are fused, and the final multi-scale tumor feature graph is obtained through linear operations:

[0081] ;

[0082] Where X represents the multi-scale tumor feature map.

[0083] However, relying solely on local feature operations will ignore global feature information, resulting in mis-segmentation when segmenting tumor features. Therefore, a multi-channel attention mechanism is proposed to integrate global feature information and generate global feature descriptors by combining information from different categories to dynamically adjust the receptive field. These global feature descriptors are then used to recalibrate feature maps from various data streams before fusing the features. The execution process of the multi-feature channel attention module includes the following steps:

[0084] First, the tumor information with different characteristics is merged into one type of characteristic information, which is expressed as:

[0085] ;

[0086] Wherein, L represents the feature map obtained by fusing tumor features in the multi-scale tumor feature map, n1, n2 and n3 represent the attention feature weights respectively, and in this embodiment, n1, n2 and n3 are set to 0.3, 0.5 and 0.2 respectively. L1, L2 and L3 represent the feature information of the multi-scale tumor feature map containing tumor edge information, tumor detail information and tumor global information respectively.

[0087] Then, global average pooling (GAP) is used to calculate the number of feature information L, and a compact feature representation is generated by applying a channel-degenerate convolutional layer to obtain a feature vector.

[0088] Finally, the feature vector is processed by three parallel convolutional layers to generate three feature descriptors v1, v2 and v3, and the feature map U containing the global feature information of the tumor, the local edge of the tumor and the detailed features of the tumor is calculated, which is expressed as:

[0089] ;

[0090] Among them, U is a feature map containing the global feature information of the tumor and the local edge and detail features of the tumor.

[0091] Specifically, during the training process of S103, the loss function used is:

[0092] ;

[0093] ;

[0094] ;

[0095] ;

[0096] Among them, Loss represents the loss function; L represents the cross entropy loss, x i Represents the i-th element of the true label, y irepresents the probability that the model predicts that x belongs to the i-th category; DL represents the Dice loss, represents the number of elements in the intersection of X and Y, |X| and |Y| represent the number of elements in X and Y respectively; represents the probability that the sample belongs to the positive class, represents the focus loss, represents the equilibrium variable, represents the modulation factor and γ represents the adjustable focusing parameter.

[0097] Specifically, the S104 uses the improved DeepLabV3+ segmentation model to segment the tumor and background parts in the cervical cancer pathology image. In this embodiment, the software environment of the segmentation method is built using Python 3.9 programming language, CUDA11.2 and pytorch1.8.0. The cervical cancer pathology image segmentation network of the embodiment of the present invention is trained on an input image of size 512x512, with a batch size of 32 and a total number of generations of 160; the initial learning rate is set to 0.001, and the Adam optimizer is used for training; the data set has a total of 1432 images, which are divided into training set, test set and validation set in a ratio of 8:1:1, and data enhancement techniques including rotation and flip transformations are used. The final segmentation result of this embodiment is shown in the figure. Figure 5 As shown in the figure, the average values ​​of segmentation accuracy, MIoU precision and Dice are 0.952, 0.927 and 0.931 respectively, which have high accuracy and precision.

[0098] For details, see Figure 6 FIG. 1 is a system structure diagram of an embodiment of the present invention, including:

[0099] An acquisition module 601 acquires and annotates cervical cancer pathology images to obtain a cervical cancer pathology image dataset;

[0100] Building module 602, using DeepLabV3+ as the backbone network to build a cervical cancer pathology image segmentation network, wherein a multi-feature Transformer unit is added to the encoder to extract semantic information of different scales;

[0101] A training module 603 is used to train the cervical cancer pathology image segmentation network using a cervical cancer pathology image dataset;

[0102] The segmentation module 604 uses the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image.

[0103] The present invention has higher accuracy and faster running speed when segmenting cervical cancer pathological images.

[0104] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for segmenting cancerous tissue in cervical cancer pathological images based on Transformer, characterized in that: The steps include: Collect and annotate cervical cancer pathology images to obtain a cervical cancer pathology image dataset; DeepLabV3+ is used as the backbone network to build a cervical cancer pathology image segmentation network, in which a multi-feature Transformer unit is added to the encoder to extract semantic information at different scales; Using a cervical cancer pathology image dataset to train the cervical cancer pathology image segmentation network; Use the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image; The cervical cancer pathology image segmentation network includes an encoder and a decoder; In the encoder, multiple parallel convolutions are used to extract features from the input pathological image and compressed four times to obtain preliminary effective features. After input into the multi-feature Transformer unit, convolutions of different rates are used to connect and merge, and then 1x1 convolution is performed to compress the features, and finally multi-scale fusion features are output; In the decoder, 1×1 convolution is used to adjust the number of channels of the initial effective feature layer compressed twice, and the original image features are obtained using the initial effective feature layer after adjusting the number of channels; the multi-scale fusion features output by the encoding part are upsampled four times using hollow convolution, and then stacked with the original image features, and then processed using two depthwise separable convolutions and a 1x1 convolution in sequence to obtain the final effective features, and finally resize is used for upsampling to obtain and output a segmentation result of the same size as the input pathological image; The multi-feature Transformer unit includes: DilateFormer module, which extracts multi-scale tumor feature maps based on multi-scale extended attention and sliding window hole attention; The multi-feature channel attention module is used to integrate the global feature information in the multi-scale tumor feature map to obtain a feature map containing the global feature information of the tumor, the local edge of the tumor, and the detailed features of the tumor; The DilateFormer module extracts a multi-scale tumor feature map based on multi-scale extended attention and sliding window hole attention, including the following steps: The image of preliminary effective features is sparsely sampled in a sliding window of size w×w, and then self-attention calculation is performed to extract the attention feature information to obtain the tumor feature map x, which is expressed as: x = SWDA(Q, K, V, r); Among them, Q, K and V represent the query matrix, key matrix and value matrix respectively, and each row of these three matrices represents a single query feature vector, key feature vector and value feature vector respectively; SWDA represents the sliding window hole attention feature extraction operation; r represents the expansion rate, which controls the sparsity of sparse sampling in the sliding window hole attention feature extraction operation; The channels of the tumor feature map x are divided into different feature channels. Different void coefficients are used in different feature channels to sample the query feature values ​​in the sliding window, and self-attention calculation is performed to obtain feature information map groups of different scales, which are expressed as: h i =SWDA(Q i ,K i ,V i ,r i ),1≤i≤n; Among them, h i represents the feature map of scale i, Q i , K i and V i Respectively represent the expansion rate value r i The characteristic value of the query, the characteristic value of the key, and the characteristic value of the value; The feature information graph groups of different scales are fused, and the final multi-scale tumor feature graph is obtained through linear operations: X=Linear(Concat[h1,...,h n ]); Among them, X represents the multi-scale tumor feature map, Linear represents feature aggregation through linear operation, and Concat represents feature fusion.

2. The method for segmenting cancerous tissue in cervical cancer pathological images based on Transformer according to claim 1, characterized in that: The sliding window hole attention feature extraction operation SWDA comprises the following steps: Taking each coordinate (i, j) of the input image as the center, the corresponding query eigenvalue, key eigenvalue, value eigenvalue and expansion rate are obtained; Calculate the pixel grayscale value of each coordinate of the output image, expressed as: Among them, x ij Represents the grayscale value of the output image at coordinate (i, j), q r represents the query feature value of the input image at (i, j), K r and V r They represent the feature values ​​of the query, key, and value when the expansion rate is r, respectively; Attention represents the self-attention operation, Softmax represents the activation function, and H and W represent the height and width of the output image, respectively.

3. The method for segmenting cancerous tissue in cervical cancer pathological images based on Transformer according to claim 2, characterized in that: The execution process of the multi-feature channel attention module includes: The different tumor information in the multi-scale tumor feature map X is merged into one type of feature information, which is expressed as: L = n1 × L1 + n2 × L2 + n3 × L3; Among them, L represents the feature map obtained by fusing tumor features in the multi-scale tumor feature map, n1, n2 and n3 represent the attention feature weights respectively, L1, L2 and L3 represent the feature information of tumor edge information, tumor detail information and tumor global information in the multi-scale tumor feature map respectively; Use global average pooling to calculate the number of feature information L, and generate a compact feature representation by applying a channel-degenerate convolutional layer to obtain a feature vector; The feature vector is processed by three parallel convolutional layers to generate three feature descriptors v1, v2 and v3, and the feature map U containing the global feature information of the tumor, the local edge of the tumor and the detailed features of the tumor is calculated, which is expressed as: U=v1×L1+v2×L2+v3×L3.

4. The method for segmenting cancerous tissue in cervical cancer pathological images based on Transformer according to claim 1, characterized in that: The cervical cancer pathology image dataset is used to train the cervical cancer pathology image segmentation network, and the loss function of the training process is: FL(p t )=-a t (1-p t ) γ log(p t ); Among them, Loss represents the loss function; L represents the cross entropy loss, x i Represents the i-th element of the true label, y i represents the probability that the model predicts that x belongs to the i-th category; DL represents the Dice loss, |Y∩X| represents the number of elements that intersect X and Y, |X| and |Y| represent the number of elements in X and Y respectively; p t Indicates the probability that the sample belongs to the positive class, FL(p t ) represents the focus loss, α t represents the equilibrium variable, (1-p t ) represents the modulation factor, and γ represents the adjustable focusing parameter.

5. A Transformer-based segmentation system for cancerous tissue in cervical cancer pathological images, characterized in that: include: The acquisition module acquires and annotates cervical cancer pathology images to obtain a cervical cancer pathology image dataset; The construction module uses DeepLabV3+ as the backbone network to build a cervical cancer pathology image segmentation network, in which multi-feature Transformer units are added to the encoder to extract semantic information at different scales and reduce redundancy in global attention calculation; A training module, using a cervical cancer pathology image dataset to train the cervical cancer pathology image segmentation network; The segmentation module uses the trained cervical cancer pathology image segmentation network to segment the tumor and background parts in the cervical cancer pathology image; The cervical cancer pathology image segmentation network includes an encoder and a decoder; In the encoder, multiple parallel convolutions are used to extract features from the input pathological image and compressed four times to obtain preliminary effective features. After input into the multi-feature Transformer unit, convolutions of different rates are used to connect and merge, and then 1x1 convolution is performed to compress the features, and finally multi-scale fusion features are output; In the decoder, 1×1 convolution is used to adjust the number of channels of the initial effective feature layer compressed twice, and the original image features are obtained using the initial effective feature layer after adjusting the number of channels; the multi-scale fusion features output by the encoding part are upsampled four times using hollow convolution, and then stacked with the original image features, and then processed using two depthwise separable convolutions and a 1x1 convolution in sequence to obtain the final effective features, and finally resize is used for upsampling to obtain and output a segmentation result of the same size as the input pathological image; The multi-feature Transformer unit includes: DilateFormer module, which extracts multi-scale tumor feature maps based on multi-scale extended attention and sliding window hole attention; The multi-feature channel attention module is used to integrate the global feature information in the multi-scale tumor feature map to obtain a feature map containing the global feature information of the tumor, the local edge of the tumor, and the detailed features of the tumor; The DilateFormer module extracts a multi-scale tumor feature map based on multi-scale extended attention and sliding window hole attention, including the following steps: The image of preliminary effective features is sparsely sampled in a sliding window of size w×w, and then self-attention calculation is performed to extract the attention feature information to obtain the tumor feature map x, which is expressed as: x = SWDA(Q, K, V, r); Among them, Q, K and V represent the query matrix, key matrix and value matrix respectively, and each row of these three matrices represents a single query feature vector, key feature vector and value feature vector respectively; SWDA represents the sliding window hole attention feature extraction operation; r represents the expansion rate, which controls the sparsity of sparse sampling in the sliding window hole attention feature extraction operation; The channels of the tumor feature map x are divided into different feature channels. Different void coefficients are used in different feature channels to sample the query feature values ​​in the sliding window, and self-attention calculation is performed to obtain feature information map groups of different scales, which are expressed as: h i =SWDA(Q i ,K i ,V i ,r i ),1≤i≤n; Among them, h i represents the feature map of scale i, Q i , K i and V i Respectively represent the expansion rate value r i The characteristic value of the query, the characteristic value of the key, and the characteristic value of the value; The feature information graph groups of different scales are fused, and the final multi-scale tumor feature graph is obtained through linear operations: X=Linear(Concat[h1,...,h n ]); Among them, X represents the multi-scale tumor feature map, Linear represents feature aggregation through linear operation, and Concat represents feature fusion.

Citation Information

Patent Citations

  • Cervical epithelial tissue pathological image recognition method based on global spatial perception network

    CN115035074A

  • Concrete bridge crack detection method based on improved DeepLabV3 +

    CN118333962A