A tumor analysis method based on pathological tissue images

By adopting image enhancement and contrast learning methods in pathological tissue image processing, combined with attention mechanism, extracting and fusion features from different levels, the problem of image feature information loss in the prior art is solved, and the accuracy of pathological image classification and the robustness of the model are improved.

CN119480151BActive Publication Date: 2025-05-20CHANGDE FIRST PEOPLES HOSPITAL
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411479344.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-05-20
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

The prior art is difficult to control the degree of processing in pathological tissue image processing, resulting in the loss of original information of image features, and it is difficult for the model to correctly identify important structures or details in the image, affecting classification performance.

Method used

Image enhancement and contrast learning methods are used to extract features from different levels, and by calculating the difference loss of strength enhancement, we ensure that the enhancement operation does not over-change the feature representation of the image, and prevent the model from over-fitting. At the same time, the attention mechanism extracts and fuses features from the feature maps of each layer of the teacher network to enhance the model's detailed capture ability of pathological images.

Benefits of technology

It improves the accuracy of the model in the pathological image classification task, improves the discriminant ability and robustness of the classification model, and ensures that features of different scales can effectively participate in the classification task.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119480151B_ABST
    Figure CN119480151B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of medical image processing, and specifically discloses a tumor analysis method based on pathological tissue images, which includes data collection and preprocessing, network construction, image enhancement, adjacent layer feature fusion, image classification and knowledge distillation. This scheme uses image enhancement and contrast learning methods to extract features from different levels, improves the model's ability to extract global features and capture local details, and calculates the difference loss between strong and weak enhancements to ensure that the enhancement operation does not excessively change the feature representation of the image, thereby preventing the model from overfitting; extracts and fuses features from the feature maps of each layer of the teacher network through an attention mechanism, and enhances the model's ability to capture details of pathological images; uses a knowledge distillation method, and by introducing the knowledge of the teacher network, the student network not only focuses on the classification of hard labels, but also captures the relative relationship between classes, thereby improving the accuracy of classification and reducing the model's computing resource requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image processing technology, and specifically refers to a tumor analysis method based on pathological tissue images. Background Technology

[0002] Pathological tissue image analysis is a key technology for cancer diagnosis. Cancer cells are round, oval, and in various irregular shapes, with different arrangements. Cancer cells and stroma show similar colors in pathological tissue images, showing complexity in both global and local features. General pathological tissue image processing methods have difficulty controlling the degree of processing, resulting in the loss of original information of image features, making it difficult for the model to correctly identify important structures or details in the image, thus affecting classification performance; general image classification models have insufficient representation capabilities for complex image structures, and cannot fully consider the weights and importance of features at different layers, resulting in the loss of key information; general network training methods rely only on real labels, especially when data is scarce, and are prone to overfitting. SUMMARY OF THE INVENTION

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a tumor analysis method based on pathological tissue images. In view of the problem that it is difficult to control the degree of processing in general pathological tissue image processing methods, resulting in the loss of original information of image features, making it difficult for the model to correctly identify important structures or details in the image, thereby affecting the classification performance, this solution adopts image enhancement and contrast learning methods to extract features from different levels, improve the model's ability to extract global features and capture local details, thereby improving the accuracy in pathological image classification tasks, and by calculating the difference loss between strong and weak enhancements, ensure that the enhancement operation does not excessively change the feature representation of the image, prevent the model from overfitting, and improve the discrimination ability and robustness of the classification model; in view of the general image classification model's ability to characterize complex image structures Insufficient, unable to fully consider the weights and importance of features at different layers, leading to the problem of key information loss. This solution extracts and fuses features from the feature maps of each layer of the teacher network through the attention mechanism, enhances the model's ability to capture details of pathological images, ensures that features of different scales can effectively participate in classification tasks, and provides more accurate multi-scale feature representations for subsequent classification; for the general network training method that only relies on real labels, especially in the case of scarce data, it is prone to overfitting. This solution uses the knowledge distillation method to introduce the knowledge of the teacher network. The student network not only focuses on the classification of hard labels, but also captures the relative relationship between classes, thereby improving the accuracy of classification. The calculation of the comprehensive loss function effectively improves the generalization ability of the student network and reduces the computing resource requirements of the model.

[0004] The technical solution adopted by the present invention is as follows: A tumor analysis method based on pathological tissue images provided by the present invention includes the following steps:

[0005] Step S1: Data collection and preprocessing. Obtain a dataset of pathological tissue images of labeled tumor tissues from a public database and perform normalization processing on the pathological tissue images;

[0006] Step S2: Network construction. Establish a teacher network and a student network based on a residual convolutional neural network. The teacher network is used to extract deep features of the image, and the student network is used to learn features;

[0007] Step S3: Image enhancement. Process the pathological tissue images using weak enhancement and strong enhancement, respectively extract local features and global features of the pathological tissue images, and establish a contrastive learning model for optimizing the teacher network;

[0008] Step S4: Feature fusion of adjacent layers. For the features extracted from different layers of the teacher network, use local and global attention mechanisms for fusion to generate a feature map containing multi-scale information;

[0009] Step S5: Image classification. The teacher network classifies the feature map to complete the analysis and classification process of the entire pathological image;

[0010] Step S6: Knowledge distillation. The student network learns the deep features extracted by the teacher network and conducts training. The trained student network is used to complete tumor category classification.

[0011] Further, in step S3, the image enhancement specifically includes the following steps:

[0012] Step S31: Perform strong enhancement operation on the pathological tissue image to highlight the overall distribution of cells and generate a strongly enhanced image;

[0013] Step S32: Perform weak enhancement operation on the pathological tissue image to highlight the cell shape and surrounding tissue structure and generate a weakly enhanced image;

[0014] Step S33: Extract strongly enhanced image features and weakly enhanced image features from the strongly enhanced image and the weakly enhanced image respectively. Take the enhanced image as the positive sample of the original image, minimize the distance between positive samples, take other category images as negative samples, maximize the distance between negative samples, and calculate the global feature loss and local feature loss;

[0015] Step S34: Calculate the strong-weak enhancement difference loss, minimize the feature distance between the strongly enhanced image and the weakly enhanced image and the original image, and retain sufficient feature information of the enhanced image;

[0016] Step S35: Calculate the total loss. The formula used is as follows:

[0017] ;

[0018] In the formula, represents the total loss function, represents the global feature loss function, represents the local feature loss function, represents the enhanced difference loss, represents the weight parameter for controlling different loss terms.

[0019] Furthermore, in step S4, the adjacent layer feature fusion specifically includes the following steps:

[0020] Step S41: Feature extraction. Input the strongly enhanced image and the weakly enhanced image into the teacher network, and extract the attention features from the output of each layer of the teacher network;

[0021] Step S42: Feature weighting. Use the local attention mechanism to model the correlation between the intra-layer feature maps of each layer, and generate the weighted output features of each layer;

[0022] Step S43: Self-attention feature fusion. Use the global self-attention mechanism to fuse the weighted output features of each layer to capture the detailed features;

[0023] Step S44: Feature enhancement. Dynamically adjust the weight of each feature, filter out redundant and noise information, and output the feature map that fuses multi-scale information.

[0024] Furthermore, in step S5, the image classification specifically includes the following steps:

[0025] Step S51: Global average pooling calculation. Use global average pooling to calculate the average value of all pixels in each feature map, and convert the high-dimensional feature map into a low-dimensional feature vector;

[0026] Step S52: Set up a fully connected layer. Input the low-dimensional feature vector into the fully connected layer to further learn the features of the image, and use a non-linear activation function to enhance the expression ability of the model;

[0027] Step S53: Add a classifier. Input the feature vector that has passed through the fully connected layer into the Softmax classifier, and output the probability of the tumor classification category;

[0028] Step S54: Model training. Train the teacher network based on the contrast learning model, adjust the model parameters through backpropagation, and minimize the total loss.

[0029] Furthermore, in step S6, the knowledge distillation specifically includes the following steps:

[0030] Step S61: The teacher network transfers knowledge to the student network, using the tumor classification category probabilities of the teacher network as soft labels, and the student network learns from the teacher network and the soft labels.

[0031] Step S62: Classification loss calculation. The student network classifies according to the true labels, and uses the cross-entropy loss function to calculate the difference between the prediction result and the true labels.

[0032] Step S63: Distillation loss. Calculate the difference between the output of the student network and the output of the teacher network as the distillation loss.

[0033] Step S64: Feature matching loss. Use the L2 loss to calculate the difference between the feature maps of the teacher network and the student network at a specific layer.

[0034] Step S65: Calculate the total loss function of the student network by integrating the above loss terms. The formula used is as follows:

[0035] ;

