Histopathological image classification method and system based on semantic correlation clustering

By constructing an image classification model based on semantic relevance clustering, and using a feature extraction fusion unit and a total loss function to enhance the semantic relevance of cross-domain learning, this method solves the problem of limited classification ability of cross-domain learning in histopathological image classification and achieves high-precision histopathological image recognition.

CN118781399BActive Publication Date: 2026-11-24CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410791263.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2026-11-24
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing histopathological image classification models require a large amount of labeled data during training and ignore the semantic correlation between categories when learning across domains, resulting in limited classification capabilities.

Method used

We adopt a semantic relevance-based clustering method. By constructing an image classification model, we extract multi-level fusion features using a feature extraction fusion machine, reduce the differences between domains and classes by using a total loss function, and use the cosine distance of class centers to measure semantic relevance, thereby achieving cross-domain knowledge transfer.

Benefits of technology

It improves the model's classification accuracy in the target domain, enhances its ability to recognize histopathological images, and approaches the effect of manual annotation, showing potential for clinical application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781399B_ABST
    Figure CN118781399B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image classification technology, specifically disclosing a method and system for classifying histopathological images based on semantic relevance clustering. First, the multi-level fusion features of the source and target domains are normalized and mapped. In the new feature space, the cosine distance between class centers is used to measure the semantic relevance between categories and to complete sample discriminative clustering. Then, a total loss function is constructed, and the domain centers, class centers, and sample distributions are aligned using a self-restriction mechanism to match differences in domain edge distribution, class conditional distribution, and sample feature distribution between the two domains. Multi-granular information is used to achieve cross-domain inter-class semantic relevance knowledge transfer, improving the model's classification ability. Experimental results show that this method and system have high classification accuracy for WSI (Whole Slide Image) histopathological images, and the labeled effect after classification is close to that of manual labeling, showing potential for clinical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification technology, and in particular to a method and system for classifying histopathological images based on semantic relevance clustering. Background Technology

[0002] Cancer threatens global health and is one of the leading causes of death. In clinical cancer diagnosis, histopathological biopsy is currently the most common diagnostic method and is considered the gold standard. Computer-aided diagnosis (CAD) technology not only improves diagnostic efficiency but also reduces the risk of misdiagnosis and missed diagnosis due to human factors, making it of great significance in cancer diagnosis and treatment.

[0003] Convolutional Neural Networks (CNNs) can deeply mine representative information from original images and objectively analyze high-order features, and have been widely used in the classification and recognition of histopathological images. Zhu et al. proposed using multiple compact CNNs to classify histopathological images. Majumdar et al. proposed a gamma function-based CNN model ensemble method for histopathological image detection. Huang et al. proposed an extended convolutional neural network specifically for intelligent classification of pathological images. Demirel et al. proposed a dual-input convolutional neural network (DiCNN) model using color normalization techniques and cell kernel segmentation data to improve the classification accuracy of histopathological images.

[0004] CNNs have achieved accurate and efficient classification in image classification tasks. However, training CNN models requires a large amount of labeled image data; otherwise, it may lead to overfitting and poor generalization. In practical applications, due to the privacy of patients and the difficulty in obtaining labels for histopathological images, a domain adaptation (DA) algorithm is introduced to learn domain-invariant features between the source and target domains and apply the classifier to the target domain data. He proposed a self-supervised structural domain adaptation framework specifically designed to solve the segmentation problem between different expression sites in histopathological images. Wu et al. proposed an unsupervised domain adaptation algorithm called TILs-Tumor Interactive Guidance (T2UDA) for predicting cancer patient survival rates. Most unsupervised domain adaptation methods rely on high-level features of the image. However, in histopathological image classification tasks, low-level features containing cell image texture and shape information should not be ignored. A BreNet algorithm that can fuse high-level, mid-level, and low-level features has been proposed to extract pathological image information. Explicitly aligning and fusing features may destroy the structure of discriminative features. Deep sample clustering with fused features can extract discriminative features while preserving the underlying data structure. Most existing heterogeneous domain adaptive methods focus on learning domain-invariant features to reduce the distributional differences between two domains, but ignore the semantic correlation between categories, thus limiting the model's classification ability. Summary of the Invention

[0005] This invention provides a method and system for classifying histopathological images based on semantic relevance clustering. The technical problem it solves is: how to consider the semantic relevance between categories while narrowing the distribution differences between two domains, so as to enhance the classification ability of the model.

[0006] To address the above technical problems, this invention provides a histopathological image classification method based on semantic relevance clustering, comprising the following steps:

[0007] S1. Construct source domain dataset and target domain dataset and divide them into training set and test set. The source domain dataset includes multiple labeled source domain histopathological image samples, i.e., source domain samples. The target domain dataset includes multiple unlabeled target domain histopathological image samples, i.e., target domain samples.

[0008] S2. Construct an image classification model, which includes a feature extraction fusion unit and a classifier; the feature extraction fusion unit is used to extract multi-level fusion features of source domain samples and target domain samples.

[0009] S3. The image classification model is trained using the training set, and the trained image classification model is tested using the test set.

