A feature extraction model training method, a task processing method, a device, and a medium

By analyzing the stability of feature extraction in the master-auxiliary model and generating pseudo-labels, the problem of reduced model training accuracy caused by manual annotation was solved, thereby improving the model's training accuracy and feature extraction capability.

CN121010854BActive Publication Date: 2026-01-27SHENZHEN ZHENHE ZHIZAO BIOTECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511536584.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-27
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

In existing technologies, the training accuracy of feature extraction models is reduced due to the professional knowledge and subjective differences in manually labeled features.

Method used

The main model and auxiliary model are used to extract features from the sample images respectively. The stability of feature extraction is determined by clustering calculation and conditional entropy analysis. The training termination condition is constructed, the model is trained iteratively and synchronously, and feature pseudo-labels are generated to replace manually labeled feature labels, and the main model is trained again.

Benefits of technology

It improves model training accuracy, reduces reliance on manual annotation, generates pseudo-feature labels that are closer to the real feature labels, and enhances the model's feature extraction capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010854B_ABST
    Figure CN121010854B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, in particular to a feature extraction model training method, a task processing method, equipment and a medium. The present application replaces the manually labeled feature label with a feature pseudo label, which can avoid the difference of the manually labeled feature label, and the feature pseudo label is generated based on the features extracted by two pre-training models with feature extraction capability, so that the feature pseudo label is closer to the real feature label of the sample image. Therefore, the present application uses the feature pseudo label to train the main model, which can improve the model training precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a feature extraction model training method, task processing method, device, and medium. Background Technology

[0002] During feature extraction model training, an image is input into the model, which outputs the image's features. The model's loss function is calculated based on these output features and the image's true feature labels. The model parameters are then updated based on this loss function to complete training. However, true feature labels require manual annotation. Manual annotation, due to differences in the annotators' professional knowledge and subjectivity, can result in different annotators labeling the same image differently, leading to inconsistencies in the labeled features and consequently reducing the model's training accuracy.

[0003] In summary, existing technologies have reduced the accuracy of model training.

[0004] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a feature extraction model training method, task processing method, device, and medium, which solves the problem of reduced model training accuracy in existing technologies.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for training a feature extraction model, comprising:

[0008] A first feature of the sample image is extracted using a main model, a second feature of the sample image is extracted using an auxiliary model, and the feature extraction stability of the main model relative to the auxiliary model is determined based on the first feature and the second feature.

[0009] The training termination condition is constructed based on the stability of the feature extraction, and the main model and the auxiliary model are trained iteratively and synchronously to obtain the pre-trained main model and the pre-trained auxiliary model.

[0010] The pre-trained main model is used to extract features from the sample image again to obtain a first new feature. The pre-trained auxiliary model is used to extract features from the sample image again to obtain a second new feature. Based on the first new feature and the second new feature, a feature pseudo-label for the sample image is obtained. Based on the feature pseudo-label, the pre-trained main model is trained again to obtain a feature extraction model.

[0011] In one implementation, determining the feature extraction stability of the main model relative to the auxiliary model based on the first feature and the second feature includes:

[0012] Clustering calculation is performed on the first feature to obtain the first clustering result;

[0013] Clustering calculations are performed on the second feature to obtain the second clustering result;

[0014] Based on the first clustering result and the second clustering result, the probability that the clusters of the first clustering result are cross-assigned by the auxiliary model is determined, and denoted as the cross-assignment probability;

[0015] Based on the cross-assignment probability, determine the conditional entropy corresponding to the cluster of the first clustering result;

[0016] Based on the conditional entropy, the feature extraction stability of the main model relative to the auxiliary model is determined.

[0017] In one implementation, determining the probability that the clusters of the first clustering result are cross-assigned by the auxiliary model based on the first clustering result and the second clustering result includes:

[0018] Images corresponding to the same cluster contained in the first clustering result are selected from the sample images and denoted as images of the same cluster;

