A Keypoint-Guided Transformer-Based Segmentation and Classification Method and System for Multi-Histological Pathological Cell Nuclei Instances
By decoupling the segmentation and classification tasks using a keypoint-guided Transformer model (PointFormer), and leveraging the Attention Filter Enhancement (AFE) module to guide nucleus and edge segmentation, this approach addresses the shortcomings of existing technologies where segmentation performance relies on pixel grouping and insufficient global information capture, achieving more efficient nucleus segmentation and classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHENGZHOU UNIV
- Filing Date
- 2024-10-28
- Publication Date
- 2026-05-26
Smart Images

Figure CN119380335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image segmentation technology, and in particular to a method and system for segmenting and classifying multi-histopathological cell nucleus instances based on key-point guided Transformer. Background Technology
[0002] Cancer poses a severe threat to global public health, with its mortality rate second only to cardiovascular disease. Biopsy-based histopathological examination is currently the gold standard for cancer diagnosis in clinical practice. Analyzing the morphological characteristics and spatial distribution patterns of cell nuclei can assist pathologists in developing comprehensive treatment plans and accurately predicting patient prognosis. However, comprehensive cellular-level analysis requires a significant time investment and is subject to substantial inter-observer and intra-observer variability. With the advent of digital whole-slide images (WSI), computer-aided technologies have demonstrated enormous potential in automated cell nucleus analysis, with convolutional neural networks (CNNs) dominating due to their superior generalization and simplicity. Furthermore, most methods employ multi-task learning, simultaneously learning cell nucleus and edge information through multiple decoders to improve segmentation performance.
[0003] Existing CNN-based nucleus segmentation and classification (NSC) methods can be divided into two categories: bottom-up and top-down approaches. Bottom-up methods first generate a high-resolution semantic segmentation mask, then group pixels into an arbitrary number of target instances. Due to the reliance on complex post-processing techniques for pixel grouping to extract target instances, their performance is highly dependent on the segmentation results and the grouping method. Although some studies directly predict nucleus outlines and show good results, their advantages are limited because they ignore the correlations and prediction consistency between learning branches. In contrast, top-down methods (such as Mask-RCNN) first locate class-independent target objects within prior bounding boxes, generating candidate regions, and then segment and classify target instances within regions of interest. While Mask-RCNN can separate overlapping nuclei well, it can only segment instances within the bounding box at a very low resolution (i.e., 28×28). Inaccurate bounding box predictions and instances smaller than the actual size lead to poor segmentation results. Furthermore, the inherent convolutional operations of CNNs cannot effectively capture global spatial information or the correlations between nuclei. Clinical practice has shown that long-range correlations exist in actual cell nucleus segmentation tasks, which provides key evidence for experts in the field to accurately segment cell nuclei. Summary of the Invention
[0004] The purpose of this invention is to address the aforementioned problems in the existing technology by proposing a multi-histopathological cell nucleus instance segmentation and classification method and system based on Keypoint-guided Transformer (PointFormer). This method treats the detection and classification of each nucleus as a semantic keypoint estimation problem to determine the center point of each nucleus. By decoupling the segmentation and classification tasks and leveraging the advantage of Transformer in modeling long-distance dependencies, it can benefit from both category-aware detection and category-independent segmentation, thereby improving the segmentation and classification performance of clustered overlapping nuclei.
[0005] To achieve the above objectives, the technical solution adopted is:
[0006] A multi-histological pathological cell nucleus instance segmentation and classification method based on keypoint-guided Transformer includes the following steps:
[0007] Step 1: Preprocess the pathological images;
[0008] Step 2: Input the preprocessed pathological image into PointFormer to generate three output predictions: key point heatmap, kernel prediction, and edge prediction.
[0009] Step 3: Locate the center point of the cell nucleus by filtering out local peaks in the key point heatmap and generate a center point map;
[0010] Step 4: Integrate kernel prediction and edge prediction to obtain a class-independent segmentation prediction mask;
[0011] Step 5: Map the category of the corresponding center point in the center point map to the category-independent segmentation prediction mask to generate the final cell nucleus instance segmentation classification mask.
[0012] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on key point guided Transformer of the present invention, in step 1, the preprocessing of the pathological image is to close the real edge labels.
[0013] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on key point guided Transformer of the present invention, the PointFormer is further composed of an encoder and three decoders, and an attention filtering enhancement module is embedded between the decoders.
[0014] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer of the present invention, the core component of the encoder is a multi-local perception Transformer module MLPFormer composed of two Transformer modules. The two Transformer modules are a local feature extraction module composed of parallel local window attention (LWA) and depthwise separable convolution, and a global feature extraction module composed of parallel local vertical attention (LVA) and local horizontal attention (LHA). The specific calculation process is as follows:
[0015] a. Given an input feature map X, divide the feature map X into multiple local regions X = [X...]. 1 ,X 2 ,…,X n ], where n represents the number of local regions;
[0016] b. Calculate multi-head attention within the segmented local regions to obtain the output Z of the i-th local region. i ;
[0017] c. Concatenate the outputs of n local regions to obtain the local attention output LA(·);
[0018] LA(X)=Concat(Z 1 Z 2 ,…,Z n )
[0019] d. The calculation formula for the entire MLPFormer is as follows:
[0020]
[0021]
[0022] in, This represents the input to LWA. This represents the input to DWConv. This represents the input to LVA. Z represents the input to LHA. l and Z l+1 These represent the outputs of the two Transformer modules in MLPFormer, respectively. LWA(·), LVA(·), and LHA(·) are calculated in the same way as LA(·); LN(·) represents LayerNorm normalization, and FNN(·) represents a feedforward neural network.
[0023] According to the multi-histological pathological cell nuclear instance segmentation and classification method based on keypoint-guided Transformer of the present invention, the core components of the nuclear branch decoder and the edge branch decoder are cross MLPFormer, and the calculation method is consistent with MLPFormer except for the query vector Q; in the calculation of cross MLPFormer, the query vector Q is the refined Refined Q of the current branch Q and the Cross_Q from the keypoint estimation branch after being refined by the AFE module.
[0024] According to the key-point guided Transformer multi-histological pathological cell nucleus instance segmentation and classification method of the present invention, the core of the AFE module further includes channel attention and spatial attention, formally expressed as:
[0025]
[0026] Where Q comes from the kernel prediction branch or the edge prediction branch, Cross_Q comes from the keypoint estimation branch, and Att c and Att sp These represent channel attention and spatial attention, respectively.
[0027] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on keypoint-guided Transformer of the present invention, the core components of the keypoint branch decoder are consistent with the MLPFormer of the encoder; the goal of the keypoint branch decoder is to regress the low-resolution keypoint heatmap. The training process of the keypoint branch decoder is as follows:
[0028] a. Given an input image X with height H and width W and its corresponding ground truth heatmap Y, for each ground truth keypoint p of class c, calculate a low-resolution equivalent...
[0029] b. Using an unnormalized Gaussian kernel, all ground truth keypoints are rendered in the heatmap Y. The ground truth keypoint heatmap is shown in the following formula; where σ p This represents the standard deviation of the adaptive size of a target, where x and y represent the x and y coordinates of the true keypoints, respectively. and These represent the low-resolution equivalence of the x-coordinate and y-coordinate of the keypoint, respectively. xyc Represents a true keypoint heatmap; if two Gaussian distributions of the same category overlap, take the maximum value of the element-wise distribution;
[0030]
[0031] c. Keypoint estimation branch loss function L pt The definition is as follows:
[0032]
[0033] in, This represents a predicted keypoint heatmap, where α and β are hyperparameters of the focal loss, and N... k This represents the number of key points in image X.
[0034] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer of the present invention, step 3 further includes: detecting all key points with a response value greater than or equal to 8 neighborhoods, and filtering out low-confidence predictions using a confidence threshold of 0.4.
[0035] According to the multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer of the present invention, step 4 further includes: removing noise from the predicted cell nucleus mask; refining the boundaries on the predicted edge mask; aggregating the results of the nucleus prediction branch and the edge prediction branch, and constructing a class-independent segmentation prediction mask by performing an expansion operation;
[0036] Step 5 specifically includes: for each cell nucleus in the category-independent segmentation prediction mask, calculating the distance between the centroid of the cell nucleus and the center point of the corresponding region in the center point map, and taking the type represented by the nearest center point as the category of the cell nucleus.
[0037] Furthermore, the present invention also provides a multi-histological pathological cell nucleus instance segmentation and classification system based on key-point guided Transformer, comprising:
[0038] The preprocessing module is used to preprocess pathological images;
[0039] The PointFormer module is used to input preprocessed pathological images into PointFormer and generate three output predictions: key point heatmap, kernel prediction, and edge prediction.
[0040] The center point map generation module is used to locate the center point of the cell nucleus by filtering local peaks in the key point heatmap and generating a center point map.
[0041] An integration module is used to integrate kernel prediction and edge prediction to obtain a class-independent segmentation prediction mask;
[0042] The segmentation classification mask generation module is used to map the category of the corresponding center point in the center point map to the category-independent segmentation prediction mask, and generate the final cell nucleus instance segmentation classification mask.
[0043] The beneficial effects achieved by adopting the above technical solution are:
[0044] 1. To address the issue that bottom-up methods are sensitive to pixel grouping techniques, this invention treats the detection and classification of each nucleus as a semantic keypoint estimation problem to determine the center point of each nucleus, thereby efficiently detecting and classifying cell nuclei without complex pixel grouping post-processing.
[0045] 2. To address the issue that multi-task learning methods neglect the correlation and prediction consistency between branches, this invention proposes an attention-guided strategy based on Attention Filtering Enhancement (AFE) to share features of keypoint estimation, thereby guiding cell nucleus and edge segmentation and constraining prediction consistency between different branches.
[0046] 3. To address the problem that CNNs cannot effectively capture long-range correlations between cell nuclei, this invention introduces a Multi-LocalPerceptionTransformer (MLPFormer) module. By parallel computing of local horizontal and vertical attention, it improves the model's ability to model global dependencies, while maintaining a balance between high-resolution features and global dependencies.
[0047] This invention improves the segmentation and classification performance of clustered overlapping kernels by decoupling segmentation and classification tasks and leveraging the advantage of Transformer in modeling long-distance dependencies. This allows it to benefit from both category-aware detection and category-independent segmentation. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. The drawings are merely illustrative of some embodiments of the present invention and are not intended to limit the scope of the present invention to all embodiments.
[0049] Figure 1 This is a flowchart illustrating the multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer according to an embodiment of the present invention.
[0050] Figure 2 This is a framework diagram of the multi-histological pathological cell nucleus instance segmentation and classification method based on key point guided Transformer according to an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of the structure of the AFE module according to an embodiment of the present invention;
[0052] Figure 4This is a visualization of the results of the multi-histological pathological cell nucleus instance segmentation and classification method based on key point guided Transformer according to an embodiment of the present invention. Detailed Implementation
[0053] The exemplary solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art.
[0054] like Figure 1 As shown, this embodiment discloses a multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer, which includes the following steps:
[0055] Step S101: Preprocess the pathological images.
[0056] like Figure 2 As shown in (a), the PanNuke dataset is preprocessed. PanNuke is currently the largest public dataset for cell nucleus segmentation and classification, covering 19 different tissue types and 5 cell nucleus categories: neoplastic, inflammatory, connective tissue, dead cells and non-neoplastic epithelial cells. The preprocessing mainly targets the real edge labels in PanNuke for closure.
[0057] Step S102: Input the preprocessed pathological image into PointFormer to generate three output predictions, namely key point heatmap, kernel prediction and edge prediction.
[0058] Input the preprocessed pathological image, and use PointFormer to generate keypoint heatmaps, kernel predictions, and edge predictions, such as... Figure 2 As shown in (b), PointFormer consists of one encoder and three decoders, with an attention filtering enhancement module (AFE) embedded between the decoders to effectively pass the guidance signal from the keypoint estimation branch to the kernel prediction and edge prediction branches, thereby mitigating inconsistencies in multi-decoder prediction.
[0059] The core component of the encoder is the Multi-Local Perception Transformer (MLPFormer), which consists of two Transformer modules. The two Transformer modules are a local feature extraction module composed of parallel Local Window Attention (LWA) and depthwise separable convolutions, and a global feature extraction module composed of parallel Local Vertical Attention (LVA) and Local Horizontal Attention (LHA). The specific calculation process is as follows:
[0060] Step S1021: Given the input feature map Through two predefined parameters l w ,l h The feature map X is divided into multiple local regions X = [X]. 1 ,X 2 ,…,X n ], where n = (HW) / (l w ·l h ) indicates the number of local regions.
[0061] Step S1022: Calculate multi-head attention within the segmented local region, with the number of heads being n_head. The calculation formula is as follows:
[0062]
[0063] in, The size of each local region is represented by i = 1, 2, ..., n; h represents the number of heads in the multi-head attention mechanism, h = 1, 2, ..., n_head; Let d represent the projection matrices of the query vector, key vector, and value vector of the h-th header, respectively. k =C / h, Z represents the output after attention is calculated for the h-th head in the i-th local region. i Let W° represent the output of the i-th local region, and let W° represent the projection matrix of the output.
[0064] Step S1023: Concatenate the outputs of n local regions to obtain the local attention output LA(·).
[0065] LA(X)=Concat(Z 1 Z 2 ,…,Z n (4)
[0066] Step S1024: The calculation formula for the entire MLPFormer is as follows:
[0067]
[0068] in, This represents the input to LWA. This represents the input to DWConv. This represents the input to LVA. Z represents the input to LHA. l and Z l+1 These represent the outputs of the two Transformer modules in MLPFormer, respectively. LWA(·), LVA(·), and LHA(·) are calculated in the same way as LA(·); LN(·) represents LayerNorm normalization, and FNN(·) represents a feedforward neural network.
[0069] The core component of both the kernel branch decoder and the edge branch decoder is the cross-MLPFormer, which is calculated in the same way as the MLPFormer, except for the query vector Q. In the cross-MLPFormer calculation, the query vector Q is the refined version of the current branch Q and the Cross_Q from the keypoint estimation branch, refined by the AFE module.
[0070] The core of the AFE module includes channel attention and spatial attention, such as Figure 3 As shown, the formal expression is:
[0071]
[0072]
[0073] Where Q comes from the kernel prediction branch or the edge prediction branch, Cross_Q comes from the keypoint estimation branch, and Att c and Att sp These represent channel attention and spatial attention, respectively; MaxPool and AvgPool represent max pooling and average pooling, respectively. 7 ×7 This represents a convolution operation with a 7×7 kernel, σ represents the sigmoid function, and a shared MLP represents a multilayer perceptron with hidden layers and weights of .
[0074] The core components of the keypoint branch decoder are consistent with the encoder's MLPFormer; the goal of the keypoint branch decoder is to regress low-resolution keypoint heatmaps. The training process of the keypoint branch decoder is as follows:
[0075] Step a: Given an input image X with height H and width W and its corresponding ground truth heatmap Y, for each ground truth keypoint p∈R of class c...2 Calculate a low-resolution equivalent In this embodiment, c=5 represents the number of key point types, and R=4 represents the downsampling factor.
[0076] Step b: Using an unnormalized Gaussian kernel, render all ground truth keypoints in the heatmap Y. The expression for the ground truth keypoint heatmap is shown in Equation 13; where σ p represents the standard deviation of an adaptive target size; if two Gaussian distributions of the same category overlap, the maximum value is taken element-wise; x and y represent the x and y coordinates of the true keypoints, respectively. and These represent the low-resolution equivalence of the x-coordinate and y-coordinate of the keypoint, respectively. xyc A heatmap representing the true key points.
[0077]
[0078] Step c: Keypoint estimation branch loss function The training objective is defined as follows: penalty-reduced pixel-wise logistic regression with focal loss.
[0079]
[0080] in, This represents a predicted keypoint heatmap, where α and β are hyperparameters of the focal loss, and N... k The number of key points in image X is represented by α = 2 and β = 4 in this embodiment.
[0081] Step S103: Locate the center point of the cell nucleus by filtering local peaks in the key point heatmap and generate a center point map.
[0082] Specifically, all keypoints with a response value greater than or equal to 8 neighborhoods are detected, and low-confidence predictions are filtered out using a confidence threshold of 0.4.
[0083] Step S104: Using post-processing techniques such as denoising and boundary refinement, kernel prediction and edge prediction are integrated to obtain a class-independent segmentation prediction mask.
[0084] Specifically, noise (i.e., cell nucleus regions in the background or background regions in the cell nucleus) is removed from the predicted cell nucleus mask; a boundary thinning algorithm is applied to the predicted edge mask to reduce the thickness to 1 pixel; the results of the kernel prediction branch and the edge prediction branch are aggregated, and a dilation operation is performed using a 3×3 kernel to construct a class-independent segmentation prediction mask, such as... Figure 2 As shown in (c).
[0085] Step S105: Map the category of the corresponding center point in the center point map to the category-independent segmentation prediction mask to generate the final cell nucleus instance segmentation classification mask.
[0086] Specifically, for each cell nucleus in the category-independent segmentation prediction mask, the distance between the centroid of the cell nucleus and the center point of the corresponding region in the center point map is calculated. The type represented by the nearest center point is taken as the category of the cell nucleus, such as... Figure 2 As shown in (c).
[0087] Furthermore, a multi-task learning paradigm is employed to train three decoder networks, aiming to improve overall performance by utilizing additional supervision signals from keypoints and edges. The overall optimization function is a weighted sum of the loss functions on the three branches. This includes the keypoint estimation branch loss function mentioned in step S102 above. In this embodiment, both the kernel prediction branch and the edge prediction branch are weighted sums of Binary Cross Entropy (BCE) and Dice loss, with BCE having a weight of 0.4 and Dice having a weight of 0.6. The total weight coefficient for all three branches is 1. Training uses the Adam optimizer with a weight decay of 0.0001, an initial learning rate of 0.001, and a batch size of 4.
[0088] Corresponding to the above method, this embodiment also proposes a multi-histological pathological cell nucleus instance segmentation and classification system based on key point-guided Transformer, comprising:
[0089] The preprocessing module is used to preprocess pathological images.
[0090] The PointFormer module is used to input preprocessed pathological images into PointFormer and generate three output predictions: key point heatmap, kernel prediction, and edge prediction.
[0091] The center point map generation module is used to locate the center point of the cell nucleus by filtering local peaks in the key point heatmap and generating a center point map.
[0092] An integration module is used to integrate kernel predictions and edge predictions to obtain a class-independent segmentation prediction mask.
[0093] The segmentation classification mask generation module is used to map the category of the corresponding center point in the center point map to the category-independent segmentation prediction mask, and generate the final cell nucleus instance segmentation classification mask.
[0094] To verify the effectiveness of this invention, training and evaluation were performed on the PanNuke dataset, using mPQ and bPQ as evaluation metrics. Compared to the classic cell nucleus instance segmentation and classification method HoverNet, the mPQ and bPQ of this invention are improved by 4.66% and 4.61%, respectively; compared to the benchmark state-of-the-art cell segmentation and classification method PointNu-Net, the mPQ and bPQ of this invention are improved by 1.40% and 2.49%, respectively. This demonstrates that this invention can effectively improve the segmentation and classification performance of clustered overlapping kernels. Figure 4 The visualization results on PanNuke are shown. PointNu-Net often misidentifies other tissue regions as cell nuclei, while HoVer-Net tends to segment a single cell nucleus into multiple nuclei. In contrast, this invention has edge-aware capabilities and generates high-confidence instances, thus demonstrating stronger robustness in clinical applications.
[0095] In summary, this invention treats the detection and classification of each kernel as a semantic keypoint estimation problem to determine the center point of each kernel without complex pixel grouping post-processing. It proposes an attention-guided strategy based on AFE to share keypoint estimation features, thereby guiding kernel and edge segmentation and mitigating prediction inconsistencies between different branches. By decoupling the segmentation and classification tasks and leveraging the Transformer's advantage of modeling long-distance dependencies, it can benefit from category-aware detection and category-independent segmentation, thereby improving the segmentation and classification performance of clustered overlapping kernels.
[0096] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0097] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0098] The units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations are not considered to be beyond the scope of this invention.
[0099] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This invention is not limited to any particular combination of hardware and software.
[0100] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for keypoint-guided Transformer-based multi-histology pathological cell nuclei instance segmentation and classification, characterized in that, Includes the following steps: Step 1: Preprocess the pathological images; Step 2: Input the preprocessed pathological image into PointFormer to generate three output predictions: key point heatmap, kernel prediction, and edge prediction. PointFormer consists of one encoder and three decoders, with an attention filtering enhancement module embedded between the decoders. The core component of the encoder is the Multi-Local Perception Transformer module MLPFormer, which consists of two Transformer modules. The two Transformer modules are a local feature extraction module composed of parallel local window attention (LWA) and depthwise separable convolution, and a global feature extraction module composed of parallel local vertical attention (LVA) and local horizontal attention (LHA). The specific calculation process is: a, given an input feature map X, the feature map X is divided into a plurality of local regions , wherein n represents the number of local regions; b, the multi-head attention is calculated in the divided local region, and the output of the i-th local region is obtained ; c, the outputs of the n local regions are spliced to obtain the output of the local attention : ; d, the calculation formula of the whole MLPFormer is as follows: wherein, denotes the input of the LWA, denotes the input of the LVA, denotes the input of the LVA, denotes the input of the LHA, and denote the outputs of two Transformer modules in the MLPFormer, , and are calculated in the same way as ; denotes the LayerNorm normalization, denotes the feed-forward neural network; Step 3: Locate the center point of the cell nucleus by filtering out local peaks in the key point heatmap and generate a center point map; Step 4: Integrate kernel prediction and edge prediction to obtain a class-independent segmentation prediction mask; Step 5: Map the category of the corresponding center point in the center point map to the category-independent segmentation prediction mask to generate the final cell nucleus instance segmentation classification mask.
2. The keypoint-guided Transformer-based multi-histology pathological cell nuclei instance segmentation classification method according to claim 1, characterized in that, In step 1, the preprocessing of the pathological image involves closing the true edge labels.
3. The multi-histological pathological cell nucleus instance segmentation and classification method based on key-point guided Transformer according to claim 1, characterized in that, The core component of the kernel branch decoder and edge branch decoder is the cross-MLPFormer. Except for the query vector Q, its calculation method is the same as the MLPFormer. In the cross-MLPFormer calculation, the query vector Q is the sum of the current branch Q and the value from the keypoint estimation branch. After refinement by the AFE module .
4. The multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer according to claim 3, characterized in that, The core of the AFE module includes channel attention and spatial attention, which can be formally expressed as: Where Q comes from either the kernel prediction branch or the edge prediction branch, From the keypoint estimation branch, and These represent channel attention and spatial attention, respectively.
5. The method for segmenting and classifying multi-histological pathological cell nuclei based on key-point guided Transformer according to claim 1, characterized in that, The core components of the keypoint branch decoder are consistent with the encoder's MLPFormer; The goal of the keypoint branch decoder is to regress a low-resolution keypoint heatmap. The training process of the keypoint branch decoder is as follows: a. Given an input image X with height H and width W and its corresponding ground truth heatmap Y, for each ground truth keypoint p of class c, calculate a low-resolution equivalent... ; b. Using an unnormalized Gaussian kernel, all ground truth keypoints are rendered in heatmap Y. The ground truth keypoint heatmap is shown in the following formula; where The standard deviation of a target's adaptive size is represented. and These represent the x and y coordinates of the actual key points, respectively. and They represent key points respectively. Low-resolution equivalents of coordinates and key points Low-resolution equivalence of coordinates Represents a true key point heatmap. If two Gaussian distributions of the same category overlap, take the maximum element-wise distribution. c. Keypoint estimation branch loss function The definition is as follows: ,in, This represents a heatmap showing the predicted key points. and It is a hyperparameter of focal loss. This represents the number of key points in image X.
6. The method for segmenting and classifying multi-histological pathological cell nuclei based on key-point guided Transformer according to claim 1, characterized in that, Step 3 specifically includes: detecting all key points with a response value greater than or equal to 8 in the neighborhood, and filtering out predictions with low confidence using a confidence threshold of 0.
4.
7. The multi-histological pathological cell nucleus instance segmentation and classification method based on key point-guided Transformer according to claim 1, characterized in that, Step 4 specifically includes: removing noise from the predicted cell kernel mask; refining the boundaries on the predicted edge mask; aggregating the results of the kernel prediction branch and the edge prediction branch, and constructing a class-independent segmentation prediction mask by performing an expansion operation; Step 5 specifically includes: for each cell nucleus in the category-independent segmentation prediction mask, calculating the distance between the centroid of the cell nucleus and the center point of the corresponding region in the center point map, and taking the type represented by the nearest center point as the category of the cell nucleus.
8. A multi-histological pathological cell nucleus instance segmentation and classification system based on key-point guided Transformer, characterized in that, For implementing the multi-histological pathological cell nucleus instance segmentation and classification method based on keypoint-guided Transformer as described in any one of claims 1-7, the system comprises: The preprocessing module is used to preprocess pathological images; The PointFormer module is used to input preprocessed pathological images into PointFormer and generate three output predictions: key point heatmap, kernel prediction, and edge prediction. The center point map generation module is used to locate the center point of the cell nucleus by filtering local peaks in the key point heatmap and generating a center point map. An integration module is used to integrate kernel prediction and edge prediction to obtain a class-independent segmentation prediction mask; The segmentation classification mask generation module is used to map the category of the corresponding center point in the center point image to a category-independent segmentation prediction mask, generating the final cell nucleus instance segmentation classification mask.