[0010] The total loss function used during training is:

[0011]

[0012] Among them, L DCA This is a loss function used to reduce the difference in marginal distributions between the source and target domains. This is a loss function used to enhance semantic relevance within classes and weaken semantic relevance between classes, thereby increasing the distribution differences between classes within the domain. This is a loss function used to address differences in inter-domain class-conditional distributions between domains. This is a loss function used to measure the difference in the distribution of sample features between the source and target domains. , , and These are the weights of each loss function;

[0013] S4. Use the trained image classification model to classify the input target domain histopathological image and output the classification result.

[0014] Furthermore, losses according to and , , calculate, and These represent the normalized fusion features of the source and target domains, respectively. , Indicates according to and The domain centers of the source and target domains for computation;

[0015] and It is based on the initial domain centers of the source and target domains. and Multi-level fusion features of source and target domains and The normalized fusion features are defined by the following subscripts: i indicates the i-th source domain sample, j indicates the j-th target domain sample, s indicates the source domain, and t indicates the target domain.

[0016] Furthermore, losses Calculated by the following formula:

[0017]

[0018] in, and represents the inter-class cosine distance within the source and target domains, respectively, and | represents the absolute value;

[0019] and Calculated by the following formula:

[0020]

[0021] in, Represents the vector dot product. This represents the magnitude of the vector.

[0022] Furthermore, the initial domain centers of the source and target domains and Calculated by the following formula:

[0023]

[0024] in, and These represent the number of samples in the source domain and the target domain, respectively.

[0025] Normalization fusion features of source and target domains and Calculated by the following formula:

[0026]

[0027] in, Expressing the request Norm;

[0028] Domain centers of source and target domains , Calculated by the following formula:

[0029] .

[0030] Furthermore, the loss L DCA Calculated by the following formula:

[0031] .

[0032] Furthermore, during the training of the image classification model, the target domain or source domain samples are divided into different batches for training. The image classification model will continuously iterate, and during the iteration process, the average moving average criterion is used to update the domain centers and class centers.

[0033]

[0034] in, This represents the domain center or class center generated by this batch of samples. This represents an unupdated domain center or class center. Represents the updated domain center or class center. This is the average moving average.

[0035] Furthermore, losses Calculated by the following formula:

[0036]

[0037] Where k=c+1 represents the number of data categories, , These represent the class centers of the source and target domains in class k, respectively.

[0038] The class center of the source domain in class k Calculated by the following formula:

[0039]

[0040] in, The class center represents the class of category k generated by the fusion features of the source domain samples in each round of training. This represents the p-th source domain sample of category k. For the p-th source domain sample of category k The tag, This represents the number of source domain samples for category k. This represents the number of samples in the set.

[0041] The class center of the target domain in category k Calculated by the following formula:

[0042]

[0043] in, The pseudo-label defined for the q-th target domain sample in category k. This indicates that the image classification model classifies the q-th target domain sample in category k. The classification probability, This represents the maximum classification probability of the image classification model for all target domain samples of category k. This represents the number of target domain samples for category k.

[0044] Furthermore, losses Calculated by the following formula:

[0045]

[0046] in, It is a Gaussian kernel function. The square of the sample distribution modulus between the two domains is represented by H, and the subscript H indicates that the features are mapped to the Hilbert reproducing space to facilitate the measurement of the data distribution differences between the source and target domains.

[0047] Furthermore, the operation of the feature extraction fusion unit is expressed as follows:

[0048]

[0049] Where F represents the multi-level source domain fusion feature or multi-level target domain fusion feature output by the feature extraction fusion unit. It is a global average pooling operation. It is a cascaded set. Representing features from layer l, This represents the feature size of this layer before global average pooling. It is a control coefficient, if the first If layer features participate in the fusion, then ,otherwise ;

[0050] The classifier consists of three fully connected layers.

[0051] The present invention also provides a histopathological image classification system based on semantic relevance clustering, the key of which is: equipped with an image classification model generated by the above-mentioned histopathological image classification method based on semantic relevance clustering.

[0052] The present invention provides a histopathological image classification method and system based on semantic relevance clustering. First, it normalizes and maps the multi-level fusion features of the source and target domains. In the new feature space, it uses the cosine distance between class centers to measure the semantic relevance between categories and completes sample discriminative clustering. Then, it constructs a total loss function and aligns the domain centers, class centers, and sample distributions through a self-regulating mechanism to match differences in domain edge distribution, class conditional distribution, and sample feature distribution between the two domains. This multi-granularity information enables cross-domain inter-class semantic relevance knowledge transfer, improving the model's classification ability.

[0053] The histopathological image classification method and system based on semantic relevance clustering provided by this invention have the following advantages:

[0054] 1. Utilize multi-level fusion features for normalization mapping to reduce the differences between the two domains;

[0055] 2. The domain centers and class centers of the source and target domains are calculated using clustering algorithms, and the cosine distance between class centers is used to measure the semantic relevance between classes, highlighting the differences between categories;