[0019] Based on the differences between the same cluster contained in the first clustering result and the cluster corresponding to the same cluster image in the second clustering result, the probability that the clusters of the first clustering result are cross-assigned by the auxiliary model is obtained.

[0020] In one implementation, based on the first new feature and the second new feature, a feature pseudo-label for the sample image is obtained, including:

[0021] Clustering calculations are performed on the first new feature and the second new feature respectively;

[0022] Based on the clustering results of the first new feature and the clustering results of the second new feature, the conditional entropy of each cluster contained in the clustering results of the first new feature is obtained.

[0023] Based on the conditional entropy of each cluster corresponding to the first new feature, each cluster is filtered, and the filtered clusters are used as feature pseudo-labels.

[0024] In one implementation, the conditional entropy of the selected clusters is less than that of the unselected clusters.

[0025] In one implementation, the total loss function of the master model after pre-training is obtained by weighted calculation of the cross-entropy loss function, the Mahalanobis contrastive loss function, and the regularization term.

[0026] Secondly, embodiments of the present invention also provide a task processing method, comprising:

[0027] Using the sample pathological image as the sample image, and based on the sample image and the feature extraction model training method described above, the feature extraction model is obtained;

[0028] The feature extraction model is applied to the measured pathological images to extract the pathological features of the measured pathological images;

[0029] Based on the aforementioned pathological characteristics, downstream tasks are processed.

[0030] In one implementation, the downstream tasks include disease classification tasks, disease risk prediction tasks, or similar pathology query tasks.

[0031] Thirdly, embodiments of the present invention also provide a terminal device, wherein the terminal device includes a memory, a processor, and a feature extraction model training program stored in the memory and executable on the processor, wherein when the processor executes the feature extraction model training program, it implements the steps of the feature extraction model training method described above.

[0032] Alternatively, the terminal device includes a memory, a processor, and a task processing program stored in the memory and executable on the processor. When the processor executes the task processing program, it implements the steps of the task processing method described above.

[0033] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a feature extraction model training program, wherein when the feature extraction model training program is executed by a processor, the steps of the feature extraction model training method described above are implemented.

[0034] Alternatively, the computer-readable storage medium stores a task processing program, which, when executed by a processor, implements the steps of the task processing method described above.

[0035] Beneficial Effects: This invention employs a main model and an auxiliary model to extract the first and second features of a sample image, respectively. Based on these two features, the stability of feature extraction by the two models is calculated. Stability represents whether the two models can reliably extract the same features from the same sample image. Stability serves as the termination condition for iterative training of the two models. High stability indicates that the two models can extract the same features from the same sample image, demonstrating that both models possess a certain feature extraction capability, thus completing the pre-training of the two models. The two pre-trained models are then applied again to the sample image to obtain two new features. Based on these two new features, pseudo-labels for the sample image are generated. Finally, the pre-trained main model is trained again based on these pseudo-labels to obtain the feature extraction model. Because this invention uses pseudo-labels instead of manually labeled feature labels, it avoids the inconsistencies of manually labeled feature labels. Furthermore, the pseudo-labels are generated based on features extracted by the two pre-trained models with feature extraction capabilities, making them closer to the true feature labels of the sample image. Therefore, this invention uses pseudo-labels to train the main model, improving the model training accuracy. Attached Figure Description

[0036] Figure 1 This is an overall flowchart of the present invention;

[0037] Figure 2 The model training flowchart provided by this invention;

[0038] Figure 3 This is a block diagram illustrating the internal structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation

[0039] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0040] Research has shown that during feature extraction model training, an image is input into the model, which outputs the image's features. The model's loss function is calculated based on these output features and the image's true feature labels. The model parameters are then updated based on this loss function to complete training. However, true feature labels require manual annotation. Manual annotation, due to differences in the annotators' professional knowledge and subjective biases, can result in different annotators labeling the same image differently, leading to inconsistencies in the labeled features and consequently reducing the model's training accuracy.