[0036] In the formula, represents the total loss function of the student network, represents the classification loss, represents the distillation loss, represents the feature matching loss, , and are weight parameters that control different loss terms;

[0037] Step S66: Iterative training. Use the backpropagation algorithm to calculate the gradients of all loss functions in the student network with respect to their parameters, and update the weights of the student network through an optimization algorithm. Use the trained student network to classify newly input pathological tissue images.

[0038] The beneficial effects achieved by the present invention using the above solution are as follows:

[0039] (1) Aiming at the problem that general pathological tissue image processing methods are difficult to control the processing degree, resulting in the loss of the original information of image features, making it difficult for the model to correctly identify important structures or details in the image, thus affecting the classification performance. This solution uses image enhancement and contrast learning methods to extract features from different levels, improving the model's ability to extract global features and capture local details, thereby improving the accuracy in pathological image classification tasks. By calculating the strong-weak enhancement difference loss, it ensures that the enhancement operation will not overly change the feature representation of the image, preventing the model from overfitting and enhancing the discriminative ability and robustness of the classification model.

[0040] (2)Regarding the problem that general image classification models have insufficient ability to represent complex image structures, cannot fully consider the weights and importance of features at different layers, resulting in the loss of key information, this solution extracts and fuses features from the feature maps of each layer of the teacher network through an attention mechanism, enhances the model's ability to capture details of pathological images, ensures that features at different scales can effectively participate in the classification task, and provides a more accurate multi-scale feature representation for subsequent classification.

[0041] (3)Regarding the problem that general network training methods only rely on true labels, especially in the case of scarce data, it is prone to overfitting. This solution uses the knowledge distillation method. By introducing the knowledge of the teacher network, the student network not only focuses on the classification of hard labels but also can capture the relative relationships between classes, thereby improving the classification accuracy. Calculating the comprehensive loss function effectively improves the generalization ability of the student network and reduces the computational resource requirements of the model. Brief Description of the Drawings

[0042] Figure 1 is a schematic flowchart of a tumor analysis method based on pathological tissue images proposed by the present invention;

[0043] Figure 2 is a schematic diagram of the method for constructing a student network proposed by the present invention.

[0044] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, but do not constitute a limitation to the present invention. Detailed Embodiments

[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0046] Embodiment 1. Refer to Figure 1 , a tumor analysis method based on pathological tissue images provided by the present invention, the method includes the following steps:

[0047] Step S1: Data collection and preprocessing. Obtain a dataset of pathological tissue images of labeled tumor tissues from a public database, perform normalization processing on the pathological tissue images, and unify the size of the pathological tissue images to 256×256;

[0048] Step S2: Network construction. Based on the residual convolutional neural network, establish a teacher network and a student network. The teacher network is used to extract deep features of the image, and the student network is used to learn features;

[0049] Step S3: Image enhancement. Weak enhancement and strong enhancement are used to process the pathological tissue image, respectively extracting the local features and global features of the pathological tissue image, and a contrastive learning model is established to optimize the teacher network;

[0050] Step S4: Adjacent layer feature fusion. For the features extracted from different layers of the teacher network, local and global attention mechanisms are used for fusion to generate the final features containing multi-scale information;

[0051] Step S5: Image classification. The teacher network classifies the feature map to complete the analysis and classification process of the entire pathological image;

[0052] Step S6: Knowledge distillation. The student network learns the deep features extracted by the teacher network and is trained, and the trained student network is used to complete the tumor category classification.

[0053] Example two, refer to Figure 1 and Figure 2 , based on the above example, in step S2, network construction specifically includes the following steps:

[0054] Step S21: Use the deep ResNet50 model to construct the teacher network. The input layer inputs a pathological tissue image with a size of 256×256, constructs 4 convolutional layers, each convolutional layer extracts multi-scale features, adds a ReLU activation function and a pooling layer, and retains the output features of each layer;

[0055] Step S22: Use the lightweight ResNet18 model to construct the student network. Each layer of the student network learns the features from the corresponding layer of the teacher network, imitates the feature extraction ability of the teacher network, and constructs the same convolutional layer and pooling layer structure as the teacher network.

[0056] Example three, refer to Figure 1 and Figure 2 , based on the above example, in step S3, image enhancement specifically includes the following steps:

[0057] Step S31: Perform strong enhancement operations on the pathological tissue image, highlighting the overall cell distribution through rotation, large-scale cropping, and color perturbation to generate a strongly enhanced image;