[0056] 3. Utilize multi-granularity information self-adjustment to achieve effective transfer of semantically relevant knowledge and improve the model's classification ability.

[0057] The method was validated using a mouse colonic histopathological image dataset and the PAIP_2020 human colonic WSI histopathological image dataset. The final classification results were then reconstructed onto the WSI histopathological images, enabling the annotation of cancerous regions. Experimental results show that the method and system have high classification accuracy for WSI (Whole Slide Image) histopathological images, and the annotation effect after classification is close to that of manual annotation, demonstrating potential for clinical application. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of the histopathological image classification method based on semantic relevance clustering provided in the embodiments of the present invention;

[0059] Figure 2 This is an example image of a mouse tissue pathology sample provided in an embodiment of the present invention;

[0060] Figure 3 This is an example image of a PAIP2020 histopathological image sample provided in an embodiment of the present invention;

[0061] Figure 4 This is an example image of a histopathological image after the PAIP2020 dataset has been segmented, as provided in this embodiment of the invention.

[0062] Figure 5 This is a feature distribution map of the target domain dataset at different stages provided in the embodiments of the present invention;

[0063] Figure 6 This is a comparison chart of the classification accuracy of different algorithms provided in the embodiments of the present invention;

[0064] Figure 7 These are visual prediction heatmaps of different algorithms provided in the embodiments of the present invention. Detailed Implementation

[0065] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are given for illustrative purposes only and should not be construed as limiting the present invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.

[0066] The histopathological image classification method based on semantic relevance clustering provided in this invention embodiment is also called the unsupervised domain adaptive histopathological image classification algorithm based on semantic relevance clustering (hereinafter referred to as the CMOA algorithm). Figure 1 As shown in the algorithm framework diagram, the method includes the following steps:

[0067] S1. Construct source domain dataset and target domain dataset and divide them into training set and test set. The source domain dataset includes multiple labeled source domain histopathological image samples, i.e., source domain samples. The target domain dataset includes multiple unlabeled target domain histopathological image samples, i.e., target domain samples.

[0068] S2. Construct an image classification model, which includes a feature extraction fusion unit and a classifier; the feature extraction fusion unit is used to extract multi-level fusion features of source domain samples and target domain samples.

[0069] S3. Train the image classification model using the training set, and test the trained image classification model using the test set;

[0070] S4. Use the trained image classification model to classify the input target domain histopathological image and output the classification result.

[0071] like Figure 1 As shown, the unsupervised domain-adaptive histopathological image classification algorithm based on semantic relevance clustering consists of three stages. First, a pre-trained BreNet network is used to extract multi-level deep fusion features. Then, the fusion features of the source and target domain samples are normalized and mapped, and discriminative clustering is implemented in the new feature space. Domain centers and class centers of the source and target domains are calculated separately, and the inter-class semantic relevance information is measured by calculating the cosine distance between the class centers. Finally, a self-adjusting method aligns the domain centers and class centers to reduce the differences in domain edge distribution and class conditional distribution between the two domains. Multi-granularity information is used to achieve cross-domain transfer of inter-class semantic relevance knowledge, enhancing the model's ability to recognize and classify samples in the target domain.

[0072] (1) Step S1: Dataset preparation

[0073] This paper uses s and t to denote the source and target domains, respectively. This represents a sample instance with a label in the source domain, while These represent sample instances in the target domain that do not have labels. They are samples from the source domain. and target domain samples Extracted from, among which and This represents the source domain sample data and the label matrix corresponding to each sample. This represents sample data from the target domain. Represents data dimensions. Represents the number of data categories. and These represent the number of samples in the source domain and the target domain, respectively.

[0074] The source domain dataset and the target domain dataset are divided into training sets and test sets, which are used to train and test the image classification model, respectively.

[0075] (2) Step S2: Construct an image classification model

[0076] Image classification models consist of a feature extraction fusion unit and a classifier. The feature extraction fusion unit extracts multi-level fused features from source and target domain samples, and the classifier outputs a classification based on these multi-level fused features.

[0077] This example designs a deep convolutional neural network, BreNet, as a feature extractor to extract deep features. First, BreNet is trained on images from the ImageNet public dataset for classification, accelerating the network's learning speed. After pre-training, the convolutional layers before the fully connected layers are transferred to serve as feature extraction modules, and a multi-stage feature fusion network is added to them, resulting in the feature extractor fusion unit. This feature extractor fusion unit combines feature maps from different depths and sizes, and finally, the fused features are fed into a new classifier.

[0078] In feature fusion, a cascaded feature fusion layer is used to fuse features from different layers to increase the information content of the features. Global average pooling is used to match features from different layers, ensuring they are of similar size before cascading fusion. The fused multi-layered source or target domain features are then combined. It can be written as:

[0079] (1)

[0080] in, It is a global average pooling operation. It is a cascaded set. Representing features from layer l, This represents the feature size of this layer before global average pooling. It is a control coefficient, if the first If layer features participate in the fusion, then ,otherwise .