[0041] To address the aforementioned technical problems, this invention provides a feature extraction model training method, task processing method, device, and medium, which solves the problem of reduced model training accuracy in existing technologies.

[0042] Example 1: This example provides a method for training a feature extraction model. In this example, as... Figure 1 As shown, the feature extraction model training method specifically includes the following steps:

[0043] S100, the main model is used to extract the first feature of the sample image, the auxiliary model is used to extract the second feature of the sample image, and based on the first feature and the second feature, the feature extraction stability of the main model relative to the auxiliary model is determined;

[0044] S200, construct training termination conditions based on the feature extraction stability, iteratively train the main model and the auxiliary model simultaneously, and obtain the pre-trained main model and the pre-trained auxiliary model;

[0045] S300, the pre-trained main model is used to extract features from the sample image again to obtain a first new feature. The pre-trained auxiliary model is used to extract features from the sample image again to obtain a second new feature. Based on the first new feature and the second new feature, a feature pseudo-label for the sample image is obtained. Based on the feature pseudo-label, the pre-trained main model is trained again to obtain a feature extraction model.

[0046] The purpose of steps S100, S200, and S300 is to train the main model. After training, the main model becomes a feature extraction model, which extracts features from the image. Since training the main model requires feature labels from sample images, the loss function value for each iteration of training is calculated based on the feature labels and the features extracted from the sample images by the main model. This loss function value is then used to update the parameters of the main model, ultimately achieving the training of the main model. However, training requires a large number of sample images and feature labels, and manually labeling feature labels is limited by the efficiency and accuracy of manual labeling. Therefore, this embodiment uses steps S100, S200, and S300 to generate pseudo-feature labels that approximate the real features to replace manually labeled feature labels. The specific process of generating feature pseudo-labels in this embodiment is as follows: The main model and the auxiliary model (the auxiliary model is the model used to assist in training the main model) are trained synchronously using the same sample image. That is, both the main model and the auxiliary model extract features from the same sample image. The features extracted by the two models are analyzed. If the analysis results (analysis results, i.e., stability) indicate that the two models can extract exactly the same or nearly the same features from the same sample image, then it means that both models have a certain ability to extract image features. At this time, the two models are the pre-trained models. Otherwise, the two models need to be trained until the analysis results indicate that the two models can extract exactly the same or nearly the same features from the same sample image. At this time, the two models are the pre-trained models.

[0047] The aforementioned auxiliary model is used to supervise the training of the main model to complete pre-training. The main model is then trained further based on the pre-trained model parameters, meaning iterative training continues to update the model parameters using the parameters obtained from the pre-training. While the main model is being trained, the parameters of the auxiliary model remain unchanged. The process of continuing to train the main model is as follows: New features are extracted from the sample images again using both pre-trained models. Since the accuracy of the pre-trained models is higher than that before pre-training, the two new features are different from the features extracted by the models before pre-training. In other words, the new features are closer to the true features of the sample images. Therefore, these two new features can be used to generate pseudo-labels. Based on these pseudo-labels, the pre-trained main model is then trained again to obtain the feature extraction model.

[0048] In this embodiment, such as Figure 2As shown, the main model is a ResNet50 with the classification layer removed. ResNet50 represents a deep convolutional neural network model with 50 convolutional layers. The main model can also be other neural network models. The auxiliary model is a DenseNet121 with the classification layer removed. DenseNet121 represents a deep convolutional neural network with 121 network layers. The auxiliary model can also be other neural network models. Before executing steps S100, S200, and S300, both the auxiliary model and the main model are models that have undergone preliminary training using ImageNet, which represents an image database.

[0049] In this embodiment, the entire pathological image of a local human tissue is divided into several pathological image slices, represented by "patch". Each pathological image slice is a sample image. Representing the Sample images.