[0058] Step S32: Perform translation and mild noise addition operations on the pathological tissue image to highlight the cell shape and surrounding tissue structure to generate a weakly enhanced image;

[0059] Step S33: Extract strong enhanced image features and weak enhanced image features from the strongly enhanced image and the weakly enhanced image respectively. Take the enhanced images as positive samples of the original image, minimize the distance between positive samples, take other category images as negative samples, maximize the distance between negative samples, and calculate the global feature loss and the local feature loss. The specific steps are as follows:

[0060] Step S331: Use cosine similarity to compare the original image features and the strongly enhanced image features;

[0061] Step S332: Calculate the global feature loss function, and the formula used is as follows:

[0062] L G =-log exp(sim( Z x , Z s ) / τ) ∑ k=1 2N δ[k≠i]exp(sim( Z x , Z k ) / τ ) ;

[0063] In the formula, represents the global feature loss function, represents the weak enhanced image features, represents the original image features, represents the strongly enhanced image features, represents the other category image features, represents the parameter used to adjust the sensitivity of the model to the similarity distribution, δ[k≠i] represents at when calculating the indicator function of negative samples, represents the cosine similarity, is the number of samples in a batch, represents the traversal variable of samples, represents the index of the current sample;

[0064] Step S333: Use cosine similarity to compare the original image features and the strongly enhanced image features;

[0065] Step S334: Calculate the local feature loss function, and the formula used is as follows:

[0066] L W =-log exp(sim( Z x , Z w ) / τ) ∑ k=1 2N δ[k≠i]exp(sim( Z x , Z k ) / τ ) ;

[0067] In the formula, represents the local feature loss function, represents the weak enhanced image features;

[0068] Step S34: Calculate the strong and weak enhancement difference loss, minimize the feature distance between the strongly enhanced image and the weakly enhanced image and the original image, and retain sufficient feature information of the enhanced image. The formula used is as follows:

[0069] ;

[0070] In the formula, represents the enhanced difference loss, represents the strongly enhanced image, represents the weakly enhanced image, represents the original image, represents the Euclidean distance, represents the feature extraction function of the image, represents the L2 norm;

[0071] Step S35: Total loss calculation, and the formula used is as follows:

[0072] ;

[0073] In the formula, represents the total loss function, represents the weight parameter that controls different loss terms.

[0074] By performing the above operations, for the problem that it is difficult to control the processing degree in the general pathological tissue image processing method, resulting in the loss of the original information of the image features, making it difficult for the model to correctly identify the important structures or details in the image, thus affecting the classification performance, this solution uses the image enhancement and contrast learning methods to extract features from different levels, improves the ability of the model to extract global features and capture local details, thereby improving the accuracy in the pathological image classification task. By calculating the strong-weak enhancement difference loss, it ensures that the enhancement operation will not overly change the feature representation of the image, prevents the model from overfitting, and enhances the discriminative ability and robustness of the classification model.

[0075] Example 4, refer to Figure 1 and Figure 2 , based on the above example, in step S4, the adjacent layer feature fusion specifically includes the following steps:

[0076] Step S41: Feature extraction, input the strongly enhanced image and the weakly enhanced image into the teacher network, and extract the attention features from the outputs of each layer of the teacher network;

[0077] Step S42: Feature weighting, use the local attention mechanism to model the correlation between the intra-layer feature maps of each layer, and generate the weighted output features of each layer. The specific steps are as follows:

[0078] Step S421: Data generation, generate query values, key values, and output values for the feature maps of each layer respectively;

[0079] Step S422: Attention weight calculation. Calculate the similarity between each query value and all keys using the dot product operation, and use the softmax function to convert the result of the dot product operation into a probability distribution to measure the importance of each key. The formula used is as follows:

[0080] ;

[0081] In the formula, represents the target query value, represents the reference key value, represents the final selected output value after the target query value and the reference key value are matched, represents the attention weight, represents the vector dimension of the reference key value, represents the normalization function, represents the normalization operation;

[0082] Step S423: Weighted output. Select the most relevant key value according to the similarity, apply the attention weight to the output value, and generate a weighted output feature;

[0083] Step S43: Self-attention feature fusion. Use the global self-attention mechanism to fuse the weighted output features of each layer to capture detailed features. The specific steps are as follows:

[0084] Step S431: Data generation. Generate query values, key values, and output values for the feature maps of each layer respectively;

[0085] Step S432: Attention weight calculation. Calculate the similarity between each query value and all keys, and use the softmax function to normalize the similarity to obtain the attention weight;

[0086] Step S433: Feature fusion. Perform weighted fusion on the feature maps of different layers to obtain multi-scale context information from different layers;

[0087] Step S44: Feature enhancement. Dynamically adjust the weight of each feature, filter redundant and noise information, and output a feature map that fuses multi-scale information.

[0088] By performing the above operations, for the problem that the general image classification model has insufficient representation ability for the complex structure of the image, cannot fully consider the weights and importance of features in different layers, and causes the loss of key information, this solution extracts and fuses features from the feature maps of each layer of the teacher network through the attention mechanism, enhances the model's ability to capture details of pathological images, ensures that features at different scales can effectively participate in the classification task, and provides a more accurate multi-scale feature representation for subsequent classification.

[0089] Example Five. Refer to Figure 1 andFigure 2 , based on the above embodiment, in step S5, image classification specifically includes the following steps:

[0090] Step S51: Global average pooling calculation. Use global average pooling to calculate the average value of all pixels in each feature map, and convert the high-dimensional feature map into a low-dimensional feature vector.

[0091] Step S52: Set up a fully connected layer. Input the low-dimensional feature vector into the fully connected layer to further learn the features of the image, and use a non-linear activation function to enhance the expression ability of the model.

[0092] Step S53: Add a classifier. Input the feature vector after passing through the fully connected layer into the Softmax classifier to output the probability of the tumor classification category.

[0093] Step S54: Model training. Based on the contrastive learning model, train the teacher network, and adjust the model parameters through backpropagation to minimize the total loss.

[0094] Embodiment Six. Refer to Figure 1 and Figure 2 , based on the above embodiment, in step S6, knowledge distillation specifically includes the following steps:

[0095] Step S61: Knowledge transfer from the teacher network to the student network. Use the probability of the tumor classification category of the teacher network as the soft label, and the student network learns the teacher network and the soft label.

[0096] Step S62: Classification loss calculation. The student network classifies according to the true label, and uses the cross-entropy loss function to calculate the difference between the prediction result and the true label, denoted as ;

[0097] Step S63: Distillation loss. Calculate the difference between the output of the student network and the output of the teacher network as the distillation loss. The formula used is as follows:

[0098] ;

[0099] In the formula, represents the distillation loss, is the output of the teacher network, is the output of the student network, is the parameter for adjusting the smoothness of the probability distribution;

[0100] Step S64: Feature matching loss. Use the L2 loss to calculate the difference between the feature maps of the teacher network and the student network at a specific level. The formula used is as follows:

[0101] ;

[0102] In the formula, represents the feature matching loss, and respectively represent the feature maps of the th layer of the teacher network and the student network, represents the L2 distance;

[0103] Step S65: Calculate the total loss function of the student network by combining the above loss terms. The formula used is as follows:

[0104] ;

[0105] In the formula, represents the total loss function of the student network, , and are weight parameters for controlling different loss terms;

[0106] Step S66: Iterative training. Use the backpropagation algorithm to calculate the gradients of all loss functions in the student network with respect to their parameters, and update the weights of the student network through an optimization algorithm. Use the trained student network to classify newly input pathological tissue images.

[0107] By performing the above operations, for the general network training method that only depends on the true labels, especially in the case of scarce data, the problem of overfitting is likely to occur. In this solution, the knowledge distillation method is used. By introducing the knowledge of the teacher network, the student network not only focuses on the classification of hard labels but also can capture the relative relationships between classes, thereby improving the classification accuracy. Calculating the comprehensive loss function effectively improves the generalization ability of the student network and reduces the computational resource requirements of the model.

[0108] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.

[0109] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

[0110] The above describes the present invention and its embodiments. Such description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In summary, if those of ordinary skill in the art are inspired by it and, without departing from the spirit of the present invention, design similar structural modes and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.

Claims