[0081] The fusion of low-level, mid-level, and high-level features from the feature extractor, all extracted through a unified model, not only has a certain correlation with each other, but also contains different information at different levels. The fused features obtained in this way contain the structural information of the shallow features of the original image and the abstract information of the deep features.

[0082] (3) Step S3: Training and testing the model

[0083] First, we introduce the generation of class centers and domain centers in the algorithm. For data from the same domain, a domain center is initially calculated according to the following formula. :

[0084] (2)

[0085] in and This represents the multi-level fused features extracted from each sample based on the BreNet deep feature fusion network. and This represents the initial domain centers of the source and target domains. Considering the potential significant differences in sample features between the two domains, this was not directly utilized. and Instead of calculating the loss function, it utilizes... The features of the source and target domains are normalized so that the features of the two domains are projected onto a matrix. On the spherical feature space centered:

[0086] (3)

[0087] in, Representative seeking Norm, and This represents the normalized sample fusion features.

[0088] Using the normalized sample fusion features, the domain centers of the source and target domains are calculated again:

[0089] (4)

[0090] Similarly, the class centers of different classes of samples in the source and target domains are calculated using the normalized sample fusion features. For the labeled source domain sample fusion features, the class centers are calculated directly using the labels.

[0091] (5)

[0092] in, The class center represents the class of category k generated by the fusion features of the source domain samples in each round of training (where 0 to c represent the labels of the source domain, and k represents any one of the c+1 classes). This represents the p-th source domain sample of category k. For the p-th source domain sample of category k The tag, This represents the number of source domain samples for category k. (Represents the number of samples in the set).

[0093] For target domain instances without labels Based on the output of the feature fusion network ,use function The network output probability was obtained. Define pseudo-tags for target domain instances. ,in Matching the target domain instance with the pseudo-tags yields The class center is calculated for the target domain instance using pseudo-tags:

[0094] (6)

[0095] Let c be the pseudo-label of the q-th target domain sample in category k, where c represents the target domain sample label and k = c + 1 represents the number of sample categories. This indicates that the image classification model classifies the q-th target domain sample of category k. The classification probability, This represents the maximum classification probability of the image classification model for all target domain samples of category k. This represents the number of target domain samples for category k.

[0096] When training a model using image data, the samples are divided into different batches for training, and the model iterates continuously. Therefore, during the iteration process, the domain centers and class centers need to be updated. The average moving average criterion is used to update the domain centers and class centers.

[0097] (7)

[0098] in, This represents the domain center or class center generated by this batch of samples. This represents an unupdated domain center or class center. Represents the updated domain center or class center. This is the average moving average.

[0099] This example reduces the difference in marginal distribution between the source and target domains by adjusting their center values, thereby constructing a loss function:

[0100] (8)

[0101] Within the same domain, learning semantic relevance information between categories helps solve classification problems. Specifically, the semantic relevance between cancerous cells is strong, while the semantic relevance between cancerous cells and normal cells is weak. This study primarily focuses on inter-class semantic relevance information, specifically the semantic relevance between cancerous cells and normal cells. By weakening inter-class semantic relevance and strengthening intra-class semantic relevance, a better classification effect is achieved. The study utilizes the distribution differences between classes within the domain to measure the semantic relevance information between classes. Specifically, the cosine distance between class centers within the domain is calculated using the domain center and class center.

[0102] (9)

[0103] in, and represent the intra-domain inter-class cosine distances of the source and target domains, respectively. Represents the vector dot product. This represents the magnitude of the vector.

[0104] Cosine distance is used to strengthen the semantic relevance of instances within a class and weaken the semantic relevance between classes, thereby increasing the distribution differences between classes within the domain, and a loss function is constructed accordingly.

[0105] (10)

[0106] in, It represents the absolute value.

[0107] In addition to the differences in marginal distribution between the two domains and the differences in class distribution within the two domains, the differences in class-conditional distribution and sample distribution between the two domains are also considered. To address the differences in class-conditional distribution between the two domains, a class center alignment approach is adopted to construct the loss function.

[0108] (11)

[0109] By reducing the difference in sample distribution between the source and target domains, the distance between similar samples in the feature space is reduced, making the target domain samples as close as possible to the source domain samples. This achieves the goal of classification using the source domain sample labels, and measures the difference in sample feature distribution between the two domains to construct the loss function.

[0110] (12)

[0111] in, It is a Gaussian kernel function. The square of the sample distribution modulus between the two domains is represented by H, and the subscript H indicates that the features are mapped to the Hilbert reproducing space to facilitate the measurement of the data distribution differences between the source and target domains.

[0112] Therefore, the overall loss function of the CMOA algorithm proposed in this example can be written as:

[0113] (13)

[0114] in , , and These are the weights of equations (7), (9), (10), and (12), respectively. The total loss function weakens the semantic correlation between dissimilar samples by using various loss functions and guides the domain center, class center, and sample distribution to perform self-regulation alignment, thereby reducing the differences in domain edge distribution, class conditional distribution, and sample feature distribution between two domains. It utilizes multi-granular information to achieve cross-domain transfer of inter-class semantic correlation knowledge, thereby enhancing the model's ability to identify and classify samples in the target domain.