[0050] High-dimensional feature vectors of the sample images are extracted using forward propagation of ResNet50 and DenseNet121 respectively.

[0051] ;

[0052] ;

[0053] The representative uses forward propagation (forward propagation is...) ResNet50, using Representing ResNet50, The representative is the first one extracted using ResNet50. High-dimensional feature vectors of each sample image; The representative uses forward propagation (forward propagation is...) Densenet121, using Representing Densenet121, The representative is the first one extracted using Densenet121. High-dimensional feature vectors of sample images. Using... Denotes the feature set, where Representing the feature dimension, the high-dimensional feature vector extracted by ResNet50 has a dimension of 2048.

[0054] right and Dimensionality reduction was performed separately, using Represents the state after dimensional reduction ,use Represents the state after dimensional reduction :

[0055] ;

[0056] ;

[0057] In the formula, represent The mean vector, represent The mean vector. The dimension after dimensionality reduction represents the feature. It can be 256, which is the dimension corresponding to retaining 95% of the variance. The projection matrix representing principal component analysis (PCA). represent The transpose matrix, using This represents the transpose of a matrix. The column vector is formed by the column vector with the largest variance. It consists of principal components (or eigenvectors).

[0058] right and Normalization is performed separately. This embodiment will normalize the data. As the first feature After normalization As a second feature .

[0059] ;

[0060] ;

[0061] In the formula, It represents the L2 norm.

[0062] In this embodiment, step S100, which determines the feature extraction stability of the main model relative to the auxiliary model based on the first feature and the second feature, includes the following specific steps S101, S102, S103, S104, S105, and S106:

[0063] S101, perform clustering calculation on the first feature to obtain the first clustering result.

[0064] S102, perform clustering calculation on the second feature to obtain the second clustering result.

[0065] The clustering methods in steps S101 and S102 are the same: first, initial cluster centers are set, and then the initial cluster centers are iteratively optimized until the optimization termination condition is met. The optimization termination condition includes the change in cluster centers being less than a threshold (the threshold can be...). , If the base of the natural logarithm is reached or the maximum number of iterations (e.g., 100 times) is reached, the final cluster centers are obtained, and the first clustering result of the first feature and the second clustering result of the second feature are calculated using the final cluster centers.