1. A tumor analysis method based on pathological tissue images, characterized in that: The method comprises the following steps: Step S1: data collection and preprocessing, obtaining a dataset of annotated pathological tissue images of tumor tissue from a public database, and normalizing the pathological tissue images; Step S2: Network construction: a teacher network and a student network are established based on a residual convolutional neural network. The teacher network is used to extract deep features of the image, and the student network is used to learn features. Step S3: Image enhancement, using weak enhancement and strong enhancement to process the pathological tissue image, extracting the local features and global features of the pathological tissue image respectively, and establishing a contrastive learning model for optimizing the teacher network, specifically including the following steps: Step S31: applying a strong enhancement operation to the pathological tissue image to highlight the overall distribution of cells and generate a strong enhanced image; Step S32: performing a weak enhancement operation on the pathological tissue image to highlight the cell shape and surrounding tissue structure, thereby generating a weakly enhanced image; Step S33: extracting strong enhanced image features and weak enhanced image features from the strong enhanced image and the weak enhanced image respectively, taking the enhanced image as a positive sample of the original image, minimizing the distance between positive samples, taking other category images as negative samples, maximizing the distance between negative samples, and calculating global feature loss and local feature loss; Step S34: strong and weak enhancement difference loss calculation, minimizing the feature distance between the strong enhanced image and the weak enhanced image and the original image, and retaining sufficient feature information of the enhanced image; Step S35: Calculate the total loss using the following formula: ; In the formula, represents the total loss function, represents the global feature loss function, represents the local feature loss function, represents the enhanced difference loss, Represents the weight parameters that control different loss terms; Step S4: Adjacent layer feature fusion, the features extracted from different layers of the teacher network are fused using local and global attention mechanisms to generate a feature map containing multi-scale information; Step S5: Image classification, the teacher network classifies the feature map and completes the entire pathological image analysis and classification process; Step S6: Knowledge distillation: the student network learns the deep features extracted by the teacher network and is trained. The trained student network is used to complete tumor category classification.

2. The tumor analysis method based on pathological tissue images according to claim 1, characterized in that: In step S4, the adjacent layer features are fused, specifically including the following steps: Step S41: feature extraction, inputting the strongly enhanced image and the weakly enhanced image into the teacher network, and extracting attention features from each layer output of the teacher network; Step S42: feature weighting, using the local attention mechanism to model the correlation between feature maps in each layer and generate weighted output features of each layer; Step S43: self-attention feature fusion, using the global self-attention mechanism to fuse the weighted output features of each layer to capture detail features; Step S44: Feature enhancement, dynamically adjust the weight of each feature, filter redundant and noisy information, and output a feature map that integrates multi-scale information.

3. The tumor analysis method based on pathological tissue images according to claim 2, characterized in that: In step S5, the image classification specifically includes the following steps: Step S51: global average pooling calculation, using global average pooling to calculate the average value of all pixels in each feature map, and converting the high-dimensional feature map into a low-dimensional feature vector; Step S52: setting a fully connected layer, inputting the low-dimensional feature vector into the fully connected layer, further learning the features of the image, and using a nonlinear activation function to enhance the expression ability of the model; Step S53: adding a classifier, inputting the feature vector after the fully connected layer into the Softmax classifier, and outputting the probability of tumor classification; Step S54: Model training, training the teacher network based on the contrastive learning model, adjusting the model parameters through back propagation to minimize the total loss.

4. The tumor analysis method based on pathological tissue images according to claim 3 is characterized in that: In step S6, the knowledge distillation specifically includes the following steps: Step S61: the teacher network transfers knowledge to the student network, using the tumor classification probability of the teacher network as a soft label, and the student network learns the teacher network and the soft label; Step S62: Classification loss calculation, the student network classifies according to the true label, and uses the cross entropy loss function to calculate the difference between the predicted result and the true label; Step S63: Distillation loss, calculating the difference between the student network output and the teacher network output as the distillation loss; Step S64: feature matching loss, using L2 loss to calculate the difference between the feature maps of the teacher network and the student network at a specific level; Step S65: The total loss function of the student network is calculated by combining the above loss items. The formula used is as follows: ; In the formula, represents the total loss function of the student network, represents the classification loss, represents the distillation loss, represents the feature matching loss, , and is the weight parameter that controls different loss terms; Step S66: Iterative training, using the back propagation algorithm to calculate the gradients of all loss functions in the student network relative to its parameters, and updating the weights of the student network through the optimization algorithm, and using the trained student network to classify the newly input pathological tissue images.

Citation Information

Patent Citations

  • Small sample image classification method based on improved CNN

    CN113159159A

  • Pathological image representation learning method based on feature sampling, medium and equipment

    CN117557855A

  • Pain intensity estimation method based on knowledge distillation

    CN118781644A