[0115] The specific algorithm flow of CMOA is shown in Table 1 below.

[0116] Table 1. Pseudocode of the CMOA algorithm

[0117]

[0118] This invention also provides a histopathological image classification system based on semantic relevance clustering, which is equipped with an image classification model generated using the above-mentioned histopathological image classification method based on semantic relevance clustering.

[0119] The mouse colon histopathological image dataset used in the experiment included both normal and cancerous histopathological images. Each image was stained with hematoxylin and eosin, magnified 40 times, and had a resolution of 1024. 768. This dataset contains a total of 126 histopathological images, including 55 normal histopathological images and 71 cancerous histopathological images. (For example...) Figure 2 As shown, normal histopathological images show cells with normal distribution and uniform size. In contrast, cancerous histopathological images show blurred cell outlines, disordered arrangement, irregular shapes, and some exhibit visible abnormal growth.

[0120] The PAIP_2020 Human Colon WSI Histopathological Image Dataset is a public dataset released by Seoul National University Hospital. Detailed information about the dataset can be found at https: / / paip2020.grand-challenge.org / . This example uses 47 detailed labeled WSI histopathological images from this dataset for the training set experiment. Each WSI histopathological image is saved in multi-level SVS format with an average size of 116214. 88095 contains blank background regions of varying sizes. The detailed annotations for this dataset are binary mask images segmented according to the cancerous regions. (Example...) Figure 3 As shown, each image contains a certain blank area, a normal cell tissue area, and a cancerous cell tissue area.

[0121] Table 2 shows the number and size of the histopathological images in the two datasets. As can be seen from Table 2, there is a significant difference in image size between the two datasets, which presents a challenge to the algorithm implementation.

[0122] Table 2 Image size and number of samples for each dataset

[0123]

[0124] This example uses five metrics as evaluation criteria. The calculation algorithms for F1 score, accuracy, sensitivity, and specificity are as follows:

[0125] (14)

[0126] TP, FP, TN, and FN represent true positive, false positive, true negative, and false negative, respectively. Specifically, TP is the number of positive samples that are correctly predicted as positive, FP is the number of negative samples that are incorrectly predicted as positive, TN is the number of negative samples that are correctly predicted as negative, and FN is the number of positive samples that are incorrectly predicted as negative.

[0127] Another evaluation metric is the area under the ROC (Receiver Operating Characteristic) curve, or AUC (Area Under ROC Curve). The ROC curve shows the relationship between the model's true positive rate and false positive rate. AUC provides a single numerical measure of the model's classification performance across all possible thresholds, making it very useful for evaluating classifiers.

[0128] The mouse histopathological image dataset was used as the source domain, and the PAIP2020 human WSI histopathological image dataset was used as the target domain for training and testing the network. When processing the source domain data, each histopathological image was divided into 224 segments with a stride of 112. The sample blocks are 224 pixels each, meaning there is some overlap between adjacent sample blocks. This is done to maximize the amount of data in the source domain. The PAIP2020 human WSI histopathological image dataset is also divided into 224 blocks. The sample blocks are 224 pixels in size, but there is no overlap between adjacent sample blocks. Since each WSI image contains certain blank areas that do not contain cellular tissue, further filtering of the segmented sample blocks is required. The number of tissue samples in the dataset before and after segmentation is shown in Table 3.

[0129] Table 3. Number of samples before and after dataset splitting

[0130]

[0131] Due to the large size of WSI images, each WSI image, after being divided, contains an average of nearly 100,000 sample blocks. To balance the difference in the number of samples between the source and target domains, 1,000 sample blocks from cancerous regions and 500 sample blocks from normal regions are extracted from each WSI image as the actual target domain dataset. This paper also employs cross-validation to validate the algorithm. In each experiment, 6,000 sample blocks from the actual target domain dataset are extracted as the training set. The finally trained model is used for testing on all sample blocks to reproduce the model's prediction results on the entire WSI image.

[0132] Figure 4 The images show histopathological images after the PAIP2020 dataset was segmented. By observation, it can be found that the cells in normal histopathological images are compact, with clear boundaries, relatively regular shapes and uniform sizes. In contrast, the cells in cancerous histopathological images are scattered, with obvious blank areas, blurred boundaries, uneven size distribution, irregular shapes, and obvious abnormal growth.

[0133] Experimental conditions: The network model built in the experiment was based on the hardware conditions of Intel@Xeon(R) CPU E5-2620 v4@2.10GHz×32 and GeForce GTX 2080Ti. The unsupervised domain adaptive algorithm FFSC was implemented in the programming environment of Python 3.6 and PyTorch 1.4.0.

[0134] Parameter settings: The model training iterations are set to 50, the batch size of the training dataset is set to 16, and Adaptive Moment Estimation (Adam) is selected to optimize the network parameters. ReLU is chosen as the activation function, and the dropout ratio of the fully connected layers in the classifier is set to 0.5. The learning rate (…) The value is initially set to 0.0001 and will be adjusted as the model training iterations (epochs) progress. ,in =0.9.