[0066] use ( This refers to an unsupervised learning algorithm used to divide a dataset into several clusters. The algorithm selects initial cluster centers using... Representing the Initial cluster centers, iterative optimization At that time, the normalized features of each sample image are assigned to the nearest cluster center, using Represents the nearest cluster center.

[0067] ;

[0068] Represents the first after normalization One characteristic, include and .

[0069] Iterative optimization ,use Represents the updated version after iterative optimization. : .exist Continue iterative optimization based on the existing foundation The optimization process continues until the termination condition is met, at which point the final optimized cluster centers are obtained.

[0070] This embodiment also uses an objective function to obtain the final optimized cluster centers. The objective function is:

[0071] ;

[0072] In the formula, This represents the number of cluster centers.

[0073] Using the above-described method for optimizing cluster centers, we can obtain the first clustering results based on the first feature obtained from ResNet50. and the second clustering results based on the second feature obtained from Densenet121 . , ,in This represents the cluster corresponding to the first feature of the first sample image extracted by ResNet50. This represents the cluster corresponding to the first feature of the Kth sample image extracted by ResNet50. The cluster corresponding to the second feature of the first sample image extracted by Densenet121. The first one extracted from Densenet121 The cluster corresponding to the second feature of each sample image.

[0074] S103, Select images corresponding to the same cluster contained in the first clustering result from the sample images, and denot them as images of the same cluster.

[0075] S104. Based on the difference between the same cluster contained in the first clustering result and the cluster corresponding to the same cluster image in the second clustering result, the probability that the clusters of the first clustering result are cross-assigned by the auxiliary model is obtained, and this probability is recorded as the cross-assignment probability.

[0076] Steps S103 and S104 are based on the following formula to obtain the crossover probability. :

[0077] ;

[0078] In the formula, represent ( That is, the first clustering result) in the first clustering result Cluster The corresponding sample image The auxiliary model (represented by B, Densenet121) is assigned to The first in Each cluster was assigned to a specific group by the auxiliary model. The first in The cluster, which is the auxiliary model extracting the first... Cluster The second feature of the corresponding sample image, and the cluster corresponding to this second feature is The first in Each cluster, using Representative sample image The second feature corresponding to The first in Clusters (i.e., sample images) Hard-assigned class labels in the auxiliary model , The second feature extracted from the sample image by the auxiliary model (represented by B, Densenet121) forms the third... There are 1 cluster center. The first in Clusters and The first in Cluster They are different clusters (different clusters mean that there are differences between clusters), the first Cluster The corresponding sample images are the same cluster images.

[0079] S105, Based on the cross-assignment probability, determine the conditional entropy corresponding to the cluster of the first clustering result. :

[0080] ;

[0081] S106, Based on the conditional entropy, determine the feature extraction stability of the main model relative to the auxiliary model.

[0082] A higher conditional entropy indicates a higher stability in feature extraction between the main model and the auxiliary model, and vice versa. The relative stability between two models indicates whether they can extract the same features from the same sample image.

[0083] In this embodiment, step S200 constructs a training termination condition based on feature extraction stability, iteratively and synchronously training the main model and the auxiliary model to obtain pre-trained main model and pre-trained auxiliary model. That is, using conditional entropy... Construct a training termination condition when the conditional entropy... When the threshold is lower than the set threshold, it means that the main model and the auxiliary model can extract the same features from the same sample image, and the pre-training of the two models is completed.

[0084] In this embodiment, step S300, which obtains the feature pseudo-label of the sample image based on the first new feature and the second new feature, includes the following specific steps S301, S302, and S303:

[0085] S301, perform clustering calculations on the first new feature and the second new feature respectively.

[0086] The clustering calculation in step S301 is the same as that in step S101, and will not be described again here.

[0087] S302, based on the clustering results of the first new feature and the clustering results of the second new feature, obtain the conditional entropy of each cluster included in the clustering results of the first new feature.

[0088] The method for calculating the conditional entropy in step S302 is the same as that in step S105, and will not be described again here.

[0089] S303, based on the conditional entropy of each cluster corresponding to the first new feature, each cluster is filtered, and the filtered clusters are used as feature pseudo-labels.

[0090] This involves arranging the conditional entropies of each cluster in descending order to obtain a sequence of conditional entropies. The clusters corresponding to the last 50% of the conditional entropies in the sequence are then selected as pseudo-labels. Alternatively, this embodiment can use a threshold to select conditional entropies below a certain threshold, and the clusters corresponding to these selected conditional entropies are then used as pseudo-labels.

[0091] This embodiment continues to train the pre-trained main model based on the feature pseudo-labels to obtain the feature extraction model, and then continues training using the total loss function. :

[0092] ;

[0093] In the formula, Represents the cross-entropy loss function. Represents the Markov contrastive loss function. Represents the regularization term. The weights of the cross-entropy loss function, The weights of the Markov contrastive loss function are... The weight of the regularization term.

[0094] ;

[0095] ;

[0096] In the formula, N represents the number of sample images. Representing the The pseudo-labels of the features of each sample image These represent the features of the sample images predicted by the main model after pre-training. The number of representative features, Represents the indicator function, that is, when equal hour, The value is 1, when Not equal to hour, The value is 0. Represents the normalized probability. The output of the classification layer, representing the last layer of the main model. Features of a sample image The score (this score is the logit score, where logit represents the raw score, which is the current technique in deep learning). represent The index value.

[0097] ;

[0098] In the formula, The set representing the clustered sample pairs, The set representing heterogeneous sample pairs. This represents one of the features corresponding to a pair of samples in the same cluster. This represents another feature corresponding to a pair of samples in the same cluster. Another characteristic representing heterogeneous sample pairs, , , Used to label three different features. The difference between representative features (that is, the distance). Hyperparameters representing distance intervals.

[0099] ;

[0100] This represents the Mahalanobis distance matrix constructed based on the feature pseudo-labels and the features output by the main model. Represents the identity matrix. Represents the Frobenius norm, also known as the Frobenius norm (using Frobenius). (Represents Freudian norm) represent Located in the middle Line 1 The elements of the column.

[0101] Example 2, based on Example 1, uses the predicted features extracted by the feature extraction model in Example 1 to train a classifier for a downstream task. This classifier is a lightweight classifier, which can be a multilayer perceptron (MLP). During classifier training, the parameters of the feature extraction model are frozen or fine-tuned, and the parameters of the classifier are updated. That is, the predicted features output by the feature extraction model are input into the classifier to obtain the classification result output by the classifier. The parameters of the classifier are then updated based on this classification result to achieve classifier training.

[0102] Example 3, based on Example 2, replaces the sample images in Example 1 with sample pathological images. The same training method as in Example 1 is used to train the main model based on the sample pathological images, so that the trained feature extraction model is suitable for extracting features from pathological images. This example applies the feature extraction model to measured pathological images to extract their pathological features; based on these pathological features, downstream tasks are processed.

[0103] use The representative feature extraction model starts from the first Pathological features extracted from actual pathological images, classification results :

[0104] ;

[0105] In the formula, Representative parameters are The classifier.

[0106] Based on pathological characteristics The following disease risk prediction tasks are to be handled:

[0107] ;

[0108] Representative parameters are The disease risk prediction network can be a proportional hazards model. Where... Represents time, Representative standard individual in time The probability of disease at that time, where the standard individual is an individual who is currently known not to have the disease. The value is a set constant. For based on The predicted individual in time The probability of developing the disease at that time.

[0109] Based on pathological characteristics Processing similar pathology query tasks: , The representative feature extraction model differs from the first Features extracted from other measured pathological images on a measured pathological image, using This represents other measured pathological images. represent and The similarity.

[0110] In summary, this invention employs a dual-model cross-validation unsupervised clustering mechanism, combined with dynamic entropy filtering to eliminate unstable clusters, ensuring the biological rationality of the feature space. Furthermore, it introduces an adaptive metric learning system that automatically focuses on key pathological features through learnable distance metrics. Finally, it constructs a plug-and-play multi-task architecture that supports rapid adaptation to various downstream tasks such as classification and prognostic prediction. This method significantly reduces reliance on manual annotation, providing an efficient, robust, and scalable technical solution for pathological analysis.

[0111] Based on the above embodiments, the present invention also provides a terminal device, the principle block diagram of which can be as follows: Figure 3As shown, the terminal device includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a feature extraction model training method. The display screen can be a liquid crystal display (LCD) or an e-ink display.

[0112] Those skilled in the art will understand that Figure 3 The schematic diagram shown is only a partial structural diagram related to the present invention and does not constitute a limitation on the terminal device to which the present invention is applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0113] In one embodiment, a terminal device is provided, comprising a memory, a processor, and a feature extraction model training program stored in the memory and executable on the processor. When the processor executes the feature extraction model training program, it implements the following operation instructions:

[0114] A first feature of the sample image is extracted using a main model, a second feature of the sample image is extracted using an auxiliary model, and the feature extraction stability of the main model relative to the auxiliary model is determined based on the first feature and the second feature.

[0115] The training termination condition is constructed based on the stability of the feature extraction, and the main model and the auxiliary model are trained iteratively and synchronously to obtain the pre-trained main model and the pre-trained auxiliary model.

[0116] The pre-trained main model is used to extract features from the sample image again to obtain a first new feature. The pre-trained auxiliary model is used to extract features from the sample image again to obtain a second new feature. Based on the first new feature and the second new feature, a feature pseudo-label for the sample image is obtained. Based on the feature pseudo-label, the pre-trained main model is trained again to obtain a feature extraction model.

[0117] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for training a feature extraction model, characterized in that, include: A first feature of the sample image is extracted using a main model, a second feature of the sample image is extracted using an auxiliary model, and the feature extraction stability of the main model relative to the auxiliary model is determined based on the first feature and the second feature. The training termination condition is constructed based on the stability of the feature extraction, and the main model and the auxiliary model are trained iteratively and synchronously to obtain the pre-trained main model and the pre-trained auxiliary model. The pre-trained main model is used to extract features from the sample image again to obtain a first new feature. The pre-trained auxiliary model is used to extract features from the sample image again to obtain a second new feature. Based on the first new feature and the second new feature, a feature pseudo-label of the sample image is obtained. Based on the feature pseudo-label, the pre-trained main model is trained again to obtain a feature extraction model. Based on the first feature and the second feature, determining the feature extraction stability of the main model relative to the auxiliary model includes: Clustering calculation is performed on the first feature to obtain the first clustering result; Clustering calculations are performed on the second feature to obtain the second clustering result; Images corresponding to the same cluster contained in the first clustering result are selected from the sample images and denoted as clustered images; based on the difference between the same cluster contained in the first clustering result and the cluster corresponding to the same clustered image in the second clustering result, the probability that the cluster of the first clustering result is cross-assigned by the auxiliary model is obtained and denoted as the cross-assignment probability. Based on the cross-assignment probability, determine the conditional entropy corresponding to the cluster of the first clustering result; Based on the conditional entropy, the feature extraction stability of the main model relative to the auxiliary model is determined.