[0135] To more intuitively reflect the impact of different parts of the algorithm on the target domain sample classification task, feature visualization is used to compare and analyze the features of the target domain dataset. The feature distribution of the target domain dataset at different stages is shown below. Figure 5 As shown. Figure 5 The feature distribution of the target domain dataset at different stages is shown. In each feature map, a blue dot represents a normal histopathological image sample block, while a red dot represents a cancerous histopathological image sample block. Figure 5 Figures (a) and (b) show the distribution of low-order and high-order features, respectively. The red and blue scatter plots overlap significantly, indicating that classification based solely on low-order or high-order features yields poor results. This is in contrast to low-order features. Figure 5 (c) shows the distribution of multi-level fusion features. Since the multi-level features combine structural information, the fusion features are more discriminative, and the overlap between the red and blue scatter areas is significantly reduced. Figure 5 Figure (d) shows the distribution of clustered features after using the CMOD algorithm. The red and blue scatter areas have minimal overlap, indicating that these features have optimal separability. This is because the CMOD algorithm captures more representative semantic relevance information from the fused features, making the features more representative and thus more conducive to classification.

[0136] To verify the effectiveness of the proposed human-mouse unsupervised domain adaptation algorithm based on semantic relevance clustering, MCD was also selected. [1] AFN [2] MCC [3] and MDD [4] Four unsupervised domain adaptation algorithms were used as comparison algorithms. Three ablation algorithms, CMOD1, CMOD2, and CMOD3, were also designed. CMOD1 eliminates the sample distribution alignment part of the algorithm, i.e., it does not introduce... Loss; CMOD2 eliminates the domain alignment part in the algorithm, that is, it does not introduce... Loss; CMOD3 removes the class center alignment part from the algorithm, that is, it does not introduce... Loss. Using these three ablation algorithms, we verified the roles of sample distribution alignment, domain alignment, and class center alignment in the algorithms, respectively, and verified the importance of each part in the semantic relevance information transfer process.

[0137] The specific experimental results are shown in Table 4 and Figure 6 As shown.

[0138] Table 4 Classification results of different algorithms

[0139]

[0140] Table 4 shows the experimental results of the domain adaptation experiment obtained by converting the mouse histopathological image dataset to the PAIP2020 histopathological image dataset under various comparison and ablation algorithms. Figure 6 The accuracy of different algorithms was compared more intuitively. Among them, the proposed CMOD algorithm showed the best experimental results (F1 score: 80.96%±4.58%, accuracy: 78.70%±4.47%, AUC: 85.55%±5.90%, sensitivity: 77.88±4.41%, specificity: 79.08±5.76%), which fully demonstrates the effectiveness of the algorithm. Other unsupervised domain adaptive contrastive algorithms include MCD (F1 score: 79.32%±2.11%, accuracy: 66.73%±2.96%, AUC: 55.14%±2.45%, sensitivity: 95.64%±3.84%, specificity: 8.72%±1.12%) and AFN (F1 score: 77.88%±2.26%, accuracy: 64.63%±2.98%, AUC: 22.89%±5.12%, sensitivity: 93.38%±4.44%, specificity: 6.86%±2.98%). The algorithms used were: MCC (F1 score: 76.50%±2.17%, accuracy: 63.79%±2.29%, AUC: 62.85%±1.36%, sensitivity: 88.39%±5.06%, specificity: 14.38%±3.27%) and MDD (F1 score: 74.58±4.72%, accuracy: 68.85%±4.35%, AUC: 74.11%±5.66%, sensitivity: 68.96%±7.57%, specificity: 68.62%±2.08%). Among these, MCD, AFN, and MCC showed significantly higher sensitivity than specificity, meaning that these three algorithms are essentially unable to distinguish between cancerous and normal cell tissues. Although the MDD algorithm has a relatively good balance between sensitivity and specificity, it cannot achieve good results. This proves that the MDD algorithm has a certain ability to distinguish between cancerous cells and normal cells, but the ability is not strong. This also reflects the difficulty of adaptive classification tasks in the unsupervised domain of rats and humans.

[0141] In the ablation experiment, the values ​​of CMOD1 (F1 score: 80.42%±0.90%, accuracy: 69.58%±1.41%, AUC: 61.08%±3.59%, sensitivity: 93.69%±1.04%, specificity: 21.35%±2.12%), CMOD2 (F1 score: 78.37%±7.85%, accuracy: 74.00%±8.04%, AUC: 71.90%±8.89%, sensitivity: 86.25%±9.48%, specificity: 49.90%±5.42%), and CMOD3 (F1 score: 74.55%±7.33%, accuracy: 70.54%±7.01%, AUC: 76.86%±6.19%, sensitivity: 71.32%±5.32%, specificity: 69.29%±5.98%) were all positive. In the ablation algorithms CMOD1 and CMOD2, the sensitivity also far exceeded the specificity, showing slightly better performance compared to MCD, AFN, and MCC, thus proving the effectiveness of the design presented in this paper. Loss and The loss pattern is beneficial for adaptive classification tasks in the unsupervised mouse-human domain. Similar to the MDD algorithm, CMOD3 achieves a good balance between sensitivity and specificity, but compared to MDD, it exhibits higher sensitivity and specificity. This demonstrates the effectiveness of the clustering pattern in adaptive classification tasks in the unsupervised mouse-human domain, and also proves... The inclusion of loss is helpful for adaptive classification tasks in the unsupervised domain of rats and humans. The CMOD algorithm achieved the highest F1 score, accuracy, AUC value, and specificity among the contrastive and ablation algorithms, although it did not achieve the highest sensitivity value, which is due to the significant difference in sensitivity and specificity between the other algorithms.

[0142] Table 5 shows the p-value statistical test of CMOD compared with the comparison and ablation algorithms based on accuracy. Table 5 shows that the experimental results of CMOD are statistically significant compared with the comparison and ablation experiments, further demonstrating that the CMOD algorithm has advantages and better performance than other algorithms in adaptive classification tasks in the unsupervised mouse-human domain.

[0143] Table 5. P-value test of CMOD and comparison algorithm

[0144]

[0145] Figure 7This section presents heatmaps showing how different algorithms reconstruct the prediction results of a single sample patch onto the entire WSI image. The probabilities of different algorithms predicting a sample patch as cancerous are recorded, and these probabilities are mapped to corresponding areas on the WSI image. Color is used to represent the distribution and probability of the predicted cancerous sample patches. In the heatmap, areas closer to red represent a higher probability of being predicted as cancerous; yellow areas represent areas predicted as cancerous, but with a low probability; red areas represent areas predicted as cancerous with a relatively high probability; and black areas represent areas predicted as normal.

[0146] exist Figure 7 The first row shows thumbnails of five WSI images, and the second row shows the cancerous areas labeled by pathologists for each of the five WSI images. Black areas represent normal regions, white areas represent cancerous regions, and the remaining rows are heatmaps of cancerous areas predicted by different algorithms. MCD, AFN, MCC, CMOD1, and CMOD2 predicted the vast majority of cellular tissue as cancerous areas. While MDD and CMOD3 could distinguish some normal and cancerous areas, their predictions still showed significant discrepancies compared to the cancerous areas labeled by pathologists, consistent with the results in Table 4. Comparing the CMOD algorithm's predicted heatmap with the gold standard of labeled cancerous areas revealed significant overlap, with most areas correctly predicted. Only a small number of areas differed from the labeled cancerous areas, but these differences were within acceptable limits. This demonstrates that the CMOD algorithm can effectively distinguish between normal and cancerous areas in WSI images and accurately label cancerous areas.

[0147] The experimental results show that the CMOD algorithm proposed in this invention exhibits the best classification performance. Compared with MCD, AFN, MCC, and MDD, CMOD shows significant improvements in both experimental results and WSI annotation, demonstrating a better ability to address overfitting and insufficient training issues. This indicates that semantic relevance clustering based on fused features can more effectively learn the feature information of target domain samples. Comparisons with CMOD1, CMOD2, and CMOD3 show that sample distribution alignment, domain alignment, and class center alignment all play a role in minimizing cross-domain differences in the feature space during semantic relevance information transfer.

[0148] In summary, the present invention provides a histopathological image classification method and system based on semantic relevance clustering. It proposes a deep sample clustering algorithm, CMOD, for solving unsupervised adaptive classification tasks, utilizing labeled mouse histopathological images to identify and classify human WSI histopathological images. Discriminative clustering is performed on samples using deep fusion features after normalization mapping of the source and target domains. Domain centers and class centers are calculated for both the source and target domains. The cosine distance between class centers represents the semantic relevance information between classes. The difference between dissimilar samples is increased by expanding the cosine distance between classes. Then, semantic relevance knowledge is transferred through domain center alignment, class center alignment, and sample distribution alignment operations, enhancing the model's ability to identify and classify samples in the target domain. Compared with other comparative methods and ablation algorithms, the experimental results of the proposed CMOD method show superior classification performance. The experimental results show that the CMOD algorithm can effectively mine semantic correlation information between histopathological images and perform well in unsupervised adaptive classification tasks. By restoring the prediction results of sample blocks onto WSI histopathological images, the model's predicted cancerous areas can be displayed more intuitively, further helping pathologists to complete the diagnosis and analysis of WSI histopathological images, and has great potential for clinical application.

[0149] References:

[0150] [1]SAITO K, WATANABE K, USHIKU Y, et al. Maximum ClassifierDiscrepancy for Unsupervised Domain Adaptation[C]. IEEE / CVF Conference onComputer Vision and Pattern Recognition. Salt Lake City, UT, USA. IEEE, 2018:3723-3732.

[0151] [2]XU R, LI G, YANG J, et al. Larger Norm More Transferable: AnAdaptive Feature Norm Approach for Unsupervised Domain Adaptation[C]. IEEE / CVF International Conference on Computer Vision (ICCV). Seoul, Korea (South). IEEE, 2019:1426-1435.