2. The feature extraction model training method as described in claim 1, characterized in that, Based on the first new feature and the second new feature, the feature pseudo-labels of the sample image are obtained, including: Clustering calculations are performed on the first new feature and the second new feature respectively; Based on the clustering results of the first new feature and the clustering results of the second new feature, the conditional entropy of each cluster contained in the clustering results of the first new feature is obtained. Based on the conditional entropy of each cluster corresponding to the first new feature, each cluster is filtered, and the filtered clusters are used as feature pseudo-labels.

3. The feature extraction model training method as described in claim 2, characterized in that, The conditional entropy of the selected clusters is less than that of the unselected clusters.

4. The feature extraction model training method as described in claim 1, characterized in that, The total loss function of the main model after pre-training is calculated by weighting the cross-entropy loss function, the Mahalanobis contrastive loss function, and the regularization term.

5. A task processing method, characterized in that, include: Using the sample pathological image as the sample image, and based on the sample image and the feature extraction model training method as described in claim 1, a feature extraction model is obtained; The feature extraction model is applied to the measured pathological images to extract the pathological features of the measured pathological images; Based on the aforementioned pathological characteristics, downstream tasks are processed.

6. The task processing method as described in claim 5, characterized in that, The downstream tasks include disease classification tasks, disease risk prediction tasks, or similar pathology query tasks.

7. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a feature extraction model training program stored in the memory and executable on the processor. When the processor executes the feature extraction model training program, it implements the steps of the feature extraction model training method as described in any one of claims 1-4. Alternatively, the terminal device includes a memory, a processor, and a task processing program stored in the memory and executable on the processor, wherein when the processor executes the task processing program, it implements the steps of the task processing method as described in any one of claims 5-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a feature extraction model training program, which, when executed by a processor, implements the steps of the feature extraction model training method as described in any one of claims 1-4. Alternatively, the computer-readable storage medium stores a task processing program that, when executed by a processor, implements the steps of the task processing method as described in any one of claims 5-6.

Citation Information

Patent Citations

  • Pseudo label loss unsupervised adversarial domain adaptive picture classification method based on Gaussian uniform mixture model

    CN114492574A

  • KR20240075106A