[0152] [3]JIN Y, WANG X, LONG M, et al. Minimum Class Confusion for Versatile Domain Adaptation[J], ArXiv Preprint ArXiv:1912.03699, 2019

[0153] [4]ZHANG Y, LIU T, LONG M, et al. Bridging Theory and Algorithm for Domain Adaptation[C]. International Conference on Machine Learning(ICML).California, USA. IMLS, 2019:97-10.

[0154] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A histopathological image classification method based on semantic relevance clustering, characterized in that, Including the following steps: S1. Construct source domain dataset and target domain dataset and divide them into training set and test set. The source domain dataset includes multiple labeled source domain histopathological image samples, i.e., source domain samples. The target domain dataset includes multiple unlabeled target domain histopathological image samples, i.e., target domain samples. S2. Construct an image classification model, which includes a feature extraction fusion unit and a classifier; the feature extraction fusion unit is used to extract multi-level fusion features of source domain samples and target domain samples. S3. The image classification model is trained using the training set, and the trained image classification model is tested using the test set. The total loss function used during training is: , Among them, L DCA This is a loss function used to reduce the difference in marginal distributions between the source and target domains. This is a loss function used to enhance semantic relevance within classes and weaken semantic relevance between classes, thereby increasing the distribution differences between classes within the domain. This is a loss function used to address differences in inter-domain class-conditional distributions between domains. This is a loss function used to measure the difference in the distribution of sample features between the source and target domains. , , and These are the weights of each loss function; loss according to and , , calculate, and These represent the normalized fusion features of the source and target domains, respectively. , Indicates according to and The domain centers of the source and target domains for computation; and It is based on the initial domain centers of the source and target domains. and Multi-level fusion features of source and target domains and Normalized fusion features after normalization: subscript i indicates the i-th source domain sample, subscript j indicates the j-th target domain sample, superscript s indicates the source domain, and superscript t indicates the target domain. loss Calculated by the following formula: , in, and represents the inter-class cosine distance within the source and target domains, respectively, and | represents the absolute value; and Calculated by the following formula: , in, Represents the vector dot product. Indicates the magnitude of the vector; S4. Use the trained image classification model to classify the input target domain histopathological image and output the classification result.

2. The histopathological image classification method based on semantic relevance clustering according to claim 1, characterized in that, Initial domain centers of the source and target domains and Calculated by the following formula: , in, and These represent the number of samples in the source domain and the target domain, respectively. Normalization fusion features of source and target domains and Calculated by the following formula: , in, Expressing the request Norm; Domain centers of source and target domains , Calculated by the following formula: 。 3. The histopathological image classification method based on semantic relevance clustering according to claim 2, characterized in that, Loss L DCA Calculated by the following formula: 。 4. The histopathological image classification method based on semantic relevance clustering according to claim 3, characterized in that: When training an image classification model, samples from the target or source domain are divided into different batches for training. The image classification model iterates continuously, and during the iteration process, the average moving average criterion is used to update the domain centers and class centers. , in, This represents the domain center or class center generated by this batch of samples. This represents an unupdated domain center or class center. Represents the updated domain center or class center. This is the average moving average.

5. The histopathological image classification method based on semantic relevance clustering according to claim 4, characterized in that, loss Calculated by the following formula: , in, , represents the class center of the source domain and the target domain in category k, respectively. 0 to c represent c+1 labels, i.e., c+1 classes, of the source domain, and k represents any one of the c+1 classes. The class center of the source domain in class k Calculated by the following formula: , in, The class center represents the class of category k generated by the fusion features of the source domain samples in each round of training. This represents the p-th source domain sample of category k. For the p-th source domain sample of category k The tag, This represents the number of source domain samples for category k. This represents the number of samples in the set. The class center of the target domain in category k Calculated by the following formula: , in, The pseudo-label defined for the q-th target domain sample in category k. This indicates that the image classification model classifies the q-th target domain sample in category k. The classification probability, This represents the maximum classification probability of the image classification model for all target domain samples of category k. This represents the number of target domain samples for category k.

6. The histopathological image classification method based on semantic relevance clustering according to claim 5, characterized in that, loss Calculated by the following formula: , in, It is a Gaussian kernel function. H represents the square of the sample distribution modulus between the two domains, and the subscript H indicates that the feature is mapped to the Hilbert reproducing space.

7. The histopathological image classification method based on semantic relevance clustering according to claim 1, characterized in that, The operation of the feature extraction fusion unit is represented as follows: , Where F represents the multi-level source domain fusion feature or multi-level target domain fusion feature output by the feature extraction fusion unit. It is a global average pooling operation. It is a cascaded set. Representing features from layer l, This represents the feature size of this layer before global average pooling. It is a control coefficient, if the first If layer features participate in the fusion, then ,otherwise ; The classifier consists of three fully connected layers.

8. A histopathological image classification system based on semantic relevance clustering, characterized in that: It is equipped with an image classification model generated using the histopathological image classification method based on semantic relevance clustering as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Pathological image classification method based on semantic space attention

    CN116824204A

  • Histopathological image classification method based on depth class-sample double-layer cross-domain adaptation

    CN118154966A